1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

phpLD Tools & Addons

Discussion in 'Directories' started by SilkySmooth, Feb 23, 2007.

  1. mrkool

    mrkool Active Member

    Messages:
    261
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    85
    #161
    I installed site of the day mod on version 3.2. But only one site is displayed daily. What's the problem man.


    SEMrush
    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:


     
    mrkool, Jan 31, 2009 IP
    SEMrush
  2. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #162
    That is what it is supposed to do, display a random site each day.
     
    SilkySmooth, Feb 1, 2009 IP
  3. mrkool

    mrkool Active Member

    Messages:
    261
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    85
    #163
    I mean to say. Same site is displaying every day.

     
    mrkool, Feb 1, 2009 IP
  4. SilkySmooth

    SilkySmooth Well-Known Member

    Messages:
    1,583
    Likes Received:
    269
    Best Answers:
    0
    Trophy Points:
    180
    #164
    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.
     
    SilkySmooth, Feb 4, 2009 IP
  5. mrkool

    mrkool Active Member

    Messages:
    261
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    85
    #165
    Still the same site today. Currently 21 websites on my database. PM you my website to you.


     
    mrkool, Feb 5, 2009 IP
  6. ihateasianparents

    ihateasianparents Banned

    Messages:
    181
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #166
    Wow the mod is great :D
    One site daily.
    *installing it*
    :D
     
    ihateasianparents, Feb 7, 2009 IP
  7. mrkool

    mrkool Active Member

    Messages:
    261
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    85
    #167
    Nobody is here to help me?


     
    mrkool, Feb 7, 2009 IP
  8. syted

    syted Notable Member

    Messages:
    2,086
    Likes Received:
    319
    Best Answers:
    0
    Trophy Points:
    290
    #168
    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.
     
    syted, Feb 8, 2009 IP
  9. mrkool

    mrkool Active Member

    Messages:
    261
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    85
    #169
    Ok, will wait

     
    mrkool, Feb 8, 2009 IP
  10. Andy707

    Andy707 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #170
    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
     
    Andy707, Jul 16, 2009 IP