The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Custom BB CODE!

View previous topic View next topic Go down

Solved Custom BB CODE!

Post by Manish17xxx on January 23rd 2015, 10:26 am

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.


Last edited by Manish17xxx on February 7th 2015, 4:50 pm; edited 1 time in total

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Ikerepc on January 23rd 2015, 11:03 am

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

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on January 23rd 2015, 11:16 am

I cannot understand that properly .

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on January 23rd 2015, 11:22 am

@AngeTuteur Can you please help me out?

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by BL@DE on January 23rd 2015, 5:39 pm

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

Male Posts : 153
Reputation : 10
Language : English
Location : England

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ on January 23rd 2015, 6:15 pm

what do u want this custom bb code 2 do?

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on January 31st 2015, 7:39 am

@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.

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on January 31st 2015, 7:47 am

I can tell it more clearly.

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!

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on February 1st 2015, 6:05 am

Bump ~

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ on February 1st 2015, 7:57 am

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
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 ,

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on February 7th 2015, 6:17 am

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?

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on February 7th 2015, 6:21 am

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.

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ on February 7th 2015, 9:14 am

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);
});});

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on February 7th 2015, 4:49 pm

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

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ on February 7th 2015, 5:55 pm

lol your welcome

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx on February 8th 2015, 5:42 am

I even edited the code a bit more -

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.

Manish17xxx
New Member

Posts : 12
Reputation : 1
Language : English

http://www.manish17.4umer.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Guest on February 8th 2015, 8:36 am

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


Back to top Go down

Solved Re: Custom BB CODE!

Post by PA on February 9th 2015, 12:27 am

Is this still bbcode?
Like will it work in profile fields?
If not, how can I make it work??

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ on February 9th 2015, 2:33 am

yes u can make work in profile fields but you will need to open a new topic for your issue

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by PA on February 9th 2015, 2:58 am

Done, sir!

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ on February 15th 2015, 8:22 pm

Topic solved and archived

_Twisted_Mods_
Helper
Helper

Male Posts : 2020
Reputation : 299
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum