Getting tired of the standards "wrote:", "spoiler:", "quote:", or "code:" ?? Me too !
This tutorial will allow you to change those titles, and works on all versions of Forumotion forums.
Installing
Go to Administration Panel > Modules > JavaScript codes management, make sure JavaScript codes management is enabled, and create a new script.
Title : Your choice Placement : In the topics Paste the code below and submit : - Code:
$(function() { Â var spoiler_text = "Click to view the content :", Â quote_text = "This is a quote :", Â code_text = "This is a code :", Â wrote_text = " previously wrote :"; Â $(".postbody").find("dl.spoiler dt, dl.codebox dt, dl.codebox dt span.genmed b, blockquote cite").each(function() { Â Â if (!this.hasChildNodes() || this.firstChild.nodeType != 3) return; Â Â var c = this.firstChild, t = c.nodeValue.trim(); Â Â Â t == "Spoiler:" && (c.nodeValue = spoiler_text) || Â Â t == "Quote :" && (c.nodeValue = quote_text) || Â Â t == "Code:" && (c.nodeValue = code_text) || Â Â t.substr(-7) == " wrote:" && (c.nodeValue = t.substr(0, t.length - 7) + wrote_text); Â }); }); Observe
The green expression replaces the red expression.
Click to view the content : replaces the text Spoiler: This is a quote : replaces the text Quote: This is a code : replaces the text Code: previously wrote : replaces the text wrote:
Note :
- This does not replace the custom spoiler text
- It changes all quotes, spoilers, and codes, not yet personalized
- Easily configurable according to your needs
|