Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 451
1 Users 1 Guests Online

Count Spots

This is the same as what we used on RMB birthday as a competition. Your guests will go around your site looking for these.

TutorialNinja Image

So lets begin,

1) Save the image above or create you own one.
2) Save the following as dot_search.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
//List of all the pages you want the dot to display.
//The to numbers are the X and Y position on the screen.
//Then the value is the page you want them to show on.
//Remember to include a "/" before the page.
$listedURL["800;100"] = "/index.php";
$listedURL["300;450"] = "/aboutus.php";
$listedURL["920;180"] = "/contactus.php";
//End list
//Get the current page the person is on
$current = $_SERVER['REQUEST_URI'];
//Go through all the pages above checking if they are on the same page set by "$current"
foreach($listedURL as $locations => $urls){
//If there is a match
if($current == $urls){
//Get the X and Y location
$location = explode(";", $locations);
//Shows the spot in a div at the set position
echo '<div style="position:absolute; width:40px; height:40px; left:' . $location[0] . 'px; top:' . $location[1] . 'px; background-image:url(\'http://rmb-scripting.com/1.png\');"></div>';
}
}
?>


You need to change the "$listedURL" variables to suit your website.

You can have as many pages listed on the.

Hope you like the tutorial.
DanielXP
Author:
Views:
2280
Rating:
Posted on Monday 5th May 2008 at 11:27 AM
DanielXP
DanielXP
Uploaded it again
Posted on Monday 5th May 2008 at 09:10 AM
krekas
krekas
image won't load
Posted on Wednesday 11th July 2007 at 05:27 PM
FtH8er
FtH8er
its puts like little button images around the site and your users go around and try to count them i think, its good for competitions and stuff.
Posted on Wednesday 11th July 2007 at 02:57 PM
vb_king
vb_king
what does this do exactly?