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!
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.
If I delete these 2 functions in TPBlocks.template.php, the search page results in
QuoteUnable to load the 'TPsearch_above' template.
:'(
Then make them both return;
:)
Like this?
function template_TPsearch_above()
{
return;
}
function template_TPsearch_below()
{
return;
}
That code will make the functions execute, but immediately return to the script with nothing performed.
In other words? ::) Is it safe or...?
Sorry for such a question but I don't know nothing about php and coding.
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.
Thank you Ianedres. I did like you suggested. :)
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;
}