I installed site of the day mod on version 3.2. But only one site is displayed daily. What's the problem man. Site of the Day.php {strip} <?php /** # ################################################################################ # # You are free to use and or modify this phpLD Mod, all we ask is that you place # a link on your web site back to ours. # # Developer: Directory Share # Mods List: http://www.directoryshare.com/phpld-mods.php # # ################################################################################ */ if (!file_exists(INSTALL_PATH.'temp/site_of_the_day.txt') || date("Y-m-d",filemtime(INSTALL_PATH.'temp/site_of_the_day.txt'))!=date("Y-m-d")) { do { $rdata=$db->GetRow("SELECT ID FROM `{$tables['link']['name']}` AS t1 FORCE INDEX(PRIMARY) JOIN (SELECT ROUND(RAND() * (SELECT MAX(ID) FROM `{$tables['link']['name']}`)) AS rand_id) AS t2 WHERE t1.ID >= t2.rand_id AND t1.STATUS='2' AND (t1.EXPIRY_DATE >= ".$db->DBDate(time())." OR t1.EXPIRY_DATE IS NULL) ORDER BY t2.rand_id ASC LIMIT 1"); $fp=@fopen(INSTALL_PATH.'temp/site_of_the_day.txt','w+'); @fwrite($fp,$rdata['ID']); @fclose($fp); $sotd=$db->GetRow("SELECT * FROM `{$tables['link']['name']}` WHERE `ID` = ".$rdata['ID']); } while (!is_array($sotd)); } else { $fp=@fopen(INSTALL_PATH.'temp/site_of_the_day.txt',"r"); $fid=@fread($fp,filesize(INSTALL_PATH.'temp/site_of_the_day.txt')); fclose($fp); $sotd=$db->GetRow("SELECT * FROM `{$tables['link']['name']}` WHERE `ID` = ".trim($fid)); } $tpl->assign('sotd',$sotd); ?> PHP:
Do you have more than one site in your database? If so, check the permissions of the /temp/site_of_the_day.txt file and make sure it is writeable (chmod 777) sometimes the file gets created by the server with the wrong permissions so that the data cannot be updated. If that doesn't work send me a PM with your URL so I can take a look at the site.
Be patient man. You replied to SilkySmooth only 3 days ago for help with a free mod. I've waited longer for replies from him when I'm paying and had no problem with it.
Hi SilkySmooth, First of all big thanks for your MOD's. Great job! I have installed the MOD "Split Category Links" and it works fine. Just a small bug in the v3.3 I have found. The description on the title bar is showing as "Company - Details - Array" instead of "Company - Details - Subcategory". Could you help me to fix it, please? Thanks! Regards, Andy