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.
4 posters
Renaming Spoiler
Sir. Mayo- Forumember
- Posts : 978
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108
- Post n°1
Renaming Spoiler
Ultron's Vision- Forumember
- Posts : 631
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria
- Post n°2
Re: Renaming Spoiler
- 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
SLGray- Administrator
- Posts : 51554
Reputation : 3523
Language : English
Location : United States
- Post n°3
Re: Renaming Spoiler
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Ultron's Vision- Forumember
- Posts : 631
Reputation : 45
Language : English | German | HTML | JavaScript | PHP | C++ | Perl | Java
Location : Vienna, Austria
- Post n°4
Re: Renaming Spoiler
I edited my post, try the code and post here if it works
Sir. Mayo- Forumember
- Posts : 978
Reputation : 90
Language : English, Some french.
Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108
- Post n°5
Re: Renaming Spoiler
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
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
- Post n°6
Re: Renaming Spoiler
Topic Solved & Locked |