[Aphrodite MC] - Search the forum your viewing.

Specific instructions on how to apply certain mods to certain styles.

Moderator: Moderators

[Aphrodite MC] - Search the forum your viewing.

Postby UseLess on Fri May 26, 2006 10:18 pm

Greetings,

With the search box being the in the 'overall_header.tpl' it normally searches the whole forum, the following changes will allow you to search the forum your viewing. Or the whole forum if viewing the index page.

Code: Select all
#
#-----[ OPEN ]-------------------------------------------------------
#

templates/aphrodite_mc/overall_header.tpl

#
#-----[ FIND ]-------------------------------------------------------
#

   <td class="forum-header header-search" align="right" valign="bottom">
      <form action="{U_SEARCH}" method="get"><input name="search_keywords" type="text" class="post" style="width: 100px;" /> <input type="submit" class="liteoption" value="{L_SEARCH}" /></form>
   </td>

#
#-----[ REPLACE WITH ]-----------------------------------------------
#

   <td class="forum-header header-search" align="right" valign="bottom">
      <form action="{AMC_SEARCH_INDEX}" method="POST"><input name="show_results" type="hidden" value="topics" /><input type="hidden" name="search_forum" value="{AMC_SEARCH_FORUM}" /><input type="hidden" name="search_fields" value="all"><input type="hidden" name="search_terms" value="all"><input name="search_keywords" type="text" class="post" style="width: 100px;" /> <input type="submit" class="liteoption" value="{L_SEARCH}" /></form>
   </td>

#
#-----[ OPEN ]-------------------------------------------------------
#

templates/aphrodite_mc/aphrodite_mc.cfg

#
#-----[ FIND ]-------------------------------------------------------
#

   'TPL_COLOR' => $color
   ));

#
#-----[ REPLACE WITH ]-----------------------------------------------
#

   'TPL_COLOR' => $color,
   // search stuff
   'AMC_SEARCH_INDEX'   => append_sid('search.php?mode=results'),
   'AMC_SEARCH_FORUM'   => isset($forum_id) ? $forum_id : '-1',
   ));

#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------------
#
# EoM
Movie Quote:
It's not the years honey, it's the mileage...

I do not provide any install services for phpBB, Mods or Styles.
Please do not pm me for support/scripting help - you won't get any reply. If you have a question then make a post in the appropriate forum.
User avatar
UseLess
Registered User
Registered User
 
Posts: 6220
Joined: Mon Sep 27, 2004 2:14 am
Location: North East, UK

Postby Florian Schmidt on Sat Jul 22, 2006 10:06 pm

...very nice, by altering the "global" line in original aphrodite with the arguments in aphrodite_mc, it works for this template, too :-)

EDIT: Is there a way to alter that for topic-view, too?
User avatar
Florian Schmidt
Registered User
Registered User
 
Posts: 157
Joined: Tue Jan 11, 2005 7:53 am
Location: Germany - St. Blasien


Return to How to mod some styles

Who is online

Users browsing this forum: No registered users and 1 guest