(#1)
c0rrupt Offline
Administrator
 
Posts: 185
Join Date: Mar 2010
Location: Canada
Site Rating MOD - 02-17-2011, 12:55 AM

This MOD was made by frontlinegamerz, and it was in his forum warezwitch, but has its down for some time I decided to post it here...

Backup Your funcs.php file before you install this mod!

SQL STATEMENTS
Code:
$sql = "ALTER TABLE `wcddl_sites` ADD `emailsubmit` TEXT NOT NULL";
$sql = "ALTER TABLE `wcddl_sites` ADD `rate` TEXT NOT NULL";
Open funcs.php

Line 152 +-
Find:
Code:
$downloadSite = mysql_query("SELECT name as sname, url as surl, FROM wcddl_sites WHERE id = '".$row['sid']."'");
Replace with:
Code:
$downloadSite = mysql_query("SELECT name as sname, url as surl, rate as srate FROM wcddl_sites WHERE id = '".$row['sid']."'");
Find the func admin queue():

Delete all and replace with :
Code:
protected function admin_queue() {
        if(isset($_POST['url']))
            $url = $_POST['url'];
            if(isset($_POST['emailsubmit']))
            $emailsubmit = $_POST['emailsubmit'];
            if(isset($_POST['rate']))
            $rate = $_POST['rate'];
        if(isset($_POST['sitesub']))
            $sitesub = $_POST['sitesub'];
        if(isset($sitesub)) {
            @mysql_query("UPDATE wcddl_sites SET emailsubmit='$emailsubmit', rate='$rate' WHERE url='$url'");
            echo 'Notes added.';
                }
            echo '<form action="" method="post"><table width="100%">
        <tr><td align="center">Add Notes to Sites</td></tr>
        <tr><td align="center">URL<input type="text" name="url">Date/Notes<input type="text" name="emailsubmit">Rating:<input type="text" name="rate"></td></tr>
        <tr><td align="center"><input type="submit" value="Make Note" name="sitesub"></td></tr></table></form><br>';                   
        if(isset($_POST['asub']) && isset($_POST['ad']) && !empty($_POST['ad'])) {
            foreach($_POST['ad'] as $addKey => $addVal) {
                $fetch = mysql_query("SELECT sid,title,type,url FROM wcddl_queue WHERE id = '".mysql_real_escape_string($addVal)."'");
                $fetch = mysql_fetch_assoc($fetch);
                mysql_query("DELETE FROM wcddl_queue WHERE id = '".mysql_real_escape_string($addVal)."'");
                mysql_query("INSERT INTO wcddl_downloads (sid,title,type,url,dat) VALUES ('".$fetch['sid']."','".$fetch['title']."','".$fetch['type']."','".$fetch['url']."','".time()."')");
            }
        }
        if(isset($_POST['dsub']) && isset($_POST['ad']) && !empty($_POST['ad'])) {
            foreach($_POST['ad'] as $delKey => $delVal) {
                mysql_query("DELETE FROM wcddl_queue WHERE id = '".mysql_real_escape_string($delVal)."'");
            }
        }
        if(isset($_POST['ucsub']) && isset($_POST['rmuc'])) {
            if(strpos($_POST['rmuc'],",") === false)
            mysql_query("DELETE FROM wcddl_queue WHERE id = '".mysql_real_escape_string($_POST['rmuc'])."'");
            else {
            $rmuc = explode(",",$_POST['rmuc']);
                foreach($rmuc as $rmucID)
                mysql_query("DELETE FROM wcddl_queue WHERE id = '".mysql_real_escape_string($rmucID)."'");
            }
        }
        $get = mysql_query("SELECT q.id,q.sid,q.title,q.type,q.url FROM wcddl_queue q LEFT JOIN wcddl_sites s ON (s.id = q.sid) ORDER BY s.rate ASC");
        $unclean = array();
        echo '<form action="" method="post" name="queue"><table width="100%">
        <tr><td>Type</td><td>Title</td><td>Site</td><td>Email</td><td>Emailsubmit</td><td>rating</td><td>Select</td><td>Cleanliness</td></tr>';
        while($got = mysql_fetch_assoc($get)) {
            $site = mysql_query("SELECT name as sname, url as surl,email,emailsubmit,rate FROM wcddl_sites WHERE id = '".mysql_real_escape_string($got['sid'])."' LIMIT 1");
            $site = mysql_fetch_assoc($site);
            $got = array_merge($site,$got);
            $got = $this->mapit($got,array("stripslashes"));
            unset($hack);
                foreach($got as $check) {
                    if($check != strip_tags($check)) {
                    $unclean[] = $got['id'];
                    $hack = '<span style="color:#FF0000;">UNCLEAN</span>';
                    }
                }
                if(!isset($hack))
                $hack = '<span style="color:green;">CLEAN</span>';
            $got = $this->mapit($got,array("strip_tags"));
            echo '<tr>
            <td>'.$got['type'].'</td>
            <td><a href="'.$got['url'].'" target="_blank">'.$got['title'].'</a></td>
            <td><a href="http://'.$got['surl'].'" target="_blank">'.$got['sname'].'</a></td>
            <td><a href="mailto:'.$got['email'].'?subject=Dark DDL Submissions&body=">'.$got['email'].'</a></td>
            <td>'.$got['emailsubmit'].'</td>
            <td>'.$got['rate'].'</td>
            <td><input type="checkbox" name="ad[]" value="'.$got['id'].'"></td>
            <td>'.$hack.'</td>
            </tr>';
        }
        echo '<tr>
        <td><input type="submit" value="Accept Selected" name="asub"></td>
        <td><input type="submit" value="Delete Selected" name="dsub"></td>
        <td><input type="button" value="Select All" id="sbutton" onclick="jamez();"></td>';
        if(isset($unclean[0]))
            echo '<td><input type="hidden" value="'.implode(",",$unclean).'" name="rmuc"><input type="submit" value="Remove Unclean" name="ucsub"></td>';
        echo '</tr>';
        echo '</table></form>';
    }
Open index.php and find:
Code:
<tr><td>Type</td><td><strong>Title</strong></td><td>Views</td><td>Rating</td></tr>
Replace with:
Code:
<tr><td>Type</td><td><strong>Title</strong></td><td>sites</td><td></td><td>Views</td><td>Rating</td></tr>
Find:
Code:
<tr><td><?=$dl['type']?></td><td><a href="download.php?id=<?=$dl['id']?>"><?=$dl['title']?></a></td><td><?=$dl['views']?></td><td><?=$dl['rating']?></td></tr>
Replace with:
Code:
<tr><td><?=$dl['type']?></td><td><a href="download.php?id=<?=$dl['id']?>"><?=$dl['title']?></a></td><td><center><a href="http://<?=urlencode($dl['surl'])?>"><?=$dl['sname']?></a></center></td><td><?=$dl['srate']?></td><td><?=$dl['views']?></td><td><?=$dl['rating']?></td></tr>
on line 3 put make sure this is what is there
Code:
$downloads = $core->fetchDownloads(true);
================================================== =======

To rate sites login to the Admin panel.. Go to Queue and you will see the options to rate sites.


Before doing any edits to your DDL Site always make a BACKUP first.
(#2)
c0rrupt Offline
Administrator
 
Posts: 185
Join Date: Mar 2010
Location: Canada
02-17-2011, 09:58 AM

110% + rep


Before doing any edits to your DDL Site always make a BACKUP first.
(#3)
muscles68 Offline
 
Posts: 2
Join Date: Feb 2011
Location: uk ipswich
02-17-2011, 06:09 PM

This mod is good and yes it does work but i hated having two tables as i use the up arrow mod. i tried dif configs but just could not get it neat, id say this is good if you dont use the up arrow mod.


I will help where I can and share what I want to
(#4)
Chris2k Offline
 
Posts: 2
Join Date: Mar 2011
03-04-2011, 04:58 PM

finally done it 4hrs l8r lol btw there is a code error ^^^^^^^^^^^^^^
(#5)
WJManiaC Offline
 
Posts: 12
Join Date: Dec 2011
12-25-2011, 02:12 AM

Hello guys it works and all but i was wondering how you can get it close because its 2 far apart. i posted an imaged below.

(#6)
c0rrupt Offline
Administrator
 
Posts: 185
Join Date: Mar 2010
Location: Canada
12-25-2011, 04:05 AM

For the last edit try this.
PHP Code:
<tr><td><?=$dl['type']?></td><td><a href="download.php?id=<?=$dl['id']?>"><?=$dl['title']?></a></td><td><center><?=$dl['srate']?><a href="http://<?=urlencode($dl['surl'])?>"><?=$dl['sname']?></a></center></td><td><?=$dl['views']?></td><td><?=$dl['rating']?></td></tr>
(#7)
WJManiaC Offline
 
Posts: 12
Join Date: Dec 2011
12-25-2011, 04:34 AM

Quote:
Originally Posted by c0rrupt
For the last edit try this.
PHP Code:
<tr><td><?=$dl['type']?></td><td><a href="download.php?id=<?=$dl['id']?>"><?=$dl['title']?></a></td><td><center><?=$dl['srate']?><a href="http://<?=urlencode($dl['surl'])?>"><?=$dl['sname']?></a></center></td><td><?=$dl['views']?></td><td><?=$dl['rating']?></td></tr>
I have a question does this mod go with the other one because im getting an error.
(#8)
WJManiaC Offline
 
Posts: 12
Join Date: Dec 2011
12-25-2011, 11:37 PM

K i got it to works but now it loos like this how can i fix it plz.



and how can i add a up arrow so it wont repeat the site ?

Last edited by WJManiaC; 12-26-2011 at 02:05 AM.
(#9)
c0rrupt Offline
Administrator
 
Posts: 185
Join Date: Mar 2010
Location: Canada
12-27-2011, 04:39 PM

Looks like you have an extra column in your download table.

If you can provide a link to your site it would be easier to help
(#10)
WJManiaC Offline
 
Posts: 12
Join Date: Dec 2011
12-28-2011, 12:06 AM

My site is Piratesddl.co.cc , if you have msn ill be on.

Bookmarks

Tags
mod, rating, site, wcddl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin


Content Relevant URLs by vBSEO