2016-05-23, 22:04
Tutorial: Remove the Re: from reply |
With this code you can easily remove the annoying Re: from replys titles.
--> Tutorials, tips and tricks <--
Remove the Re: from reply
Remove the Re: from reply
1º - The JavaScript code
Add this JavaScript code with placement set on topics(you can also put it on all pages if you want to because it checks what page you are before running the code:
- Code:
[panda=js]
$(document).ready(function(){
var copyright="Please do not post this code on your forum without permission";
if(window.location.pathname.split('')[0]+window.location.pathname.split('')[1]=="/t"){
var version="punbb";
if(version=="phpbb3" || version=="phpbb2" || version=="punbb" || version=="invision"){
if(version=="phpbb3"){
var e=$("h2[class='topic-title']").length;
for(i=1;i<e;i++){
var text=$("h2.topic-title a").eq(i).text().split("Re: ")[1];
$("h2.topic-title a").eq(i).text(text);
};
};
if(version=="phpbb2"){
var e=$("span[class='postdetails']").length;
for(i=1;i<e;i++){
var text=$("span.postdetails").eq(i).text().split("Re: ")[1];
$("span.postdetails").eq(i).text(text);
};
};
if(version=="invision"){
var e=$("h3>a").length;
for(i=1;i<e;i++){
var text=$("h3>a").eq(i).text().split("Re: ")[1];
$("h3>a").eq(i).text(text);
};
};
if(version=="punbb"){
var e=$("div[class='posthead']>h2>a").length;
for(i=1;i<e;i++){
var text=$("div.posthead>h2>a").eq(i).text().split("Re: ")[1];
$("div.posthead>h2>a").eq(i).text(text);
};
};
};
};
});
By default the version is set to punbb(see version="punbb"), so if you are using another version, replace punbb with phpbb3, phpbb2 or invision.
If the code is not working on your forum, please post here and I will be more than happy to help you fix it.
© PunBB Design
If you have any questions related to this topic create a topic with the following title: Remove the Re: from reply |