UBB.Dev
Posted By: Risperdal [6.4 - 6.5] Advanced Text - 03/25/2003 3:32 PM
Name: Advanced Text.

Description: Allows you to post text with different colors, size, underline and font. Its also possible to center text.

Demo: none

Requirement: UBBâ„¢ 6.4 (I think it works for 6.5 too but since I don't have 6.5 I cant test it)

Link: http://apoforce.hypermart.net/advanced.txt

To do: Graphics! Maybe someone can make them and post them here?
Posted By: Bob Ferguson Re: [6.4 - 6.5] Advanced Text - 03/25/2003 7:57 PM
I installed Advanced Text but where is the Member/User suppose to see it? When I went to post a message, there's nothing there to indicate the new change(s). help
Posted By: Risperdal Re: [6.4 - 6.5] Advanced Text - 03/25/2003 8:05 PM
Yeah I know but right now im busy with my final tests. Tomorrow I got some time and I'll try to add it. Shouldn't be hard.

But you can use it now already!
Posted By: Bob Ferguson Re: [6.4 - 6.5] Advanced Text - 03/26/2003 4:14 AM
Quote
quote:
Yeah I know but right now im busy with my final tests. Tomorrow I got some time and I'll try to add it. Shouldn't be hard.

But you can use it now already!
How can I use it now? I don't see it confused
Posted By: Painfool Re: [6.4 - 6.5] Advanced Text - 03/26/2003 4:21 AM
underline
[center]center the text or img[/center]
nice red color

Its in the Txt file you downloaded smile Just surround your text with the codes above and it will be formatted accordingly.

Other colors can be used such as Black Blue Green etc.

Enjoy!
Posted By: Risperdal Re: [6.4 - 6.5] Advanced Text - 03/26/2003 6:46 PM
Ok I added the buttons laugh

If you have already installed this hack only edit public_common.pl and vars_wordlets_mods.cgi.

But the you have to make the buttons yourself since im not very good @ graphics
Posted By: Gizmo Re: [6.4 - 6.5] Advanced Text - 03/26/2003 6:49 PM
compatible with hex codes?
Posted By: Risperdal Re: [6.4 - 6.5] Advanced Text - 03/26/2003 7:12 PM
yes it is.

[code][/code]works all!
Posted By: Ed Re: [6.4 - 6.5] Advanced Text - 03/26/2003 8:50 PM
Hi Guys,
Did I miss something?
Where do you add the images in the Style Template?


Images are here OOOOOOPS! https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=4;t=001436;p=1#000010


Thanks Gizzy
Posted By: Risperdal Re: [6.4 - 6.5] Advanced Text - 03/26/2003 9:23 PM
I dont have images yet frown and the link you posted is this topic.

Well if anyone can make some images this hack could be completed
Posted By: Charles Capps Re: [6.4 - 6.5] Advanced Text - 03/26/2003 9:30 PM
You're not doing any input validation. Please pull down this hack until you can safely ensure that all input is validated. Please see the examples in imageize and urlize.
Posted By: Ed Re: [6.4 - 6.5] Advanced Text - 03/26/2003 9:44 PM
Quote
quote:
Originally posted by Risperdal:
I dont have images yet frown and the link you posted is this topic.

Well if anyone can make some images this hack could be completed
OOOOOPs! https://ubbdev.com/ubb/ultimatebb.php?ubb=get_topic;f=4;t=001436;p=1#000010
Posted By: Risperdal Re: [6.4 - 6.5] Advanced Text - 03/26/2003 10:08 PM
Quote
quote:
Originally posted by Charles Capps:
You're not doing any input validation. Please pull down this hack until you can safely ensure that all input is validated. Please see the examples in imageize and urlize.
But what must i validate? Only size could be validated. For the rest any input is allowed.
Posted By: Charles Capps Re: [6.4 - 6.5] Advanced Text - 03/27/2003 1:13 AM
You're putting arbritary values in each tag - users can pass through anything there, including quotes. The size and font tags in particular allow spaces through, meaning users can legitimately place full HTML in those fields. This is very dangerous. I must insist that you pull down the hack and add validation.

Legal values for colors are always going to be a-zA-Z0-9 and #. Legal values for sizes are only going to be 0-9, +, and -. Fonts should be restricted to a-zA-Z0-9, and the comma. No spaces.
Posted By: LK Re: [6.4 - 6.5] Advanced Text - 03/27/2003 8:55 AM
Many fonts have spaces too...

My suggestion:[code][/code]Some parts are untested so they might not work though..
Posted By: Risperdal Re: [6.4 - 6.5] Advanced Text - 03/27/2003 4:44 PM
but a lot of users dont know hex codes for colors. So they just type red or something.

and why must it be $5 and not just ?
Posted By: LK Re: [6.4 - 6.5] Advanced Text - 03/27/2003 5:20 PM
So instead of "a-fA-F" use "a-zA-Z", and instead of "{6}" type "*", then they can also type "red" or anything else...

About , it doesn't really matter, it's just that when I use it knows if it's [/color], [/size] or [/font] in case you have a tag in a tag (like [ color=X][ font=X]test[/font][/color], currently it might replace [/font][/color] with [/color][/font]... It doesn't really matter but it's confusing)
Posted By: RandyM Re: [6.4 - 6.5] Advanced Text - 03/28/2003 7:07 AM
I have to step in here and thank LK and CC for the time they put into helping people keep their UBB secure. We show up here and grab all kinds of code and install it without knowing all of the pitfalls. I'm glad that we have you guys to help.
Posted By: Stamoulis Re: [6.4 - 6.5] Advanced Text - 03/28/2003 8:57 PM
thx. works fine to me smile
Posted By: Stamoulis Re: [6.4 - 6.5] Advanced Text - 03/28/2003 10:02 PM
well, sth. i found is....

...on posting replies the images are shown, on posting new topics the images are not shown, whats going on ?! confused
Posted By: Gizmo Re: [6.4 - 6.5] Advanced Text - 03/28/2003 10:06 PM
Just a quick question, does the colour code work with hex also? I'm a very picky person frown ...
Posted By: LK Re: [6.4 - 6.5] Advanced Text - 03/28/2003 10:08 PM
Thanks XPert smile

Gizzy, yes
Posted By: Stamoulis Re: [6.4 - 6.5] Advanced Text - 03/29/2003 2:59 PM
you should enter a path to the icons, like http:.... or like the variable for the non cgi path wink

otherwise images might not be found in posting new topics...
Posted By: Risperdal Re: [6.4 - 6.5] Advanced Text - 03/29/2003 9:51 PM
Yeah I know. This is my first hack so sorry if something went wrong. I also went to Paris so I didnt have time to update. I'll update it asap.

Thanks for your fix LK!! I dont think I could make that on my own
Posted By: Agent316 Re: [6.4 - 6.5] Advanced Text - 04/04/2003 1:04 AM
I've been using these graphics with similiar version of this hack if you want to use them Risperdal. I can't take credit for them though, they came with the hack I had downloaded:

Sample

[Linked Image] [Linked Image] [Linked Image] [Linked Image] [Linked Image] [Linked Image] [Linked Image] [Linked Image]

THE REST

http://pc.usgaming.net/ubb/image.gif
http://pc.usgaming.net/ubb/bold.gif
http://pc.usgaming.net/ubb/color.gif
http://pc.usgaming.net/ubb/font.gif
http://pc.usgaming.net/ubb/size.gif
http://pc.usgaming.net/ubb/underline.gif
http://pc.usgaming.net/ubb/center.gif
Posted By: Mr. B Re: [6.4 - 6.5] Advanced Text - 05/15/2003 3:22 PM
Hi,

I've tried it.. I can use the codes manually but the buttons didn't appeare! enven after modifying the link of buttons....

any comments?

Also I've tried the bottons individually by inserting them alone (not in the ubb_code).. they appeared but no function!

Where is the mistake smile
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 05/17/2003 1:26 AM
Quote
quote:
Originally posted by Mr. B:
Hi,

I've tried it.. I can use the codes manually but the buttons didn't appeare! enven after modifying the link of buttons....

any comments?

Also I've tried the bottons individually by inserting them alone (not in the ubb_code).. they appeared but no function!

Where is the mistake smile
Try entering this
Code
[/code]instead of

[code]
Posted By: Mr. B Re: [6.4 - 6.5] Advanced Text - 05/24/2003 10:24 PM
Thanks Al. I tried these since I had been put them in noncgi directory. Nothing!!

Did anybody test these and the bottons worked?
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 05/24/2003 10:28 PM
Quote
quote:
Originally posted by Mr. B:
Thanks Al. I tried these since I had been put them in noncgi directory. Nothing!!

Did anybody test these and the bottons worked?
does it show broken images, or does it show nothing. (red x?)

if it shows the red x, right click it and check what address it thinks the buttons should be
Posted By: Mr. B Re: [6.4 - 6.5] Advanced Text - 05/24/2003 11:38 PM
Nothing is showing .. It seems not from the Image, It is from the code itself.
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 05/24/2003 11:45 PM
I tried looking at your board to see if I could find the problem, but I am now dizzy frown
The code I gave you is teh code that shows the image, it's just html it should at least show a rex x

EDIT: How did you move the scroll bar to the left side?
Posted By: Mr. B Re: [6.4 - 6.5] Advanced Text - 05/28/2003 9:33 PM
take ur time Al smile and if u want to check send me to register u. My board is a closed board.

but what do u mean with (rex x) ?

about the scroll bar I've changed the allignment in some files and added a code to write from right to left. Its an arabic language requirement smile

(I dont have that code right now)
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 05/28/2003 9:41 PM
sorry, I meant red x

[Linked Image] < that is the red x I'm talking about. If you get that, that means it's a wrong link to the button graphics, if you don't, it's the code in the public_common.pl
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 08/14/2003 1:44 AM
I updated this to fix any bugs I had. Including doing something like

Code
Quote
blah
resulted in html when edited due to the many being confused.

https://www.ubbdev.com/ubb/upload/00020028/advanced.txt

Credit: LK for the idea, I took it a couple characters further to make it unique. I also added the noncgiurl part so that the bugs there would be gone. and big thanks to Risperdal, cause I wouldn't have been able to do this without your hack being there first.
Posted By: Mr. B Re: [6.4 - 6.5] Advanced Text - 08/30/2003 9:54 PM
I think there is a bug in ur file AL. Instead of "*" you put "{*}" smile
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 08/30/2003 10:14 PM
there isn't a * anywhere in my file, could you specify which line?
Posted By: Gizmo Re: [6.4 - 6.5] Advanced Text - 08/31/2003 4:01 AM
Quote
quote:
Originally posted by Weird Al:
EDIT: How did you move the scroll bar to the left side?
Code
<html dir="rtl">
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 08/31/2003 4:09 AM
haha, I know that now, I made that post over 3 months ago tipsy

once I'm sure Charles doesn't change the code again, I'll post an update for 6.6
Posted By: Charles Capps Re: [6.4 - 6.5] Advanced Text - 08/31/2003 4:49 AM
The area of the code you're working on hasn't changed since 6.5, so it should be fine in 6.6.
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 08/31/2003 5:31 AM
Quote
quote:
Originally posted by Charles Capps:
The area of the code you're working on hasn't changed since 6.5, so it should be fine in 6.6.
It changed between Beta Release one and 2.

$message was replaced for the $_0 one
Posted By: Charles Capps Re: [6.4 - 6.5] Advanced Text - 08/31/2003 7:21 AM
Really? I thought I did that back in 6.5. confused
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 08/31/2003 6:17 PM
ubb_lib_posting.cgi 6.6 Beta 1
Code
		$match++ if $_[0] =~ s/(<i>)(.+?)(</i>)/$2/isg;
$match++ if $_[0] =~ s/(<b>)(.+?)(</b>)/$2/isg;
$match++ if $_[0] =~ s/(<strong>)(.+?)(</strong>)/[qb]$2[/qb]/isg;
ubb_lib_posting.cgi 6.6 Beta 2
Code
		$match++ if $message =~ s/(<i>)(.+?)(</i>)/$2/isg;
$match++ if $message =~ s/(<b>)(.+?)(</b>)/$2/isg;
$match++ if $message =~ s/(<strong>)(.+?)(</strong>)/[qb]$2[/qb]/isg;
smile I knew I was right cause I tried to install this hack yesterday and had to change it.
Posted By: Charles Capps Re: [6.4 - 6.5] Advanced Text - 08/31/2003 9:19 PM
Mmm. I still could have sworn I did that in 6.5! Sorry for throwing your hack off. smile
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 08/31/2003 10:02 PM
it's no problem, I was planning on porting anyway so it could be edited in the CP. (btw, the code in the new cp in very intuitive)
Posted By: Mr. B Re: [6.4 - 6.5] Advanced Text - 09/03/2003 9:05 PM
AL,

LK made an input test to the hack it is in the first page:

$match++ if $_[0] =~ s/([color:)([#0-9a-fA-F]{6})(])(.+?)([/color])/$4/isg; $match++ if $_[0] =~ s/([font:)([0-9a-zA-Z,s]*)(])(.+?)([/font])/$4/isg; $match++ if $_[0] =~ s/( )(.+?)( )/$5/isg;

You had encluded these line previously in your file

the "*" was in the first line as LK changed it after that.

Strange .. these lines are not there any more.
Posted By: Ian Spence Re: [6.4 - 6.5] Advanced Text - 09/03/2003 11:33 PM
*shrugs*

well does my code work for you?
Posted By: Gizmo Re: [6.4 - 6.5] Advanced Text - 09/04/2003 6:15 AM
it works for everyone, people just get unwanted features...
© UBB.Developers