Jump to content
  • 0
Sign in to follow this  
Paramore

Runelocus callback [help]

Question

This is my Callback link in the admincp for Runelocus.

[code]http://www.runelocus.com/top-rsps-list/vote-39986-AnnihilatedPkerz%20-%20Pking%20Server/?i=[/code]

I tried this link too.
[code]http://www.runelocus.com/toplist/vote-39986-ANNIHILATEDPKERZ/[/code]

And this is the Runelocus Callback URL.

[code]http://www.annihilatedpkerz.com/vote/php/callback.php[/code]

i also tried

[code]http://annihilatedpkerz.com/vote/php/callback.php[/code]

and this callback aswell.

[code]http://annihilatedpkerz.com/vote/php/callback.php?callback=[/code]

and ofc this

[code]
http://www.annihilatedpkerz.com/vote/php/callback.php?callback=[/code]

idk if the www. makes a difference but anyways ive tried it and nothing.
Yet it keeps saying, please vote on all Links. Wuuht? Edited by Paramore

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 0
Are you dumb?
That voting system revision is for 718+
Not for 317

Share this post


Link to post
Share on other sites
  • 0
[quote name='shershah1']Are you dumb?
That voting system revision is for 718+
Not for 317[/QUOTE]

Dude wtf are you talking about, my votes have been working for my server for the past week.It works on 3 other rsps forum sites. I just dont have the callback for runelocus or at least know what it should be. And that's what i'm asking here for about. I got everything setup besides the runelocus callback which i don't know what it should be.

*fp* with your 3 post counts.
[code]
[GTLVote V1.1] Settings initializing...
[GTLVote V1.1] Connected to the database
[10/18/14 12:02 PM]: Server loading...
[10/18/14 12:02 PM]: Server finished loading.
[10/18/14 1:09 PM]: [GTLVote V1.1] Paradox has voted and been rewarded with rewa
rd id: 1.[/code] Edited by Paramore

Share this post


Link to post
Share on other sites
  • 0
[quote name='shershah1']Are you dumb?
That voting system revision is for 718+
Not for 317[/QUOTE]

You clearly know nothing.

Are you sure the users ID are getting set via $_GET method? (I think it uses that any way, not looked into it fully) but to my understanding it returns $_GET after voting.

Also, paste in whats in your callback.php, and be sure to obviously remove anything private IE passwords.

Share this post


Link to post
Share on other sites
  • 0
[quote name='Daedalus']You clearly know nothing.

Are you sure the users ID are getting set via $_GET method? (I think it uses that any way, not looked into it fully) but to my understanding it returns $_GET after voting.

Also, paste in whats in your callback.php, and be sure to obviously remove anything private IE passwords.[/QUOTE]

this is what i have and haven't changed a thing in it. Quoting it kuz the code is too small to read.

[quote name='Daedalus']
<?php include("../classes/vote.class.php");$v = new VoteClass();if (isset($_GET['callback'])) {$v->setSiteVoted($_GET['callback'], 100);mysql_query("DELETE FROM `failed_votes` WHERE `type`='0'");} elseif(isset($_GET['usr']) && $v->ActiveCallback(2)) {$v->setSiteVoted($_GET['usr'], 102);mysql_query("DELETE FROM `failed_votes` WHERE `type`='2'");}[/quote]

[code]<?php include("../classes/vote.class.php");$v = new VoteClass();if (isset($_GET['callback'])) {$v->setSiteVoted($_GET['callback'], 100);mysql_query("DELETE FROM `failed_votes` WHERE `type`='0'");} elseif(isset($_GET['usr']) && $v->ActiveCallback(2)) {$v->setSiteVoted($_GET['usr'], 102);mysql_query("DELETE FROM `failed_votes` WHERE `type`='2'");}[/code]

Share this post


Link to post
Share on other sites
  • 0
This is what I made a few months ago && you should have no problems with it if you choose to use it. You will have to edit some things though and provide your own database connection.

vhandler.class.php
[code]
<?php

class vhandler {

private $player;

/*
@[B][URL="http://www.runelocus.com/forums/member.php?u=75098"]Para[/URL][/B]m SiteName
@[B][URL="http://www.runelocus.com/forums/member.php?u=75098"]Para[/URL][/B]m VoteInterval
*/
private $sites = array(
array("Runelocus", 12),
array("************", 24),
array("Rune-Toplist", 12),
array("Top-100-Arena", 12),
array("SolveMedia", 12)
//array("adfly", 24)
);

public function __construct($player){
$this->player = $player;
db_connect(0);
}

public function getStatusMessage($site) {
$site = $this->getSite($site);
if ($site) {
if ($this->canVote($site[0])) {
return "You can vote here.";
} else {
return $site[0]." has a voting interval of ".$site[1]." hours. You must wait.";
}
}
return "Null";
}

public function canVote($site) {
$site = $this->getSite($site);
if ($site) {
$rs = mysql_query("SELECT * FROM votes WHERE username='".$this->player."-".strtolower($site[0])."'");
if ($data = mysql_fetch_array($rs)) {
$current = strtotime(date("Y-m-d H:i:s"));
$previous = strtotime($data['data']);
if ((floor(($current - $previous) / 60 / 60) - 1) >= intval($site[1])) {
return true;
}
} else {
return true;
}
}
return false;
}

public function addCredit($site) {
if ($this->canVote($site)) {
$site = strtolower($this->getSite($site));
$site[0] = strtolower($site[0]);
$data = mysql_fetch_array(mysql_query("SELECT * FROM votes WHERE username='".$this->player."-".$site[0]."'"));
if ($data) {
mysql_query("UPDATE votes SET data=DEFAULT WHERE username='".$this->player."-".$site[0]."'");
} else {
mysql_query("INSERT INTO votes VALUES('".$this->player."-".$site[0]."', DEFAULT);");
}
mysql_query("UPDATE playerdata SET credits=credits+1 WHERE username='".$this->player."'");
error_log("[".date('F jS - g:i:sa e')."] ".$site[0]." - Username: ".$this->player."\n", 3, $_SERVER['DOCUMENT_ROOT']."/assets/logs/voting.log");
}
}

private function getSite($site) {
foreach ($this->sites as $i) {
if (strcasecmp($i[0], $site) == 0) {
return $i;
}
}
}

}


?>



[/code]

[B]Callback file:[/B]
Where $site is the array key, ex: runelocus, runeserver, solvemedia, top-100-arena. As listed in above class.
[code]
include($_SERVER['DOCUMENT_ROOT']."/assets/lib/vhandler.php");
$vhandler = new vhandler($username);
$vhandler->addCredit($site);
[/code]

[B]SQL:[/B]
Field = username, type = VARCHAR(50), primary key.
Field = data, type = TIMESTAMP, default value = CURRENT_TIMESTAMP

Share this post


Link to post
Share on other sites
  • 0
[quote name='Hope']This is what I made a few months ago && you should have no problems with it if you choose to use it. You will have to edit some things though and provide your own database connection.

vhandler.class.php
[code]
<?php

class vhandler {

private $player;

/*
@[B][URL="http://www.runelocus.com/forums/member.php?u=75098"]Para[/URL][/B]m SiteName
@[B][URL="http://www.runelocus.com/forums/member.php?u=75098"]Para[/URL][/B]m VoteInterval
*/
private $sites = array(
array("Runelocus", 12),
array("************", 24),
array("Rune-Toplist", 12),
array("Top-100-Arena", 12),
array("SolveMedia", 12)
//array("adfly", 24)
);

public function __construct($player){
$this->player = $player;
db_connect(0);
}

public function getStatusMessage($site) {
$site = $this->getSite($site);
if ($site) {
if ($this->canVote($site[0])) {
return "You can vote here.";
} else {
return $site[0]." has a voting interval of ".$site[1]." hours. You must wait.";
}
}
return "Null";
}

public function canVote($site) {
$site = $this->getSite($site);
if ($site) {
$rs = mysql_query("SELECT * FROM votes WHERE username='".$this->player."-".strtolower($site[0])."'");
if ($data = mysql_fetch_array($rs)) {
$current = strtotime(date("Y-m-d H:i:s"));
$previous = strtotime($data['data']);
if ((floor(($current - $previous) / 60 / 60) - 1) >= intval($site[1])) {
return true;
}
} else {
return true;
}
}
return false;
}

public function addCredit($site) {
if ($this->canVote($site)) {
$site = strtolower($this->getSite($site));
$site[0] = strtolower($site[0]);
$data = mysql_fetch_array(mysql_query("SELECT * FROM votes WHERE username='".$this->player."-".$site[0]."'"));
if ($data) {
mysql_query("UPDATE votes SET data=DEFAULT WHERE username='".$this->player."-".$site[0]."'");
} else {
mysql_query("INSERT INTO votes VALUES('".$this->player."-".$site[0]."', DEFAULT);");
}
mysql_query("UPDATE playerdata SET credits=credits+1 WHERE username='".$this->player."'");
error_log("[".date('F jS - g:i:sa e')."] ".$site[0]." - Username: ".$this->player."\n", 3, $_SERVER['DOCUMENT_ROOT']."/assets/logs/voting.log");
}
}

private function getSite($site) {
foreach ($this->sites as $i) {
if (strcasecmp($i[0], $site) == 0) {
return $i;
}
}
}

}


?>



[/code]

[B]Callback file:[/B]
Where $site is the array key, ex: runelocus, runeserver, solvemedia, top-100-arena. As listed in above class.
[code]
include($_SERVER['DOCUMENT_ROOT']."/assets/lib/vhandler.php");
$vhandler = new vhandler($username);
$vhandler->addCredit($site);
[/code]

[B]SQL:[/B]
Field = username, type = VARCHAR(50), primary key.
Field = data, type = TIMESTAMP, default value = CURRENT_TIMESTAMP[/QUOTE]

The thing is, idk where to da heck to add deees. I only knew how to set up the votes, gtl, etc. It's just runelocus callback i'm have problems with.
There a link on how to do the runelocus callback? Or you can add me on skype: kk_killah, look for the name paradox. Thnkx.

Share this post


Link to post
Share on other sites
  • 0
[url]http://www.runelocus.com/tutorials/callback-installation/[/url]

Share this post


Link to post
Share on other sites
  • 0
[quote name='Hope'][url]http://www.runelocus.com/tutorials/callback-installation/[/url][/QUOTE]

Hey hope, I did the tutorial. But it still says "please vote on all links" I did step by step and still something is wrong. could you help me out please? Or someone here that knows how to do it come help me please? Thnkx. Skype name: kk_killah, look for the name paradox. Hope, I also messaged you on skype, but you still haven't replied back.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×