[TUT] RevCMS Index Voting [TUT]

Status
Not open for further replies.

Find

Posting Freak
Jun 21, 2012
597
189
Hello Habbotards,

Had a few people wanting to know how to set up index voting for RevCMS so I thought I might aswell make a tutorial to show you all how to do it :)

Ok firstly you need to have a cloudflare account for your retro (free cloudflare works fine).

Once you've set up your domain to your cloudflare account you should get to a screen like this (you'll need to wait for your nameservers to update before it shows up like this).

30w5ufa.png

Ok so now if you click the settings button over on the far right you should get a drop down list of thing you might need to do. You'll need to click the page rules button (should look like this).

34zwnwg.png


When on the page rules page you'll need to add a new rule.

In the URL pattern box you'll need to put in your domain e.g
Under the URL pattern box there will be an option that says forwarding, it will be auto selected as 'off'. If you click it then it should go to on. This will bring up a box to enter the destination URL. In that box you'll need to enter the following, but editing USERNAME and URL to your thehabbos username and your hotels URL.
HTML:
http://votingapi.com/vote.php?username=USERNAME&api=http:!!URL!index?novote

It should look something like this.

152lrpl.png

Once you've done all of that click add new rule and it should be done! If you have any problems feel free to ask and I'll try my best to help you.

Peace
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,199
3,934
It's not the best and suitable way to do this, you should just do it how you're supposed to do it, but nice share.
 

Damon

Member
Aug 13, 2012
364
114
Got an error:L
ERROR

Dismiss
Invalid forwarding URL. The URL is malformed or contains illegal characters in the query parameters.

It's not the best and suitable way to do this, you should just do it how you're supposed to do it, but nice share.
and how would that be? :S
 

Find

Posting Freak
Jun 21, 2012
597
189
Got an error:L
ERROR

Dismiss
Invalid forwarding URL. The URL is malformed or contains illegal characters in the query parameters.


and how would that be? :S
Not sure I just did it exactly how I said and it worked fine :s you'll need to take out the .php after index firstly as i didn't think about that + try just doing your domain without /index for the first URL then in the forwarding url just have /index
 

Damon

Member
Aug 13, 2012
364
114
Not sure I just did it exactly how I said and it worked fine :s you'll need to take out the .php after index firstly as i didn't think about that + try just doing your domain without /index for the first URL then in the forwarding url just have /index
Yeah I've done how the steps say it. + Ilve tried puting only /index for the first 1 but still. same
 

Find

Posting Freak
Jun 21, 2012
597
189
I can try help you over teamviewer sometimer if you'd like
 

Default

https://forcehotel.org
Oct 9, 2011
74
16
If you get

ERROR

Invalid forwarding URL. The URL is malformed or contains illegal characters in the query parameters.

Make sure your link is like this

 

Find

Posting Freak
Jun 21, 2012
597
189
If you get

ERROR

Invalid forwarding URL. The URL is malformed or contains illegal characters in the query parameters.

Make sure your link is like this


ya thank you I was meant to update it, I never really made clear in the last bit you have to have ! for every / and stuff, my first tut :up:
 

Zodiak

recovering crack addict
Nov 18, 2011
453
417
This is great for noobs I guess:).
Would be a lot easier to just make a footer.php, and put this in it though:
Code:
<?php include_once ("forcevote.php");
?>
Then make a file called "forcevote.php" and add this in it:
Code:
                <?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=THEHABBOSNAME&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=THEHABBOSNAME&api=http:!!HOTELURL!index?novote");
  exit;
  }
 
}
 
?>
 

Find

Posting Freak
Jun 21, 2012
597
189
This is great for noobs I guess:).
Would be a lot easier to just make a footer.php, and put this in it though:
Code:
<?php include_once ("forcevote.php");
?>
Then make a file called "forcevote.php" and add this in it:
Code:
                <?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=THEHABBOSNAME&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=THEHABBOSNAME&api=http:!!HOTELURL!index?novote");
  exit;
  }
 
}
 
?>
I prefer my method because even if your hotel's server is down it will go to votingapi site before it goes to offline page :)
 
Status
Not open for further replies.

Users who are viewing this thread

Top