Results 1 to 10 of 16
-
21st Jun 2011, 11:26 AM #1OPMemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.orgAuto Site Rating
Hi,
I'm trying to setup an auto site rating for WCDDL. I have used the code from a mod here: http://warezcoders.com/forum/viewtopic.php?f=15&t=1095
PHP Code:if(isset($rsites)) {
mysql_query("UPDATE wcddl_sites SET rating=1");
$get300 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 0,300");
while ($row = mysql_fetch_array($get300)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$row['sid']."'"); }
$get200 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 0,200");
while ($row = mysql_fetch_array($get200)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$row['sid']."'"); }
$get100 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 0,100");
while ($row = mysql_fetch_array($get100)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$row['sid']."'"); }
$getwhite = mysql_query("SELECT url FROM wcddl_whitelist");
while ($row = mysql_fetch_array($getwhite)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where url = '".$row['url']."'"); }
echo '<div align="center" style="color:green;">Sites Rated</div>';
}
But it is just setting all the sites as *4 but none of the sites have even 100 downloads (and none in whitelist hence its not setting then as 5*. As it stands all of the sites should be set as 1*. can anybody tell me whats wrong with the code??DEViANCE Reviewed by DEViANCE on . Auto Site Rating Hi, I'm trying to setup an auto site rating for WCDDL. I have used the code from a mod here: http://warezcoders.com/forum/viewtopic.php?f=15&t=1095 if(isset($rsites)) { mysql_query("UPDATE wcddl_sites SET rating=1"); $get300 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 0,300"); while ($row = mysql_fetch_array($get300)) { mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$row."'"); } Rating: 5
-
21st Jun 2011, 12:47 PM #2BannedWebsite's:
WarezRelease.org ThatHosting.coI think i have a solution so give me a few hours oto solve it asw ive re-written my limit mod, so debugging that btw this ratng thing is easy as pissing and so i was gonna do this modifiction anyway.
-
21st Jun 2011, 12:57 PM #3BannedWebsite's:
WarezRelease.org ThatHosting.cookays ive done it, told ya easy as.
just go to ur DB and run this SQL statement:
Code:ALTER TABLE `wcddl_sites` CHANGE `rate` `rate` VARCHAR( 4 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL
-
21st Jun 2011, 01:07 PM #4OPMemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.orgHi, chris.
I already have it set so sites are rated one on first submission. The code above is for a button in the admin panel that auto rates the sites based on number of downloads but its not working as intended, specifically the code that is not working is:
PHP Code:$get300 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 0,300");
while ($row = mysql_fetch_array($get300)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$row['sid']."'"); }
$get200 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 0,200");
while ($row = mysql_fetch_array($get200)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$row['sid']."'"); }
$get100 = mysql_query("SELECT COUNT(title) AS 'number' , sid FROM wcddl_downloads GROUP BY sid ORDER BY number DESC LIMIT 0,100");
while ($row = mysql_fetch_array($get100)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$row['sid']."'"); }
-
21st Jun 2011, 01:14 PM #5BannedWebsite's:
WarezRelease.org ThatHosting.coi dunno a fix for that as iv never used.
-
21st Jun 2011, 01:22 PM #6OPMemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.orgIts odd, I'm sure I used the same code on a site a couple of years back and it worked ok but this time its acting like all sites have over 300 downloads even when they don't.
I really want to get this working as there is no way I am manually rating sites with the "email me for rerate" method etc.. Once I get this working I'm just gonna change it to something like this:
New Sites = 1*
200+ Downloads = 2*
600+ Downloads = 3*
1200+ Downloads = 3*
3000+ Downloads = 5*
-
21st Jun 2011, 02:58 PM #7BannedWebsite's:
WarezRelease.org ThatHosting.cotry this mod: http://warezcoders.com/forum/viewtopic.php?f=15&t=1110 let me no.
-
21st Jun 2011, 04:03 PM #8OPMemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.org
-
21st Jun 2011, 08:13 PM #9Member
explaining
the above code who was made by moi.
get 100 sites whit higher number of downloads...200...300...400
get sites from whitelist +1
mean if you have 1 site and that are in whitelist will be rank 5 cuz are the in the top 100,200.... and whitelisted.
i did others versions of this but... isn't perfect too who is similar but whit an precentage of sites for each rank based on downloads number too.
PHP Code:$found = mysql_num_rows(mysql_query("SELECT distinct sid FROM wcddl_downloads"));
mysql_query("UPDATE wcddl_sites SET rating = 0");
$get75percent = mysql_query("SELECT COUNT(title) AS number , sid FROM wcddl_downloads GROUP BY sid
ORDER BY number DESC LIMIT 0,".round($found / 100 * 75)."");
echo "<center><b>RANK 1 *</b></center>";
while ($got = mysql_fetch_array($get75percent)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$got['sid']."'");
}
$get50percent = mysql_query("SELECT COUNT(title) AS number , sid FROM wcddl_downloads GROUP BY sid
ORDER BY number DESC LIMIT 0,".round($found / 100 * 50)."");
echo "<center><b>RANK 2 **</b></center>";
while ($got = mysql_fetch_array($get50percent)) {
mysql_query("UPDATE wcddl_sites SET rating= rating+1 where id = '".$got['sid']."'");
}
-
21st Jun 2011, 08:26 PM #10OPMemberWebsite's:
zomgbbqpizza.com evilddl.com scenemarket.org
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
AtomicWarez Site Rating
By Ccucu in forum Forum and DDL DiscussionReplies: 7Last Post: 24th Mar 2011, 12:03 PM -
WCDDL Site Rating
By CyberHacK in forum Web Application/Script SupportReplies: 22Last Post: 8th Apr 2010, 11:09 PM -
joeschatterbox 3* site rating
By leaky_joe in forum Site ReviewsReplies: 8Last Post: 14th Feb 2010, 02:25 PM -
WCDDL Site Rating Mod
By DDLwarez in forum Web Application/Script SupportReplies: 5Last Post: 3rd Feb 2010, 03:11 AM -
Site rating of x-sharezone??
By djay in forum Site ReviewsReplies: 2Last Post: 19th Sep 2008, 08:37 PM
themaLeecher - leech and manage...
Version 4.94 released. Open older version (or...