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.

Renaming Spoiler

View previous topic View next topic Go down

Solved Renaming Spoiler

Post by Sir. Mayo on June 7th 2013, 1:30 am

IS its at all possible to rename the text that is displayed on a post when a content is marked as spoiler. I would like to replace it with Open to read more.

Sir. Mayo
Forumember

Male Posts : 963
Reputation : 85
Language : English, Some french.
Location : Working 11Pm-7Am EST I will try to respond ASAP

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Renaming Spoiler

Post by Ultron's Vision on June 7th 2013, 1:31 am

Just a test:
Testing, this post will be edited soon.

EDIT: Use this jQuery code for phpBB 3 (and possibly older versions, I haven't tested this on my forum yet).

Code:
jQuery(document).ready(function(){

jQuery('dl.spoiler dt').each(function(){

if(/Spoiler\:/.test(jQuery(this).html())) jQuery(this).html('Click to read more.');

});

});


Last edited by Ultron's Vision on June 7th 2013, 1:39 am; edited 1 time in total

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

Solved Re: Renaming Spoiler

Post by SLGray on June 7th 2013, 1:35 am



When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Renaming Spoiler

Post by Ultron's Vision on June 7th 2013, 1:40 am

I edited my post, try the code and post here if it works Wink

Ultron's Vision
Forumember

Male Posts : 634
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria

http://duelacademy.net

Back to top Go down

Solved Re: Renaming Spoiler

Post by Sir. Mayo on June 7th 2013, 4:29 pm

@Ultron's Vision wrote:
Just a test:
Testing, this post will be edited soon.

EDIT: Use this jQuery code for phpBB 3 (and possibly older versions, I haven't tested this on my forum yet).

Code:
jQuery(document).ready(function(){

jQuery('dl.spoiler dt').each(function(){

if(/Spoiler\:/.test(jQuery(this).html())) jQuery(this).html('Click to read more.');

});

});



Yep that worked Thank you

Sir. Mayo
Forumember

Male Posts : 963
Reputation : 85
Language : English, Some french.
Location : Working 11Pm-7Am EST I will try to respond ASAP

http://sir-mayo.forumotion.com/

Back to top Go down

Solved Re: Renaming Spoiler

Post by Sanket on June 7th 2013, 6:32 pm

Topic Solved & Locked

Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.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