Post by SubDevo on Feb 28, 2011 18:56:24 GMT -8
Add Board in 'New Topics' List and Search Results by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
ProBoards, by default, does not put the Board that the post was made in on the "New Topics" and on posts found in the Search Results page (include user recent and forum recent and forum searches).
On the "New Topics" page, this code will add a link to the board that the post was made into the Last Post cell.
On the "Search Results" page, it adds the board link after "Topic:".
On the "New Topics" List:
Before
After
On the "Search Results" page:
Before
After
Enjoy!!!
SubDevo
Variables:
var bText=" in "; // Text Before Board Link on Search Results Page
Enter the text or HTML that you would like to appear before the Board Link.
This does not affect the "New Topics" list.
If you want the board link on a separate line, put "<br>" in here.
Example:
var bText="<br>Board: "; // Text Before Board Link on Search Results Page
Location: Global Footer
<script type="text/javascript">
/* Add Board in 'New Topics' List and Search Results by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var bText=" in "; // Text Before Board Link on Search Results Page
var ns=(pb_action=="search2")?1:0,a,b,m,x=-1;
if(/=newestthreads$/.test(location.href)||ns){
var fjO=[],n=/(board=.+?)(&|$)/i,f=0,pf=(ns)?bText:"<br>in ";
m=document.getElementById("forumjump").options;
while(m[++x]){ a=m[x].text;
if(n.test(m[x].value)){fjO[RegExp.$1]=a.slice(a.indexOf(" "));}
} m=document.getElementsByTagName(((ns)?"font":"b")); x=-1;
while(m[++x]){ a=m[x];
if(n.test(a.innerHTML)){ b=RegExp.$1; f=0;
if(ns&&a.className=="cattext"){f=1;}
else if(!ns&&a.firstChild.onclick){ f=1;
a=a.parentNode.parentNode.parentNode.lastChild.firstChild;
} if(f&&a){a.innerHTML+=pf+" <a href='/index.cgi?"+b+"'>"+fjO+"<\/a>";}
}}}
</script>
Tested in IE, FF, Opera, Safari and Chrome.
ProBoards, by default, does not put the Board that the post was made in on the "New Topics" and on posts found in the Search Results page (include user recent and forum recent and forum searches).
On the "New Topics" page, this code will add a link to the board that the post was made into the Last Post cell.
On the "Search Results" page, it adds the board link after "Topic:".
On the "New Topics" List:
Before
After
On the "Search Results" page:
Before
After
Enjoy!!!
SubDevo
Variables:
var bText=" in "; // Text Before Board Link on Search Results Page
Enter the text or HTML that you would like to appear before the Board Link.
This does not affect the "New Topics" list.
If you want the board link on a separate line, put "<br>" in here.
Example:
var bText="<br>Board: "; // Text Before Board Link on Search Results Page
Location: Global Footer
<script type="text/javascript">
/* Add Board in 'New Topics' List and Search Results by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var bText=" in "; // Text Before Board Link on Search Results Page
var ns=(pb_action=="search2")?1:0,a,b,m,x=-1;
if(/=newestthreads$/.test(location.href)||ns){
var fjO=[],n=/(board=.+?)(&|$)/i,f=0,pf=(ns)?bText:"<br>in ";
m=document.getElementById("forumjump").options;
while(m[++x]){ a=m[x].text;
if(n.test(m[x].value)){fjO[RegExp.$1]=a.slice(a.indexOf(" "));}
} m=document.getElementsByTagName(((ns)?"font":"b")); x=-1;
while(m[++x]){ a=m[x];
if(n.test(a.innerHTML)){ b=RegExp.$1; f=0;
if(ns&&a.className=="cattext"){f=1;}
else if(!ns&&a.firstChild.onclick){ f=1;
a=a.parentNode.parentNode.parentNode.lastChild.firstChild;
} if(f&&a){a.innerHTML+=pf+" <a href='/index.cgi?"+b+"'>"+fjO+"<\/a>";}
}}}
</script>