Great files ! Maybe a Top Voters module sometime soon ?
Printable View
Great files ! Maybe a Top Voters module sometime soon ?
text_module_vote_credits_t1 = ?
text_module_vote_credits_t2 = ?
text_module_vote_credits_t3 = ?
text_module_vote_credits_t4 = ?
text_module_vote_credits_t5 = ?
text_module_vote_credits_t6 = ?
Please add text.
easy, i dont have the time now, but a single query can do this....something like:
$sql= "SELECT TOP 20 "A" FROM "B" ORDER BY "C" DESC";
where:
A = nae or ID, depends on how it's saved.
B = table name where votes are stored.
C = column name for vote quantities storage.
and, of course, you'll need to make a context for this.
maybe in this week i'll make something like this & share it.
For those who has newer version of PHP that don't support php_mssql anymore, one temporary solution is to comment out all mssql lines from :
vote_credits.php
you can rewrite them using adodb too.PHP Code:}else{
$voteid = safe_input($_GET['vid'],'');
foreach ($votef as $vote_dat_re){
$vote_dat_re = explode("?,$vote_dat_re);
if($vote_dat_re[0] == $voteid){
$vote_credits = $vote_dat_re[3];
$vote_link = $vote_dat_re[2];
$vote_id_found = '1';
$vote_id = $vote_dat_re[0];
break;
}
}
if($vote_id_found == '1'){
$select_vote = $core_db->Execute("Select username,vote_time from MUCore_VoteCredits where username=? and vote_id=?",array($user_auth_id,$vote_id));
$make_time_hours = $delay_hours*3600;
$time_vote = time()+$make_time_hours;
if($select_vote->EOF){
$insert_username = $core_db->Execute("insert into MUCore_VoteCredits(vote_id,username,vote_time)VALUES(?,?,?)",array($vote_id,$user_auth_id,$time_vote));
if($insert_username){
$check_memb_acc = $core_db2->Execute("Select memb___id from memb_Credits where memb___id=?",array($user_auth_id));
if($check_memb_acc->EOF){
//$x = mssql_query("Select coupons from MEMB_INFO where memb___id='$user_auth_id'");
//$xx = mssql_fetch_row($x);
//$k = $xx[0]+1;
//mssql_query("Update MEMB_INFO set Coupon = '$k' where memb___id='$user_auth_id'");
$insert_memb_acc = $core_db2->Execute("INSERT INTO MEMB_CREDITS(memb___id,credits)VALUES(?,?)",array($user_auth_id,$vote_credits));
if($insert_memb_acc){
header('Location: '.$vote_link.'');
}else{
echo msg('0',text_module_vote_credits_t2);
}
}else{
//$x = mssql_query("Select coupons from MEMB_INFO where memb___id='$user_auth_id'");
//$xx = mssql_fetch_row($x);
//$k = $xx[0]+1;
//mssql_query("Update MEMB_INFO set Coupon = '$k' where memb___id='$user_auth_id'");
$insert_credits = $core_db2->Execute("Update memb_credits set credits=credits+".$vote_credits." where memb___id=?",array($user_auth_id));
if($insert_credits){
header('Location: '.$vote_link.'');
}else{
echo msg('0',text_module_vote_credits_t2);
}
}
}
}else {
$time_check = $select_vote->fields[1]-time();
if($time_check > 0){
echo msg('0',str_replace("{delay_hours}",$delay_hours,text_module_vote_credits_t3));
}else{
$update_vote_info = $core_db->Execute("Update MUCore_VoteCredits set [vote_time]=$time_vote where username=? and vote_id=?",array($user_auth_id,$vote_id));
if($update_vote_info){
//$x = mssql_query("Select coupons from MEMB_INFO where memb___id='$user_auth_id'");
//$xx = mssql_fetch_row($x);
//$k = $xx[0]+1;
//mssql_query("Update MEMB_INFO set Coupon = '$k' where memb___id='$user_auth_id'");
$insert_credits = $core_db->Execute("Update memb_credits set credits=credits+".$vote_credits." where memb___id=?",array($user_auth_id));
if($insert_credits){
header('Location: '.$vote_link.'');
}else{
echo msg('0',text_module_vote_credits_t2);
}
}
}
}
}
}
}
hello all, what can someone tell me how to fix this?
Attachment 135070
Vote not working in Dmn Webshop :(
Thanks, work great :)
When I click vote it just reloads the page, if i click vote again it redirects me to a wierd url and doesn't take me to the extremetop100 page - it logs the IP but doesn't add the credits??
it works, but it add the credits even if u dont vote, it adds the credits when u press vote in the website, not when u really have voted in xtreemtop100( for example)
It dont work, u get the 20 point witouth voting...
PLease someone help me with this PLEASE!!!
how can i fix this please >>> "text_module_vote_credits_t4 : 20" mucore 1.0.8
maybe a stupid question but ...
when i connect using ODBC my website is working
when i try using MSSQL i get an sql connection error (the mssql extension is unabled at php.ini) so that isnt it
with ODBC the host is like
$core['db_host'] = "127.0.0.1";
what about mssql ?
$core['db_host'] = "127.0.0.1"; or $core['db_host'] = "hostname"; ?
Guide donr work on the files can someone give me guide?thanks.