Jump to content

bbcode


ghqwerty

Recommended Posts

ok so for my users profile i am doing the bbcode however i dont know if this bit is in the bbcode

 

on mty thing if i was to type

 

hello

 

hello

 

hello

 

it would show

 

hello hello hello

 

im guessing i would have to add in

<br />

 

but how would i single out the 'line break' to add it ??

 

basically what code do i need to add line breaks

Link to comment
Share on other sites

thanks sorted that

 

now when i do this

 

════════════════════════════

 

this isnt working amfg

 

════════════════════════════

 

i get

 

¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T

 

this isnt working amfg

 

¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T

 

or

&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;

 

this isnt working amfg

 

&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;&#9552;

Link to comment
Share on other sites

ignore that now ill do that another time

 

my thing now is i want to let the user write

 

hello

 

and then make it 20px big however

 

$str = preg_replace ('/\[size=\](.*?)\[\/size\]/is', '<span style="font-size: px">$1</span>', $str);

 

ive got so far but not sure how im meant to make whatever the user puts as size to = the px size

Link to comment
Share on other sites

Umm, Instresting use the following instead:

$str = preg_replace ('/\[size=([0-9]+)\](.*?)\[\/size\]/is', '<span style="font-size: $1px">$2</span>', $str);

 

if i wanted to make it a max size of say 30 would i just put [0-30]

Yes change [0-9]+ to [0-30]

Link to comment
Share on other sites

arr you know what i mean :P

 

but things like

&#9552; is a sort of = sign but lower

 

at the moment if i were to type in &#9552; and click save changes in the show profile it would show &#9552; then when i go back to edit it will show the variation of the = but if i click save changes again without clicking anything i get ¨T  basically i want it so that it ALWAYS shows the = sign for that one or whatever the code stands for

if you get my meaning ?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.