Results 1 to 1 of 1
-
21st Jan 2012, 11:25 PM #1OPMember
convert from wcddl to ddlcms
hi
iam using ddlcms right now and i need help to convert this site rating mode wcddl ---> ddlcms....
<?php
/*BEGIN_INFO
Show the downloads for an specific site.<br />
Show the sitename<br />
Show the arrowup
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'];
if (preg_match('#^[A-Z0-9.-]+\.[A-Z]{2,4}$#i', $core->site)) {
$core->siteSQL = mysql_real_escape_string($core->site);
}
$core->siteSURL = $core->processURL($core->site);
$core->sqlOrder = "views DESC"; //order the downloads list by views, comment if want to show by date
}
function siteDownloads($where) {
global $core;
$sid = mysql_query("SELECT id FROM wcddl_sites WHERE url = '".$core->siteSQL."'");
if(!mysql_num_rows($sid)) {
unset($core->siteSURL); //if no site on db this will be uset can be used to... msgs or something
return $where;
} else {
$sid = mysql_result($sid,0);
if(empty($where))
$where = " WHERE sid = ".$sid;
else
$where = " AND sid = ".$sid;
return $where;
}
}
$core->attachDataHook("fetchDownloadsSQLWhere","siteDown loads");
/*Show the sitename
if doubled replace by arrowup
show the rank
*/
$lastSiteData = "";
function lastSiteData($download) {
global $lastSiteData,$core;
if(empty($download) || !isset($download['title']) || !isset($download['sname']) || !isset($download['surl']))
return $download;
if($download['surl'] == $lastSiteData)
$download['siteLink'] = '<center><img src="./images/arrowup.gif"></center>';
else
$download['siteLink'] = '<center><a href="index.php?site='.$download['surl'].'" target="_blank" title="'.$download['sname'].'">'.$download['sname'].'<img src="./images/rank/'.$download['rate'].'.gif" alt="'.$download['rate'].'" title="Site Rank '.$download['rate'].'"/></a></center>';
$lastSiteData = $download['surl'];
return $download;
}
$core->attachDataHook("fetchDownloadsRow","lastSiteData" );
}
?>wakaski Reviewed by wakaski on . convert from wcddl to ddlcms hi iam using ddlcms right now and i need help to convert this site rating mode wcddl ---> ddlcms.... Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
ddlcms
By shahzadali55 in forum Web Application/Script SupportReplies: 0Last Post: 25th Jun 2011, 03:58 AM -
DDLCMS vs. WCDDL
By Vumto in forum Polling PlazaReplies: 6Last Post: 21st Feb 2010, 10:16 PM -
How to convert a phpBB / Vbulletin theme to WCDDL skin??
By Snell in forum Forum and DDL DiscussionReplies: 10Last Post: 26th Jan 2010, 07:05 PM -
Wcddl vs Ddlcms
By t3od0r in forum Webmaster DiscussionReplies: 4Last Post: 9th Jan 2010, 12:45 PM -
DDLCMS Someone help?
By lonerunner in forum Forum and DDL DiscussionReplies: 18Last Post: 18th Nov 2009, 01:20 AM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...