Wired
25th November 2004, 11:53 AM
Ok, so I'm trying to make a hybrid of smilies and bbcode, where someone can type in, say, !stuff!, and it'll be replaced by "hello i am bob blah blah blah". This is because on one forum one of our admins has to repeat the same 10 things over and over and over again.
I can cheat and do this by entering in a bbcode of say and have the HTML be "hello i am bob blah blah blah", however this means that every time he wants to use one of these, he still has to type in , which'll be longer than !blah! or whatever.
I've checked out vb.org, and the closest hack I could find to this only replaces something with one word, not full phrases.
Any ideas?
theMusicMan
25th November 2004, 12:10 PM
Ok, so I'm trying to make a hybrid of smilies and bbcode, where someone can type in, say, !stuff!, and it'll be replaced by "hello i am bob blah blah blah". This is because on one forum one of our admins has to repeat the same 10 things over and over and over again.
I can cheat and do this by entering in a bbcode of say and have the HTML be "hello i am bob blah blah blah", however this means that every time he wants to use one of these, he still has to type in , which'll be longer than !blah! or whatever.
I've checked out vb.org, and the closest hack I could find to this only replaces something with one word, not full phrases.
Any ideas?
Not if you assign a new editor button to the function and through conditionals make this button only available to Admins/Mods...;)
hpwilhelm
25th November 2004, 12:21 PM
Replacement variables in the styles? :)
It works with url's and words, so it might do this also. ;)
Floris
25th November 2004, 12:24 PM
Yes, you don't need to use bbcode or smilies.. use replacement variables.
You can make:
{hello}
be replaced with Hello! Welcome to our site. blah blah
theMusicMan
25th November 2004, 12:27 PM
Hmmm.. replacement variables... never tried using these... I now have an idea for a great bit of fun on tMP over the Christmas period.... hehehehehehe
hpwilhelm
25th November 2004, 12:44 PM
I use them to remove the anoying smiliecentral linkbacks... Some of my users insist on using them... :) So on my site, the smiliecentral smilies link to - my site. ;)
theMusicMan
25th November 2004, 01:41 PM
hmmmm.. good idea.
Can other peeps also describe how they use replacement variables on their sites please.
Wired
26th November 2004, 09:37 AM
Man, I cannot believe I never knew about that! :) Thanks guys!
Note to all: If the replacement text needs line breaks, <br> goes down 1 line <p> goes down 2.