Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[CMS] Vote Plugin
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Elo" data-source="post: 47229" data-attributes="member: 4705"><p>Vote plugin for RevCMS</p><p> </p><p>Features:</p><p>Automaticlly discover what url to be sent back to.</p><p>Automaticlly finds you user details in config.php</p><p>Forces the user to vote (no way out).</p><p>Recridts the user automatlicy to votingapi.com</p><p>(and returns to client when done voting)</p><p>If votingapi.com is offline it acts normal</p><p> </p><p>Install:</p><p> </p><p><strong>Step 1:</strong></p><p>Go to <strong>class.core.php </strong>(/app/class.core.php)</p><p>Insert this function called <strong>CheckIfVoted</strong></p><p>[PHP] </p><p>final public function CheckIfVoted($ip) {</p><p> global $_CONFIG;</p><p> $context = stream_context_create(array('http' => array('timeout' => 2)));</p><p> $data = file_get_contents('http://votingapi.com/validate.php?user=' . $_CONFIG["thehabbos"]["username"] . '&ip=' . $_SERVER["REMOTE_ADDR"], 0, $context);</p><p> if(!$data || !is_numeric($data)) {</p><p> echo "<!--[ERROR] System failure in voting system.-->";</p><p> return false;</p><p> } elseif($data == 3) {</p><p> $return = str_replace('/', '!', 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);</p><p> header("Location: http://votingapi.com/vote.php?username=" . $_CONFIG["thehabbos"]["username"] . "&api=" . $return);</p><p> exit;</p><p> }</p><p> }</p><p>[/PHP]</p><p> </p><p>(You need to change your config.php details to make it work)</p><p> </p><p><strong>Step 2:</strong></p><p>Go to <strong>class.template.php </strong>(/app/class.template.php)</p><p>[PHP]Find: $this->setParams('server_ip', $_CONFIG['hotel']['server_ip']);</p><p> </p><p>UNDER Add this code: $this->setParams('votecheck', $core->CheckIfVoted($_SERVER['REMOTE_ADDR']));</p><p>[/PHP]</p><p> </p><p><strong>Step 3:</strong></p><p>You can now add {votecheck} to what page you want the user to vote before he/she watches the content</p><p> </p><p><strong>Download:</strong></p><p>If you dont want to add the codes manually you can download it here:</p><p><a href="http://www.mediafire.com/?o9bmbrplr3j86dt" target="_blank">http://www.mediafire.com/?o9bmbrplr3j86dt</a></p><p> </p><p>Cheers</p><p>-Ole</p></blockquote><p></p>
[QUOTE="Elo, post: 47229, member: 4705"] Vote plugin for RevCMS Features: Automaticlly discover what url to be sent back to. Automaticlly finds you user details in config.php Forces the user to vote (no way out). Recridts the user automatlicy to votingapi.com (and returns to client when done voting) If votingapi.com is offline it acts normal Install: [B]Step 1:[/B] Go to [B]class.core.php [/B](/app/class.core.php) Insert this function called [B]CheckIfVoted[/B] [PHP] final public function CheckIfVoted($ip) { global $_CONFIG; $context = stream_context_create(array('http' => array('timeout' => 2))); $data = file_get_contents('http://votingapi.com/validate.php?user=' . $_CONFIG["thehabbos"]["username"] . '&ip=' . $_SERVER["REMOTE_ADDR"], 0, $context); if(!$data || !is_numeric($data)) { echo "<!--[ERROR] System failure in voting system.-->"; return false; } elseif($data == 3) { $return = str_replace('/', '!', 'http://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); header("Location: http://votingapi.com/vote.php?username=" . $_CONFIG["thehabbos"]["username"] . "&api=" . $return); exit; } } [/PHP] (You need to change your config.php details to make it work) [B]Step 2:[/B] Go to [B]class.template.php [/B](/app/class.template.php) [PHP]Find: $this->setParams('server_ip', $_CONFIG['hotel']['server_ip']); UNDER Add this code: $this->setParams('votecheck', $core->CheckIfVoted($_SERVER['REMOTE_ADDR'])); [/PHP] [B]Step 3:[/B] You can now add {votecheck} to what page you want the user to vote before he/she watches the content [B]Download:[/B] If you dont want to add the codes manually you can download it here: [URL]http://www.mediafire.com/?o9bmbrplr3j86dt[/URL] Cheers -Ole [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[CMS] Vote Plugin
Top