Custom BB CODE!
5 posters
Page 1 of 1
Custom BB CODE!
Hello i want a code that i can put on my website as a custom bb code. Can somebody please make it up for me or tell me how to?
I can tell my BB CODE USAGE AND HTML REPLACEMENT.
I can tell my BB CODE USAGE AND HTML REPLACEMENT.
Last edited by Manish17xxx on February 7th 2015, 4:50 pm; edited 1 time in total
Re: Custom BB CODE!
That's not possible at forumotion by default.
You can check this tutorial at AvacWeb for that: http://www.avacweb.com/t428-13-create-new-bbcodes-with-new-lgbb
You can check this tutorial at AvacWeb for that: http://www.avacweb.com/t428-13-create-new-bbcodes-with-new-lgbb
Re: Custom BB CODE!
what do u want done to your site ? if u need some cool stuff on your site I can put it on for u.
BL@DE- Forumember
- Posts : 161
Reputation : 10
Language : English
Location : England
Re: Custom BB CODE!
BL@DE wrote:what do u want done to your site ? if u need some cool stuff on your site I can put it on for u.
I want a custom bb code for pokemon display. Like ,
if a user types [pokemon]Name of the pokemon[/pokemon]
then it will display the picture of that pokemon.
Re: Custom BB CODE!
I can tell it more clearly.
The user types -
The actual code used is -
Somebody please help me out with it . Thanks in advance!
The user types -
- Code:
[pokemon](Name of the pokemon)[/pokemon]
The actual code used is -
- Code:
[img]https://i2.dstatic.com/images/pokemon/front/normal/(name of the pokemon).png[/img]
Somebody please help me out with it . Thanks in advance!
Re: Custom BB CODE!
bb code is used for wrapping stuff between two things i think what your wanting is more of a replacement script
this will let you put in [charizard] [squirtle] [snorlax] and will replace it with the image
every pokemon name and image must be between '' and must be separated by ,
for each name you add to pokemon list add the image in same place on pokeimage list
only thing you need to change is pokemon list and pokeimage list
goto acp>modules>JavaScript management
make sure JavaScript management is turned on if not turn it on and save
next create a new script
title:whatever you want
placement in topic
the copy the code below to the code box
and save/submit
so if you want to add new pokemon just add 'pokemonname' to pokemon list
same for image just make sure they are separated with a comma ,
this will let you put in [charizard] [squirtle] [snorlax] and will replace it with the image
every pokemon name and image must be between '' and must be separated by ,
for each name you add to pokemon list add the image in same place on pokeimage list
only thing you need to change is pokemon list and pokeimage list
goto acp>modules>JavaScript management
make sure JavaScript management is turned on if not turn it on and save
next create a new script
title:whatever you want
placement in topic
the copy the code below to the code box
and save/submit
- Code:
var pokemon = ['charizard','squirtle','snorlax'];
var pokeimage = ['imageforcharizard.gif','imageforsquirtle.gif','imageforsnorlax.gif'];
$('.postbody').each(function(){
var oldhtml = "";
oldhtml = $(this).html();
for(var i = 0;i<pokemon.length;i++){
oldhtml=oldhtml.replace('['+pokemon[i]+']','<img src="'+pokeimage[i]+'">');};
$(this).html(oldhtml);
});});
so if you want to add new pokemon just add 'pokemonname' to pokemon list
same for image just make sure they are separated with a comma ,
Re: Custom BB CODE!
Yes i did it. i EDITED the code and added image for charizard, but when i type [charizard] in my forums , its not showing that. any solution to it?
Re: Custom BB CODE!
Its nice that both of us are online. I hope we can have a nice talk now and i can get the solution to my problem.
Re: Custom BB CODE!
my fault i missed part of the code when i copied it
- Code:
$(function(){
var pokemon = ['charizard','squirtle','snorlax'];
var pokeimage = ['imageforcharizard.gif','imageforsquirtle.gif','imageforsnorlax.gif'];
$('.postbody').each(function(){
var oldhtml = "";
oldhtml = $(this).html();
for(var i = 0;i<pokemon.length;i++){
oldhtml=oldhtml.replace('['+pokemon[i]+']','<img src="'+pokeimage[i]+'">');};
$(this).html(oldhtml);
});});
Re: Custom BB CODE!
Working! Working! Working! Man you are awesome, thanks ! Finally problem , solved. thanks , you rock , you really rock!!!!!
3 cheers for Twisted Mods - Hip Hip Pokemon ; Hip Hip Pokemon
3 cheers for Twisted Mods - Hip Hip Pokemon ; Hip Hip Pokemon
Re: Custom BB CODE!
I even edited the code a bit more -
Now it also adds a tooltip to the code , it means when i point my cursor near the image, then it shows the name of the pokemon as a tooltip.
- Code:
$(function(){
var pokemon = ['charizard','squirtle','snorlax'];
var pokeimage = ['imageforcharizard.gif','imageforsquirtle.gif','imageforsnorlax.gif'];
$('.postbody').each(function(){
var oldhtml = "";
oldhtml = $(this).html();
for(var i = 0;i<pokemon.length;i++){
oldhtml=oldhtml.replace('['+pokemon[i]+']',<img src="'+pokeimage[i]+'" title="'+pokemon[i]+'">');};
$(this).html(oldhtml);
});});
Now it also adds a tooltip to the code , it means when i point my cursor near the image, then it shows the name of the pokemon as a tooltip.
Re: Custom BB CODE!
I'd like to add this little tutorial to it for future reference if you want to make your own BBCodes: http://www.avacweb.com/t428-13-create-new-bbcodes-with-new-lgbb
Guest- Guest
Re: Custom BB CODE!
Is this still bbcode?
Like will it work in profile fields?
If not, how can I make it work??
Like will it work in profile fields?
If not, how can I make it work??
PA- Forumember
- Posts : 219
Reputation : 2
Language : english
Re: Custom BB CODE!
yes u can make work in profile fields but you will need to open a new topic for your issue
Similar topics
» Custom bg code
» progress bar custom bb code
» Help needed with Custom Footer code
» I want to add a custom kotlin code BBcode
» Custom profile field direct code
» progress bar custom bb code
» Help needed with Custom Footer code
» I want to add a custom kotlin code BBcode
» Custom profile field direct code
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum