TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,985
  • Total Topics: 21,321
  • Online today: 814
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 619
  • Total: 619

Remove extended search panel

Started by fak3, May 11, 2009, 01:02:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fak3

Hi. :)
Since I don't use articles and downloads modules I want to remove the extended search panel under index.php?action=search. What file to modify?
I'm using SMF 1.1.8 with the last beta of TP.

Thanks in advance.


You can see the panel I want to remove in the attached screenshot.

EDIT: marked solved!

IchBin

Those layers are loaded from the TP functions in TPortalBlocks.template.php.
function template_TPsearch_above() and function template_TPsearch_below() are the functions that are loaded on the search page.

fak3

If I delete these 2 functions in TPBlocks.template.php, the search page results in
QuoteUnable to load the 'TPsearch_above' template.

:'(

IchBin


fak3

Like this?
function template_TPsearch_above()
{
return;

}
function template_TPsearch_below()
{
return;
}

Ianedres

That code will make the functions execute, but immediately return to the script with nothing performed.

fak3

In other words? ::) Is it safe or...?
Sorry for such a question but I don't know nothing about php and coding.

Ianedres

Safe, as in the functions won't perform anything and return back to the point they were called from.

It should be noted that you should retain a backup copy of anything you are changing.

That said, you could also put '//' (two slashes) at the beginning of the lines between the bracket sets to comment out the code you wish to exclude. This would allow you to remove the slashes at some later point to revert back to using the search, without having to copy the file back over and having to edit any other changes you make to the script.

fak3

Thank you Ianedres. I did like you suggested. :)

Code (TPBlocks.template.php) Select
function template_TPsearch_above()
{
// global $context, $boardurl, $txt, $scripturl;


// echo '
// <div class="tborder" style="margin: 0 auto .2em auto;">
// <div class="titlebg" style="padding: 6px;">' , $txt['tp-searcharticles'] , '</div>
// <div class="windowbg" style="padding: 10px;">
// <a href="' . $scripturl. '?action=tpmod;sa=searcharticle">' . $txt['tp-searcharticles2'] . '</a> |
// <a href="' . $scripturl. '?action=tpmod;dl=search">' . $txt['tp-searchdownloads'] . '</a>
// </div>
// </div>';
return;
}
function template_TPsearch_below()
{
return;
}

This website is proudly hosted on Crocweb Cloud Website Hosting.