The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Custom BB CODE!

5 posters

Go down

Solved Custom BB CODE!

Post by Manish17xxx Fri 23 Jan - 5:26

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 Sat 7 Feb - 11:50; edited 1 time in total
avatar
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 Fri 23 Jan - 6:03

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
Ikerepc
Active Poster

Male Posts : 1186
Reputation : 167
Language : Who cares...
Location : Where web help & support is needed

http://admins.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx Fri 23 Jan - 6:16

I cannot understand that properly .
avatar
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 Fri 23 Jan - 6:22

@AngeTuteur Can you please help me out?
avatar
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 Fri 23 Jan - 12:39

what do u want done to your site ? if u need some cool stuff on your site I can put it on for u.
avatar
BL@DE
Forumember

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

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ Fri 23 Jan - 13:15

what do u want this custom bb code 2 do?
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx Sat 31 Jan - 2:39

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.
avatar
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 Sat 31 Jan - 2:47

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!
avatar
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 Sun 1 Feb - 1:05

Bump ~
avatar
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_ Sun 1 Feb - 2:57

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_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx Sat 7 Feb - 1:17

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?
avatar
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 Sat 7 Feb - 1:21

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.
avatar
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_ Sat 7 Feb - 4:14

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_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx Sat 7 Feb - 11:49

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
avatar
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_ Sat 7 Feb - 12:55

lol your welcome
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by Manish17xxx Sun 8 Feb - 0:42

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.
avatar
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 Sun 8 Feb - 3:36

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
avatar
Guest
Guest


Back to top Go down

Solved Re: Custom BB CODE!

Post by PA Sun 8 Feb - 19:27

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

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ Sun 8 Feb - 21:33

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

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Custom BB CODE!

Post by PA Sun 8 Feb - 21:58

Done, sir!
avatar
PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BB CODE!

Post by _Twisted_Mods_ Sun 15 Feb - 15:22

Topic solved and archived
_Twisted_Mods_
_Twisted_Mods_
Helper
Helper

Male Posts : 2083
Reputation : 336
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Back to top

- Similar topics

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