The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hit counter for links....
is there a modification or can somone find or suggest a way to do this,
i want to start up a rap directory and want to have profiles on rap sites....so i want a counter that will count the amount of clicks going from my site to each other rap site...anyone? ???????????? |
#2
|
||||
|
||||
quick and dirty version:
Setup a table in your database: Code:
create table linklog (linklogid integer not null auto_increment primary key, name text, link text, description text) link.php Code:
<?php if($_GET['goto']) { require_once('./global.php'); global $db; $goto = $_GET['goto']; $db->query("UPDATE linklog SET linkcount=linkcount+1 WHERE link='$goto'"); header("Location: $goto"); } ?> To pull a count out of the database: In your directory file you would do something like this: Code:
$output = ""; $linklist = $db->query_read("SELECT * FROM linklog"); while($link = $linklist) { $url = $link['link']; $count = $link['linkcount']; $description = $link['description']; $name = $link['name']; $output .= "<p><a href='$url'>$name</a> ($count) - $description</p>"; } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|