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 BBcode in profile fields

View previous topic View next topic Go down

Solved Custom BBcode in profile fields

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

Hey guys I want to make custom BBcodes work but in profile fields, not in topics like the one here:http://help.forumotion.com/t138493-custom-bb-code?nid=151#941230
Mostly I want to do this for the hover effect that was achieved in the link.

Thanks!

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 9th 2015, 3:43 am

what will all will this bbcode do? or are you trying to do the same thing replace a word with a image

_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 BBcode in profile fields

Post by PA on February 9th 2015, 12:10 pm

Yeah.
I want to replace the word with an image. The image will be of an award so when I say;
[trophy] there will be an icon of a trophy, and when they hover over it they can see the tooltip (this part is very important, no point doing this if there is no tooltip.)
With that I'll basically be able to implement the award system that other hosts have.

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 9th 2015, 5:41 pm

here u go pretty much same as other

Code:
    $(function(){
    var title = ['charizard','squirtle','snorlax'];
    var image = ['imageforcharizard.gif','imageforsquirtle.gif','imageforsnorlax.gif'];
    $('.field_uneditable').each(function(){
          var oldhtml = "";
      oldhtml = $(this).html();
      for(var i = 0;i<title.length;i++){
      oldhtml=oldhtml.replace('['+title[i]+']','<img src="'+image[i]+'" title="'+title[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 BBcode in profile fields

Post by PA on February 10th 2015, 7:05 am

But twisted, it's the exact same.
I don't get the image in my profile fields. I can only see it in posts.
In the profile fields it's just [charizard] that's it.
I don't see the tooltip either.

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 10th 2015, 7:07 am

set script to all pages

_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 BBcode in profile fields

Post by PA on February 10th 2015, 7:08 am

It is in all pages.

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 10th 2015, 7:10 am

can you provide me with a link to a profile with the text in a field so i can check it out

_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 BBcode in profile fields

Post by PA on February 10th 2015, 7:13 am

Here:http://www.pottersarmy.net/u858
Several fields have [charizard] in them. Yes, the threads have charizard displaying (without the tooltip, but we should solve this first right?)

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 10th 2015, 10:13 am

i see charizard and if i move my mouse over him it shows me his name

_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 BBcode in profile fields

Post by PA on February 11th 2015, 1:56 am

Yeah.
I don't know Twisted, it's weird.
If you look at the same profile now you see that charizard is showing but the other two, merlin and snorlax are not even though I have the EXACT same picture for each of them.

Code:
$(function(){
var pokemon = ['charizard','merlin','snorlax'];
var pokeimage = ['http://static.pokemon-vortex.com/images/pokemon/Charizard.gif','http://static.pokemon-vortex.com/images/pokemon/Charizard.gif','http://static.pokemon-vortex.com/images/pokemon/Charizard.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);
});});

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 11th 2015, 2:32 am

thats not the script i provided above

_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 BBcode in profile fields

Post by PA on February 11th 2015, 4:17 am

Okay Twisted it works now, in the profiles.
But not in the messages, (the profile fields in the messages.) In order to display that I should use the code in the last link?

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 11th 2015, 4:42 am

try this

Code:
$(function(){
var title = ['charizard','merlin','snorlax'];
var image = ['http://static.pokemon-vortex.com/images/pokemon/Charizard.gif','http://static.pokemon-vortex.com/images/pokemon/Charizard.gif','http://static.pokemon-vortex.com/images/pokemon/Charizard.gif'];
$('.postbody').each(function(){
      var oldhtml = "";
  oldhtml = $(this).html();
  for(var i = 0;i<pokemon.length;i++){
  oldhtml=oldhtml.replace('['+title[i]+']','<img src="'+image[i]+'" title="'+title[i]+'">');};
  $(this).html(oldhtml);
});
    $('.field_uneditable').each(function(){
          var oldhtml = "";
      oldhtml = $(this).html();
      for(var i = 0;i<title.length;i++){
      oldhtml=oldhtml.replace('['+title[i]+']','<img src="'+image[i]+'" title="'+title[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 BBcode in profile fields

Post by PA on February 14th 2015, 4:28 pm

That doesn't work Twisted. Still only displays in the profiles, not the topics.
And it shifts the avatars and profiles (in the topics/messages) to the right side (rather than the default left side.)

By the way, happy to see that you are a moderator now. Fully approve of that.

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 14th 2015, 4:44 pm

can you send me a admin account to login to ..also thank you

_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 BBcode in profile fields

Post by PA on February 14th 2015, 5:22 pm

Okay Twisted.
Does it work? Is the script!

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 15th 2015, 2:40 am

u didn't copy my last script i posted u was sill using a previous one .. but u should be good to go now

_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 BBcode in profile fields

Post by PA on February 15th 2015, 12:14 pm

No, twisted, i did copy that script and told you it wasn't working. Then I removed it since it wasn't working and used the old one.

Maybe pics will help more:


Here's the images working in the profile fields.



Here's the same images and same code NOT working in the profile section of the images.
ALSO note that the quick reply box is screwed up as a result of this code.

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 15th 2015, 2:01 pm

try clearing your browser cache ..because i made test post when i was on your forum and it was working fine

_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 BBcode in profile fields

Post by PA on February 15th 2015, 2:21 pm

Okay twisted, I did that but no change at all. Just messed up the post stuff.

but just in case we are on the same page...
The medals have to show up in the PROFILE SECTION of the messages, not the messages themselves.
If you see the second image above you'll notice what I'm talking about.

Seriously, sorry for annoying you so much. But I'm really close to having something I've wanted on my forum for a while thanks to your help.

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 15th 2015, 3:30 pm

sorry i didn't realize that was poster profile.. u should be good now .. i already fixed for you but im posting this for others

Code:
$(function(){
var title = ['charizard','merlin','snorlax'];
var image = ['http://static.pokemon-vortex.com/images/pokemon/Charizard.gif','http://static.pokemon-vortex.com/images/pokemon/Charizard.gif','http://static.pokemon-vortex.com/images/pokemon/Charizard.gif'];    $('.postbody').each(function(){
          var oldhtml = "";
      oldhtml = $(this).html();
      for(var i = 0;i<title.length;i++){
      oldhtml=oldhtml.replace('['+title[i]+']','<img src="'+image[i]+'" title="'+title[i]+'">');};
      $(this).html(oldhtml);
    });
        $('.field_uneditable').each(function(){
              var oldhtml = "";
          oldhtml = $(this).html();
          for(var i = 0;i<title.length;i++){
          oldhtml=oldhtml.replace('['+title[i]+']','<img src="'+image[i]+'" title="'+title[i]+'">');};
          $(this).html(oldhtml);
        });
           $('.postprofile').each(function(){
              var oldhtml = "";
                  oldhtml = $(this).find('dd:contains(Achievements)').html();
          for(var i = 0;i<title.length;i++){
          oldhtml=oldhtml.replace('['+title[i]+']','<img src="'+image[i]+'" title="'+title[i]+'">');};
          $(this).find('dd:contains(Achievements)').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 BBcode in profile fields

Post by PA on February 15th 2015, 3:40 pm

Wow Twisted thanks!

This is SOLVED. Now I just need the Tipsy Tooltips to work and I will have finally managed to do awards the way Jcink forums do it. Thanks

PA
Forumember

Posts : 219
Reputation : 2
Language : english

Back to top Go down

Solved Re: Custom BBcode in profile fields

Post by _Twisted_Mods_ on February 15th 2015, 6:59 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