problem with Personalize the titles of quote, spoiler, and code
3 posters
Page 1 of 1
problem with Personalize the titles of quote, spoiler, and code
the topic link
https://help.forumotion.com/t135638-personalize-the-titles-of-quote-spoiler-and-code
my roblem is the code works on English forum only i tried to add it on Arabiv forum but it didnt work
i want also replace
like this
blue should replace the red
https://help.forumotion.com/t135638-personalize-the-titles-of-quote-spoiler-and-code
my roblem is the code works on English forum only i tried to add it on Arabiv forum but it didnt work
i want also replace
like this
i used colors in Qoute just to show the text needed to be replacedwhat i need wrote:code - نص برمجى
spoiler - اظهار/اخفاء المحتوى
Quote - مقتبس
wrote - قد كتب
blue should replace the red
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: problem with Personalize the titles of quote, spoiler, and code
Did you translate the whole code into Arabic?
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.
Re: problem with Personalize the titles of quote, spoiler, and code
See if this works :
The translations above are what the titles of your boxes say, correct ?
- 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 == "اظهار/اخفاء المحتوى:" && (c.nodeValue = spoiler_text) ||
t == "مقتبس :" && (c.nodeValue = quote_text) ||
t == "نص برمجى:" && (c.nodeValue = code_text) ||
t.substr(-6) == " قد كتب:" && (c.nodeValue = t.substr(0, t.length - 6) + wrote_text);
});
});
The translations above are what the titles of your boxes say, correct ?
Re: problem with Personalize the titles of quote, spoiler, and code
yes it is the text i wantAnge Tuteur wrote:See if this works :
- 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 == "اظهار/اخفاء المحتوى:" && (c.nodeValue = spoiler_text) ||
t == "مقتبس :" && (c.nodeValue = quote_text) ||
t == "نص برمجى:" && (c.nodeValue = code_text) ||
t.substr(-6) == " قد كتب:" && (c.nodeValue = t.substr(0, t.length - 6) + wrote_text);
});
});
The translations above are what the titles of your boxes say, correct ?
after a test both English and Arabic not working on that and as i understand my forum use windows-1256 as a charset the Arabic one
the English i dont know yet
SLgey wrote:Did you translate the whole code into Arabic?
i changed the that part
- Code:
var spoiler_text = "Click to view the content :",
quote_text = "This is a quote :",
code_text = "This is a code :",
wrote_text = " previously wrote :";
this what i translate
Edit
i find ot something
the part of the code
- Code:
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);
needs the oroignal text in the Arabic forum i manged to do the code text
and ill try the rest by my self thanks for the tip Ange
Mark the topic as solved
Last edited by Michael_vx on September 23rd 2014, 2:01 am; edited 1 time in total (Reason for editing : add good news)
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: problem with Personalize the titles of quote, spoiler, and code
You're welcome
For wrote you should see t.substr(-7) that is the number of characters in " wrote:" (including the space) to be replaced.
Topic archived
If you have anymore questions do not hesitate to open a new topic.
For wrote you should see t.substr(-7) that is the number of characters in " wrote:" (including the space) to be replaced.
Topic archived
If you have anymore questions do not hesitate to open a new topic.
Similar topics
» Code & Spoiler Design
» Spoiler Code for a HTML page
» [HELP]Change the Spoiler & Code Layout [????]
» Spoiler code
» Altering the Code+Spoiler Box
» Spoiler Code for a HTML page
» [HELP]Change the Spoiler & Code Layout [????]
» Spoiler code
» Altering the Code+Spoiler Box
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum