Results 1 to 5 of 5

Thread: Hack to add the link ID to link search page

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

    Default Hack to add the link ID to link search page

    While in the admin center, I wanted to be able to search the links for a specific link ID - hey, I'm an accountant, I like numbers!

    First, add the following to link_search_form.html ( I put mine just before the Title section ):
    <tr class=tbl_light>
    <td>ID: </td>
    <td width=280><input type=text size=10 name=link_id></td>
    </tr>
    Then in link_search.php, find the section like:
    while($i<count($fields)) {
    $field = $fields[$i];

    global $$field;

    if($field=='category_id' && !empty($cat))
    $query .= "and $field = $cat ";
    and right after it add:
    // mod to add the link field
    elseif($field=='link_id' && !empty($link_id))
    $query .= "and $field = $link_id ";
    Finally, you could add &#60;%link_id%&#62; to the link_view_rows.html if you wanted to actually see the ID print ( or just mouseover the [edit] hyperlink on the right ).

    As I recall, that is all that needs to be done.

    BTW, if you add something that will cause multiple pages you will need to adjust the line further down that reads:


    $links_obj->more_param = "&pflag=search&title=$title&url=$url&description=$ description&cat=$cat&contact_name=$contact_name&em ail=$email".$custom_field_param;
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  2. #2
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    Good work esm, although you're an accountant you know php as well.

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

    Default

    Originally posted by dody
    Good work esm, although you're an accountant you know php as well.
    I have never used PHP or SQL before April 28, 2003 when I registered with this forum

    Whatever I have learned, I learned from you. And you have a long way to go to teach me more!

    As I said, I just use the work you have already done as examples.
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  4. #4
    Join Date
    Aug 2003
    Posts
    233

    Default

    will this mod work for 5.1.0 as well ?
    Best
    Lewis
    www.AtoZfitness.com/indexu

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

    Default

    try it a see.



    .
    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

Similar Threads

  1. search page link colours
    By ezykiwi in forum v5.x
    Replies: 2
    Last Post: 08-08-2004, 03:58 AM
  2. what does it mean ?
    By lewisw in forum v5.x
    Replies: 10
    Last Post: 08-29-2003, 02:05 AM
  3. hit hack like search by link id in cp.
    By lewisw in forum v3.2
    Replies: 4
    Last Post: 08-19-2003, 07:55 AM
  4. Change title of the search page results
    By craven in forum v5.x
    Replies: 8
    Last Post: 11-17-2002, 06:58 PM
  5. Replies: 1
    Last Post: 09-01-2002, 11:12 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
  •