Results 1 to 4 of 4

Thread: View Top 20 Sites in Admin Section

  1. #1
    Join Date
    Apr 2003
    Location
    NY
    Posts
    331

    Default View Top 20 Sites in Admin Section

    1) in admin/summery.php

    add code at the end of the top categories code after the } around line 169

    Code:
    // top listings
    	
      $query = "select title, hits from idx_link where hits > 0 order by hits desc";
      $result = $conn->Execute($query);
      $total = $result->RecordCount();
    	
    	$number=$i=0;
    	while($i<20 && $i<$total) {
    	
    	  $result->move($i);
    	  $cid = $result->Fields("category_id");
          $hits = $result->Fields("hits");
    	  $title = $result->Fields("title");
    	  $url = $result->Fields("url");
    		
    		if($i%2) $tbl_class = "tbl_light";
    		else $tbl_class = "tbl_light2";
    		
    		$number++;
    	
    		$top_listings_by_hits .= "
    		  <tr class=$tbl_class>
    			  <td align=left width=15>$number.</td>
    				<td align=left><a href=$url>$title</a></td>
    				<td align=right>$hits</td>
    			</tr>
    		";
    		$i++;
    	}

    then in admin_tpl add to the summery.html
    Code:
    <!-- top listings -->
    
    <table cellpadding='1' cellspacing='0' border='0' align='center' width='90%' class=tbl_border>
    <tr>
      <td>
        <table cellpadding='4' cellspacing='0' border='0' width='100%'>
          <tr>
            <td class=tbl_caption colspan="4">Top listings by hits       </td>
          </tr>
    			
    			<%top_listings_by_hits%>
    			
        </table>    
      </td>
    </tr>
    </table>
    
    <p>&nbsp;
    <!-- top listings -->

  2. #2
    Join Date
    Apr 2002
    Posts
    351

    Default

    Many thanks for the contribution.

    It is always appreciated.

  3. #3
    Join Date
    Jul 2002
    Posts
    189

    Default

    Hello persut,

    you might have a look at:
    http://www.nicecoder.com/community/s...?threadid=1308

    greets
    --------- applying hacks require a knack ---------

  4. #4
    Join Date
    Apr 2003
    Location
    NY
    Posts
    331

    Default

    basicly thats what i did(from other post), but i also created a new page for top 100 of each website and listing. and added links in the summery page.

Similar Threads

  1. Admin Login Problems
    By jwnes in forum v5.x
    Replies: 3
    Last Post: 06-06-2005, 08:32 PM
  2. Replies: 9
    Last Post: 01-11-2005, 06:36 PM
  3. Upgrade done...but few problems ????
    By ideavirus in forum v5.x
    Replies: 8
    Last Post: 03-05-2003, 08:34 AM
  4. Admin Login
    By Rob Picken in forum v5.x
    Replies: 1
    Last Post: 12-31-2002, 12:26 PM
  5. Check this out (The Big List)
    By RichardDuboi in forum v3.2
    Replies: 0
    Last Post: 09-29-2002, 01:50 PM

Posting Permissions

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