Results 1 to 6 of 6

Thread: editors pick on index page

  1. #1
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default editors pick on index page

    in the function ShowMainPage of the index.php file:

    change the following:
    Code:
      // mod for $top_links_by_hits
      global $category, $new_links, $hot_links, $login_box, $rec_links, $recomended_listing, $total_link, $total_hits, 
    $total_category, $total_member,$total_milis , $front_picks;
    then after the line "$new_links = $new_links_obj->Display();" insert the following:
    Code:
    // mod for picks on the front page
      $query = "select link_id, title, url from idx_link where pick=1 order by date desc";
      $result = $conn->Execute($query);
      if($result) {
        $total = $result->RecordCount();
    	$number=$i=0;
    	while($i<5 && $i<$total) {
    	  	$result->move($i);
    	  	$lid = $result->Fields("link_id");
    		$title = $result->Fields("title");
    		$url = $result->Fields("url");
    		$number++;
    		$front_picks .= "$number. <a href=detail.php?id=$lid>$title</a><br>";
    		$i++;
        }
      }
    // mod end
    change the following:
    Code:
    // mod for picks on the front page
      DisplayTemplate($theme_path."index.html",
    	  "\$category, \$new_links, \$front_picks,\$hot_links, \$login_box,".
    	"\$rec_links, \$recomended_listing,".
    	"\$total_online, \$members_online, \$guess_online, \$username_online,".
    	"\$total_link, \$total_hits, \$total_category, \$total_member, \$total_milis");
    then in index.html of the themes/default folder, add the following where you want it to print out:
    <%front_picks%>

    to change the number that appears, change the 5 in the line
    Code:
    while($i<5 && $i<$total) {
    haven't tried it, but it seems that it should work
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  2. #2
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default Re: editors pick on index page

    deleted
    Last edited by esm; 08-24-2003 at 07:27 PM.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  3. #3
    Join Date
    Aug 2003
    Posts
    233

    Default

    For me to get it to work I needed to remove the last } before
    // mod end.
    Lewis
    Best
    Lewis
    www.AtoZfitness.com/indexu

  4. #4
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    yep, I also had to add the $front_picks.="</table>"; and the if ($result)
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  5. #5
    Join Date
    Aug 2003
    Posts
    233

    Default

    Esm,
    I would like to have front picks use the go.php instead of detail.php .
    Where would I make this change ?
    best
    Lewis
    Best
    Lewis
    www.AtoZfitness.com/indexu

  6. #6
    Join Date
    Aug 2003
    Posts
    233

    Default

    Never mind.
    Sorry for the stupid question.

    $front_picks .= "$number. <a href=detail.php?id=$lid>$title</a><br>";

    It's in index.php
    Best
    Lewis
    www.AtoZfitness.com/indexu

Similar Threads

  1. Replies: 1
    Last Post: 08-19-2003, 08:40 AM
  2. Replies: 3
    Last Post: 08-14-2003, 10:11 AM
  3. Editor's Pick question
    By bgray in forum v5.x
    Replies: 2
    Last Post: 07-26-2003, 12:18 PM
  4. Editors Pick not working
    By Battousai in forum v5.x
    Replies: 2
    Last Post: 01-23-2003, 08:10 PM
  5. Changing font on main index page
    By jmbishop in forum v5.x
    Replies: 1
    Last Post: 09-20-2002, 11:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •