Good art is a taste, good design is an opinion.


Come as guest, stay as family.
Board Index

Come as guest, stay as family.


You are not connected. Please login or register

Foto

[Javascript] Remove Re: from replys



View previous topic View next topic Go down Message [Page 1 of 1]

1
Offline

  Andrei34

avatar
Punbb Rookie
Punbb Rookie


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



- 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

Powered by PunBB
Currently 0 users have thanked Andrei34 for this post:

2
Offline

  Shadow

avatar
Administrator
Administrator
Please put [ic]var version="phpbb3";[/ic] to punbb, all tutorials should be punbb as default.

Also you should include a way how to chnage a version in main thread.

Thank you.



Forum Administrator, Coolyou,
Due to the volume of PMs I receive, I do not provide support via PM.
We have community forums for most support requests. If it's truly confidential, please do PM me.

Useful links:
-> Before asking question,  please use a Search option.
-> If you want to check our staff members click here.
->  Forum rules, this is a MUST READ thread.
->  FAQ (Frenquently asked questions)

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

3
Offline

  Andrei34

avatar
Punbb Rookie
Punbb Rookie
@Shadow wrote:[link="/t1152-remove-re-from-replys#7830"]Please put [ic]var version="phpbb3";[/ic] to punbb, all tutorials should be punbb as default.

Also you should include a way how to chnage a version in main thread.

Thank you.
Done.

Powered by PunBB
Currently 0 users have thanked Andrei34 for this post:

4
Offline

  Shadow

avatar
Administrator
Administrator
[sucesso="Tutorial Accepted"]This tutorial has been reviewed and points are added to the user accordingly.[/sucesso]



Forum Administrator, Coolyou,
Due to the volume of PMs I receive, I do not provide support via PM.
We have community forums for most support requests. If it's truly confidential, please do PM me.

Useful links:
-> Before asking question,  please use a Search option.
-> If you want to check our staff members click here.
->  Forum rules, this is a MUST READ thread.
->  FAQ (Frenquently asked questions)

Powered by PunBB
Currently 0 users have thanked Shadow for this post:

View previous topic View next topic Back to top Message [Page 1 of 1]


Topic URL's

URL
BBcode
HTML

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