Author Topic: Search mode  (Read 8607 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Search mode
« on: March 28, 2005, 10:34:49 AM »
When you search for any image you'll get at the end of the thumbnail link this code:
&mode=search

Is it possible to erase that?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Search mode
« Reply #1 on: March 28, 2005, 02:25:44 PM »
this was made so next/previos images would be from the search result, not from the category the image is on.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
Re: Search mode
« Reply #2 on: July 26, 2005, 07:19:46 PM »
Open includes/functions.php

Find:
Code: [Select]
if ($show_link) {
    if ($open_window) {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
    }
    else {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
    }
  }
  return $thumb;
}

Replace with:
Code: [Select]
if ($show_link) {
   if ($open_window) {
     $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
   }
   else {
     $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id)."\">".$thumb."</a>";
   }                                 
 }
 return $thumb;
}

The change is here...
$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."

It is the only solution that I have found for the [MOD] Photo Preview Hack