Forum

Questions and discussions

Change Advance Search Link

Discuss template's customization

Change Advance Search Link

Postby User21444 » Sat Apr 16, 2011 11:59 am

Hey Guys

I just have videos so when a person clicks on "Advanced Search" I'd like it to point to MySite.com/advanced_search.php?d=2 (shows the search for videos only) and not MySite.com/advanced_search.php (shows the search for all items). Any tips on where I need to update the link? I went through the header but I couldn't seem to find the right spot to change it. I just need to add ?d=2 to the link.

Thanks!
User21444
 
Posts: 45
Joined: Tue Sep 14, 2010 10:23 pm

Re: Change Advance Search Link

Postby lucy » Sat Apr 16, 2011 4:59 pm

The easiest solution: add line: $d=2; at the begining of advanced_search.php :)
lucy
 
Posts: 144
Joined: Mon Apr 12, 2010 2:52 pm

Re: Change Advance Search Link

Postby User21444 » Sun Apr 17, 2011 2:52 am

I think it should be something located in the header which is there the link pointing to advanced_search.php is, no? I just can't find exactly where the link is in the header. I see a few different referenced to advanced_search but I don't know which one is the link specifically.
User21444
 
Posts: 45
Joined: Tue Sep 14, 2010 10:23 pm

Re: Change Advance Search Link

Postby funmediapicture » Sun Apr 17, 2011 6:21 pm

Hello,

lucy has right. But this are already exists.

In advanced_search.php after: <?include("../inc/header.php");?>

you found this entry:

$d=1;
if(isset($_GET["d"])){$d=$_GET["d"];}
if($d==""){$d=1;}

Change the first $d=1; to $d=2;

If you want that it's pointing always to video also when the link with the d= are
empty, so change also:

if($d==""){$d=1;}

to:

if($d==""){$d=2;}


The links are defined at the bottom of the page:

<li <?if($d==2){echo("class='activno'");}?>><a href="advanced_search.php?d=2"><?=word_lang("video")?></a></li>

and

<?if($d==2){include("advanced_search_video.php");}?>


If you will not modify advanced_search.php but only insert the d=2 into the link.
This are stored in:

template/box_search.tpl

demo link from template 16

<div id="search_advanced"><a href="{SITE_ROOT}members/advanced_search.php" class="small">{WORD_ADVANCED_SEARCH}</a></div>

Greetings
Alfred
funmediapicture
 
Posts: 73
Joined: Tue Apr 27, 2010 2:45 pm

Re: Change Advance Search Link

Postby User21444 » Mon Apr 18, 2011 1:09 pm

P-E-R-F-E-C-T!

I used the last option. Now when members click on "Advanced Search" in the header it only pulls up the advanced search options for videos, which is the only kind of media I have.

Thanks!
User21444
 
Posts: 45
Joined: Tue Sep 14, 2010 10:23 pm


Return to Design & Templates

Who is online

Users browsing this forum: No registered users and 1 guest

cron
  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  Support
  CMSaccount Inc.