Show the downloads for a specific site (WCDDL v2)
Author Message
c0rrupt
Administrator


Posts: 261
Joined: Mar 2010
Post: #1
Show the downloads for a specific site (WCDDL v2)
Show the downloads for a specific site (WcDDL V2)

create file: wcddl_site.php
paste inside
PHP Code: (Select All)
<?php
/*BEGIN_INFO
Show the downloads for an specific site.
Stugas-ddl.org
END_INFO*/
if(!defined("WCDDL_GUTS"))
    exit;
        
$modEnabled true//Change to false if don't use
    
if($modEnabled) {    
             if(isset(
$_GET['site'])) {
            
$core->site $_GET['site'];
            
$core->siteSQL mysql_real_escape_string($core->site);
          
$core->siteSURL $core->processURL($core->site);
          
$core->sqlOrder "dat DESC"//order the downloads list by views, comment if want to show by date
        
}
function 
siteDownloads($where) {
    global 
$core $sitenumRows;     
        
$sid mysql_query("SELECT id FROM wcddl_sites WHERE url = '".mysql_real_escape_string($core->site)."'");
        
$core->sitenumRows mysql_num_rows($sid);
        if(!
mysql_num_rows($sid))
            return 
$where;
        
$sid mysql_result($sid,0);
        if(empty(
$where))
            
$where " WHERE sid = ".$sid;
        else
            
$where " AND sid = ".$sid;
    
    return 
$where;
}
$core->attachDataHook("fetchDownloadsSQLWhere","siteDownloads");
}
?>
save and upload to modules folder

open: index.php

find:
PHP Code: (Select All)
<?php
include "funcs.php";
$downloads $core->fetchDownloads();
?>

replace with:
PHP Code: (Select All)
<?php
include "funcs.php";
$downloads $core->fetchDownloads(true,false);
?>

find:
PHP Code: (Select All)
<td>Rating</td></tr

replace with:
PHP Code: (Select All)
<td>Provided by</td><td>Rating</td></tr

find:
PHP Code: (Select All)
<td><?=$dl['rating']?></td></tr> 

replace with:
PHP Code: (Select All)
<td><a href="index.php?site=<?=$dl['surl']?>"  target="_blank"><?=$dl['sname']?></a></td><td><?=$dl['rating']?></td></tr> 


Screen Shot:








mod by jomasaco.
(This post was last modified: 07-26-2012 04:36 PM by c0rrupt.)
07-26-2012 04:35 PM
 


Messages In This Thread
Show the downloads for a specific site (WCDDL v2) - c0rrupt - 07-26-2012 04:35 PM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  List Updated Last Time (WCDDL V2) c0rrupt 0 51 07-23-2012 02:49 PM
Last Post: c0rrupt
  Site Rating MOD c0rrupt 7 425 12-27-2011 07:06 PM
Last Post: WJManiaC
  Show site Downloads/Rank [module] c0rrupt 9 554 12-25-2011 01:41 AM
Last Post: WJManiaC
  [WCDDL] Download Provider Mod immu 2 202 09-25-2011 01:16 AM
Last Post: linkstar
  WcDDL BackLink c0rrupt 1 255 09-17-2011 12:57 PM
Last Post: linkstar
  [WCDDL] Colored Category Titles Mod immu 1 133 09-17-2011 12:46 PM
Last Post: linkstar
  Clean blank downloads (Automatically) immu 2 182 02-05-2011 06:20 PM
Last Post: c0rrupt
  Amount of Downloads in Graph c0rrupt 9 332 11-15-2010 01:34 PM
Last Post: nYXem
  Show Top 10 Downloads by Views [module] c0rrupt 0 112 11-07-2010 02:19 PM
Last Post: c0rrupt
  Admin Blacklist remove site downs or not c0rrupt 0 163 11-07-2010 02:17 PM
Last Post: c0rrupt



User(s) browsing this thread: 1 Guest(s)