I realize there are a ton of tutorials on this but for some reason people still seem to struggle and make threads about it so today I will show you how to guarentee get the voting system setup on your hotel.
What you will need:
- FindRetros account to setup an ad page
- Banner
- Common sense
1. Register on FindRetros and create an ad for your hotel (If you already have then skip to step 2.)
2. Make a file in your skin folder called forcevote.php and add this code
We're not done so don't save the file yet! Now where it says...
Replace the word habbo with your FindRetros voting page username (NOT YOUR LOGIN USER)
Also where it says...
Replace habbo with your FindRetros voting page username and lastly where it says habbo.com change just that to your hotel url (Don't mess with the code or your voting wont work!)
3. Now whatever page you want users to be prompt to vote add this at the very top of that file (Usually above <!DOCTYPE html>)
Client.php, Index.php, or Me.php is usually where most hotels decide to put theirs but its up to you where you want yours! I don't recommend on the index as apparently findretros is against it but i see a whole bunch of hotels who still do it so do at your own risk.
4. Refresh and if you did it right you now have voting
NOTE: Some people may get a voting loop or some other silly problem and if so then i'm sorry. By the time you see this I probably quit devbest so will not be providing support!
What you will need:
- FindRetros account to setup an ad page
- Banner
- Common sense
1. Register on FindRetros and create an ad for your hotel (If you already have then skip to step 2.)
2. Make a file in your skin folder called forcevote.php and add this code
PHP:
<?php
if(isset($_GET['voted'])) {
}
else {
$userip = "{$_SERVER['REMOTE_ADDR']}";
$current_url = substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
$url = 'http://votingapi.com/validate.php?user=habbo&ip=' . $userip;
$context = stream_context_create(array('http' => array('timeout' => 1)));
$data = @file_get_contents($url, 1, $context);
if(!$data || !is_numeric($data)) {
return "Error";
}
else if ($data == 1 || $data == 2) {
}
else {
header ("Location: http://votingapi.com/vote.php?username=habbo&api=http:!!habbo.com!index?novote");
exit;
}
}
?>
We're not done so don't save the file yet! Now where it says...
PHP:
$url = 'http://votingapi.com/validate.php?user=habbo&ip=' . $userip;
Also where it says...
PHP:
header ("Location: http://votingapi.com/vote.php?username=habbo&api=http:!!habbo.com!index?novote");
3. Now whatever page you want users to be prompt to vote add this at the very top of that file (Usually above <!DOCTYPE html>)
PHP:
<?php include_once ("forcevote.php");
?>
4. Refresh and if you did it right you now have voting
NOTE: Some people may get a voting loop or some other silly problem and if so then i'm sorry. By the time you see this I probably quit devbest so will not be providing support!
Last edited: