UBB.Dev
Posted By: MrStormyNights [6.2x] Advanced UBB Code Buttons - 02/18/2002 6:36 AM
HACK NAME: Advanced UBB-Code for UBB 6.2.1 Final

DESCRIPTION: Adds more UBB Code buttons and gives you the ability to change the button graphics from the styles control panel.

Buttons added:
  • Table border (you can set the color of the border)
  • Center
  • Font Color
  • Flip Horizontal
  • Flip Vertical
  • Font Face
  • Font Face, Font Size and Font Color (with one button, for the lazy)
  • Heading 1
  • Heading 2
  • Heading 3
  • Horizontal Rule
  • Invert
  • Marquee
  • Font Size
  • Font Size and Font Color(with one button, for the lazy)
  • Underline
  • Embed - for videos and sound files
  • Xray

Note: I removed Glow Text from v 2.0 Beta for security reasons. If you are wanting this code email me, but be aware it poses a serious security risk.
Charles - Please tell me if there is any security problems with the rest of these codes.
This is an update to the one I posted in the 6.1 beta board. This is also similar to melder's but I have some different buttons and I included the Multihack file.
Demo: Here - unregistered users may post here to test these out

Get the code here: this includes the text instructions, image files(red, blue and grey) and a MultiHack file

Updated for UBB 6.2.1 Final
Posted By: Charles Capps Re: [6.2x] Advanced UBB Code Buttons - 02/18/2002 6:47 AM
Looks good - no inlining. smile

However, if at all possible, please quote as little possible licensed code in the hack. You don't need to quote and replace the entire sub - you can explain where the new code needs to be inserted instead.
Posted By: yors Re: [6.2x] Advanced UBB Code Buttons - 02/18/2002 1:12 PM
yaaaaaaaaay!!

Finally I can stop worrying about allowing html to do all this smile

Thanks a ton!
Posted By: Galipabi Re: [6.2x] Advanced UBB Code Buttons - 02/18/2002 2:35 PM
very nice ... thanx for your efforts
Posted By: LK Re: [6.2x] Advanced UBB Code Buttons - 02/18/2002 3:03 PM
I personally don't like marquee, embed, xray and invert (especially marquee), but it's still nice to haved a hack with all these features but without security problems. (I have tci's old version, that also doesn't have any problem, but without table border, flip, heading, hr, invert, maruqee, embed, xray and fontsizecolorface.)

Good job. smile
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 02/20/2002 9:59 PM
Updated for released version of UBB 6.2.1 !
Posted By: Zedd Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 8:12 PM
Ok the codes themselves work. I ahd a problem with the buttons. They did not show up. You saw the white box with the red x and the title of the button. If you moused over the button, the java box showed up. If you clicked it worked. But the images did not show. I uploaded the gif's and I did it in binary. Any ide what the problem might be?

I would provide I alink, but I removed the code that showed the buttons until I get a possible answer.

I would like to say thanx for the hack. The codes themselves do work, just have to be entered manulaly.
Posted By: LK Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 8:39 PM
Add them again and give us a link.
Posted By: Zedd Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 9:36 PM
I added the hack back in. I will state upfront, that I did remove some of the options, like headings. But I removed the code in all parts for those pieces. All the codes work, the buttons work, the images just do not show up.

test forum

ok that is a link to a forum I made so anyone can post.
Posted By: LK Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 9:37 PM
Rehack cp_style.cgi and cp_vars_style_core.pl, then enter CP - Style Settings - [choose style] - change their image URL in the UBB Code parts.
Posted By: Zedd Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 10:19 PM
Thanx LK. I did not need to rehack any files. I just needed to go to the control panel and put in the links to the buttons.

I feel like an idiot for not thinking of it, but the directions also should have reminded people to do it.

Thanx again LK.
Posted By: LK Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 10:29 PM
quote:
if you don't have photoshop and/or need a different color let me know.
That means:

1. If someone doesn't have Photoshop and wants to change the color.

2. If someone has Photoshop and wants to change the color but can't use it so well.

3. If someone doesn't have Photoshop and wants it. wink
Posted By: Zedd Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 11:09 PM
I meant the directions should have said go to control panel and enter likns. Not about the color of the buttons.
Posted By: LK Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 11:11 PM
I know, I just posted it because I saw that thing in the readme, not because of your reply. tipsy
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 11:33 PM
In my defense, the below is in the instructions, and is what initially sets the graphics for your style templates. The description on the hack says you can change them in the cp. So do I have to hold your hand while you hack it? - Just kidding smile . I will update the instructions to make it blatently obvious to the most casual observer, thanks for pointing that out.

##############################################################
## open vars_style_1.cgi in your non-cgi styles directory ##
##############################################################

#################
## find ##
#################

%vars_style = (

##################
## Below it Add ##
##################

'ubbcode_border' => 'ubbcode_border.gif',
'ubbcode_center' => 'ubbcode_center.gif',
'ubbcode_color' => 'ubbcode_color.gif',
'ubbcode_fliph' => 'ubbcode_fliph.gif',
'ubbcode_flipv' => 'ubbcode_flipv.gif',
'ubbcode_font' => 'ubbcode_font.gif',
'ubbcode_fsc' => 'ubbcode_fsc.gif',
'ubbcode_heading1' => 'ubbcode_heading1.gif',
'ubbcode_heading2' => 'ubbcode_heading2.gif',
'ubbcode_heading3' => 'ubbcode_heading3.gif',
'ubbcode_hr' => 'ubbcode_hr.gif',
'ubbcode_invert' => 'ubbcode_invert.gif',
'ubbcode_marquee' => 'ubbcode_marquee.gif',
'ubbcode_size' => 'ubbcode_size.gif',
'ubbcode_szcolor' => 'ubbcode_szcolor.gif',
'ubbcode_underline' => 'ubbcode_underline.gif',
'ubbcode_video' => 'ubbcode_video.gif',
'ubbcode_xray' => 'ubbcode_xray.gif',

###########################################################################
## Repeat for any addiditonal vars_styles#.cgi files in this directory ##
###########################################################################

LK - smile Thanks for helping out with this
As for your observations in the instructions.

quote:

That means:

1. If someone doesn't have Photoshop and wants to change the color.

2. If someone has Photoshop and wants to change the color but can't use it so well.

3. If someone doesn't have Photoshop and wants it.

#1. Yes, I will change then for them if they want.

#2.They can get a tutorial, I have better things to do with my time, but if they ask nicely, I will gladly give them pointers. There are also other programs that will open photoshop psd files.

As for #3 they are own thier own.
Posted By: Zedd Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 11:40 PM
ok the problem then is those things did not appear in the styles template. The styles template was blank. I had to type them all in myself.
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 02/23/2002 11:42 PM
The styles template you need to modify is in the NON-CGI/styles directory - NOT THE ONE IN your CGI directory.
Posted By: Zedd Re: [6.2x] Advanced UBB Code Buttons - 02/24/2002 1:58 AM
DOH!

Damnit I am not used to hacking the 6 series!

Ok here is a fun question them. What if anything did I screw up by uploading the var_styles_1.cgi into the cgi_bin?

And thank you for the hack and for clearing this topic up for me.
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 02/24/2002 2:36 AM
As far as I can tell, NONE. I deleted this file from my cgi directory and everything works still. I am not sure why this file is even there, unless it's used when you initally setup the bulletin board to create the vars_style_1.cgi in the styles directory?? this would be a good question for Charles.
Posted By: yors Re: [6.2x] Advanced UBB Code Buttons - 02/24/2002 4:24 PM
Thanks stormy...works perfectly in my board smile

I have also posted another set of buttons that can be used with this mod here

Its basically the colorscheme of my site (fire and steel) but if anyone want any other gradient... smile
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 02/25/2002 5:09 AM
Thanks for the buttons yors, those are cool!
Posted By: DzeDom Re: [6.2x] Advanced UBB Code Buttons - 02/25/2002 7:16 AM
if you can make this look like the old style or look like in vbb, it'll be a lot better
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 02/25/2002 7:50 AM
What you mean old style? and if you like vbb, then use it. I like UBB and thats what this hack is for. If you dont like it, then write the hack yourself!

No one is stopping you from getting off your kester and learning how to do it for yourself. If you have some constructive comments I'll be glad to listen, otherwise keep your I don't like it comments to yourself!
Posted By: DzeDom Re: [6.2x] Advanced UBB Code Buttons - 03/01/2002 2:28 AM
excuse me, i'm just asking nicely. You don't have to answer me so harsh like that? You need to control your temper kiddie
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 03/01/2002 7:41 AM
whatever, have a nice day.
Posted By: Charles Capps Re: [6.2x] Advanced UBB Code Buttons - 03/01/2002 8:31 AM
Both of ya knock it off. There is no need for that tone.
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 03/01/2002 9:24 AM
Sorry Charles. I'll have to learn to bite my tounge from now on. Don't want to get the UBB Gods peaved at me. smile
Posted By: Tonycrew Re: [6.2x] Advanced UBB Code Buttons - 03/04/2002 9:28 PM
Amazing i am VERY VERY pleased with this hack i love it. Great job. smile
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 03/05/2002 8:25 AM
Thanks, glad you like it, I have another one that has 38 buttons if you want more.
Posted By: ADWOFF Re: [6.2x] Advanced UBB Code Buttons - 03/12/2002 5:52 AM
I installed this via Multihack on my test board, and all I can say is my community is going to have an awful lot of fun w/this new toy!

Thanks so much for the hack and for the Multihack file--I haven't enabled the HTML because of the security issues, and at the board I was at before migrating to UBB, we could do color, et al, and my community was missing it.

Sweet.

Great job!
Posted By: ADWOFF Re: [6.2x] Advanced UBB Code Buttons - 03/16/2002 3:20 AM
How would I go about centering the Instant UBB Code buttons under my message window?

I have the SmilieMod hack installed so that I can used the pulldown menu (my community is smilie junkies wink ), and I've disabled the Instant Graemlins' legend that would normally appear to the left of the Instant UBB Code.

Thanks!

Oh, I installed this on the 6.2.1.1 UBB, and it works like a charm. laugh
Posted By: Yamaha Raptor Re: [6.2x] Advanced UBB Code Buttons - 03/16/2002 4:00 AM
ADWOFF

open ubb_smilie.cgi

find**

Code
[/code]Replace with**

[code]
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 03/16/2002 4:06 AM
Thanks ClanKiller, I noticed it on my board too, but haven't had a chance to look into it. been busy trying to find a new host the last few days, so sorry to anybody that has been waiting on a reply.

You saved me from having to come ask you smile
Posted By: ADWOFF Re: [6.2x] Advanced UBB Code Buttons - 03/16/2002 6:48 AM
Cool beans, Clankiller! laugh

Thank you!
Posted By: ADWOFF Re: [6.2x] Advanced UBB Code Buttons - 03/21/2002 2:42 AM
Weird.

I'm testing my Advanced UBB Code buttons, and for some reason or another, the "marquee" is not functioning in the regular message.

It does work in the "preview," though.

What file do I need to look into to examine the code?

Thanks!
Posted By: ADWOFF Re: [6.2x] Advanced UBB Code Buttons - 03/21/2002 2:50 AM
Picture me banging my head against the wall/pulling my hair.

I just went back, tried it again, and it worked! eek
Posted By: *Speedy* Re: [6.2x] Advanced UBB Code Buttons - 03/26/2002 11:54 PM
The hack works great! but there is one probelm look at what it looks like

[Linked Image]

how can I fix that?

~Speedy~
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 03/30/2002 8:29 AM
first of all, upload the button set from the color scheme folder of your choice [included in the text instructions zip], this should fix the buttons being different colors.

Then:
Re-hack public_common.pl
sub instant_ubb_code section, you need to place your
Is it possible to get these codes to work in signatures?

It seems to work when you put the new code into a sig at first, but if you go back to edit it, the code turns into HTML.
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 04/13/2002 12:24 AM
It works fine in signatures for me?

Does it do the same thing in a post if you edit it?

If so rehack ubb_lib_posting.cgi
Posted By: UnKnoWnMasTeR Re: [6.2x] Advanced UBB Code Buttons - 04/14/2002 8:28 AM
Hey can you send me the one where you have shadow and glow, like on your site.
Posted By: kev2me Re: [6.2x] Advanced UBB Code Buttons - 04/14/2002 4:03 PM
quote:
Originally posted by MrStormyNights:
Does it do the same thing in a post if you edit it?

If you go back to a post and edit, it turns back into UBB Code with no problems. It's the signature that's giving me problems :

Edit: Actually, normal UBB codes don't get converted back to UBB Code from their HTML counterpart either. I think this might be a UBB glitch because I tried putting bold in my sig here on UBBDev, then I went to edit it and I got HTML bold code in my signature instead of UBB Code.

Edit again: I guess wwb95 has already addressed the sig problem here: http://community.infopop.net/2/OpenTopic?a=tpc&s=729094322&f=1863088313&m=5993023174
Posted By: deathdealer Re: [6.2x] Advanced UBB Code Buttons - 04/14/2002 10:21 PM
will this work with ver 6.2.0
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 04/17/2002 2:47 AM
I think it will work on 6.2.0, but I am not 100% positive. If your sub ubb code in ubb_lib.cgi starts with $match++ , then it will, I think it was 6.2.0 when Charles changed the UBB code.
Posted By: Antelope Re: [6.2x] Advanced UBB Code Buttons - 04/26/2002 10:20 PM
It works smile

1 question

[code][/code]is there a way to add this code once i use the embed video/sound button?
Posted By: MrStormyNights Re: [6.2x] Advanced UBB Code Buttons - 05/02/2002 4:23 PM
[code][/code]is there a way to add this code once i use the embed video/sound button?[/b]
No sorry, embed video/sound will not work for that. You will have to write your own code to do that. I don't use real player so I didn't add the code for it. The ubb codes in this hack can be easily modified for that purpose. I am not a perl/cgi programmer myself, i just took what was there originally and figured out how to modify it to make it do what I wanted. Look at the code for embed and start with it and make your own.
Posted By: Antelope Re: [6.2x] Advanced UBB Code Buttons - 05/13/2002 7:07 PM
ok ,,

thanx a lot smile
Posted By: Oblivion Knight Re: [6.2x] Advanced UBB Code Buttons - 05/31/2002 3:18 PM
If using this hack in 6.3, a blob of code in both ubb_lib.cgi and ubb_lib_posting.cgi needs editing. Otherwise the HTML sig, edit and quote bug will return..

You may want to port this MrStormyNights to 6.3 so that people don't have the same problem with the HTML trouble that I did when using this 6.2 version.. smile

Thanks,
Oblivion Knight.
© UBB.Developers