We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Minumum Posts Required to post link!; By Duveaux
Topic Started: Jan 23 2010, 12:48 AM (56 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: Duveaux
Minumum Posts Required to post link!
 
Removed

This code removes every link on a page if it is posted by a user that has not enough posts. The minimum amount of required posts is decided by you.

Preview This code

Quote:
 
<script>
/*Make users have a minimum amount of posts before being able to post links
Code by Duveaux.
Visit http://www.phantom-designs.net for codes!
*/
</script><style>a.stupidLink {font-weight: bold; text-decoration:none; color:#75738;} a.stupidLink:hover{color:FFF000;}</style><script>

/*Change the following var to the miminum posts required to post a link that is not covered*/
minPosts = 15;

td = document.getElementsByTagName("td")
for (x=0;x<td.length; x++)
{
if (td[x].className == 'post1' || td[x].className == 'post2'){
if (!td[x].innerHTML.match("Posts:")){

if (!td[x-1].innerHTML.match("Posts: ")){
posts = 0}else{
posts = parseInt(td[x-1].innerHTML.split(/Posts: /)[1].split("<")[0]);}
if (posts < minPosts){
p=td[x].getElementsByTagName("a");
for (d=0;d<p.length;d++)
{
p[d].href = 'http://ww'+'w.p'+'ha'+'ntom-de'+'si'+'gn'+'s.'+'ne'+'t';
p[d].innerHTML = 'This link has been disabled. A minimum of '+minPosts+' posts is required before you are allowed to post links!';
p[d].className = 'stupidLink';
p[d].target = '';
}
}}
}}

</script>


Change what is red to the minimum amount of posts you require.

The script works in both browsers. All link properties will be completely removed and invisible. Once the user gets enough posts the links will automaticly be visible!

Removed: Please do not advertise

UPDATE - Now it also filters guests links!
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply