Renaming Spoiler

Go down

Solved Renaming Spoiler

Post by Sir. Mayo on Fri 7 Jun 2013 - 1:30

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.
avatar
Sir. Mayo
Forumember

Male Posts : 980
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

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

Back to top Go down

Solved Re: Renaming Spoiler

Post by Ultron's Vision on Fri 7 Jun 2013 - 1:31

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 Fri 7 Jun 2013 - 1:39; edited 1 time in total
avatar
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 Fri 7 Jun 2013 - 1:35



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

avatar
SLGray
Administrator
Administrator

Male Posts : 43469
Reputation : 3086
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Solved Re: Renaming Spoiler

Post by Ultron's Vision on Fri 7 Jun 2013 - 1:40

I edited my post, try the code and post here if it works Wink
avatar
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 Fri 7 Jun 2013 - 16:29

@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
avatar
Sir. Mayo
Forumember

Male Posts : 980
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

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

Back to top Go down

Solved Re: Renaming Spoiler

Post by Sanket on Fri 7 Jun 2013 - 18:32

Topic Solved & Locked
avatar
Sanket
ForumGuru

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

http://webartzforum.com

Back to top Go down

Back to top


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