Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

November 26, 2022, 11:25:42 AM

Login with username, password and session length
Members
  • Total Members: 3853
  • Latest: tty456
Stats
  • Total Posts: 193608
  • Total Topics: 21103
  • Online today: 74
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 1
Guests: 40
Total: 41

Author Topic: How to search TP pages  (Read 282 times)

0 Members and 1 Guest are viewing this topic.

Offline jernatety

  • Sr. Member
  • ****
  • Posts: 352
How to search TP pages
« on: October 05, 2022, 06:36:22 AM »
Hello, I have almost 400 TP pages now and none of them can be searched using the default SMF  site search. Is there a way to search the site to include TP, my site is entirely SMF? If not, does anybody have any specific ideas to be able to make it work?

Thank you to all in advance.

Offline @rjen

  • Support Team
  • *
  • Posts: 3334
    • FJR-club Nederland
Re: How to search TP pages
« Reply #1 on: October 05, 2022, 07:10:10 AM »
You can search in articles, just not with the SMF search.

Yopu need to use the TP search function, to be found under
../index.php?action=tportal;sa=searcharticle

Or you can add a TinyPortal search block to your page...
Create a php block and use the code snippet for the article search..

Code: [Select]
global $context, $scripturl, $txt;

echo '
<form accept-charset="', $context['character_set'], '" name="TPsearcharticle" action="' . $scripturl . '?action=tportal;sa=searcharticle2" method="post">
<div>
<input type="text" style="font-size: 1.3em; margin-bottom: 0.5em; padding: 3px; width: 90%;" name="tpsearch_what" /><br />
<input type="checkbox" name="tpsearch_title" checked="checked" /> ' , $txt['tp-searchintitle'] , '<br />
<input type="checkbox" name="tpsearch_body" checked="checked" /> ' , $txt['tp-searchinbody'] , '<br />
<input type="hidden" name="sc" value="' , $context['session_id'] , '" /><br />
<input type="submit" value="' , $txt['tp-search'] , '" />
</div>
</form>';
Running Latest TP on SMF2.1 at: www.fjr-club.nl

Offline jernatety

  • Sr. Member
  • ****
  • Posts: 352
Re: How to search TP pages
« Reply #2 on: October 05, 2022, 08:21:12 AM »
Thank you, I will give it a shot!

Offline Ken.

  • Support Team
  • *
  • Posts: 4363
    • Our FamilyForum
Re: How to search TP pages
« Reply #3 on: November 17, 2022, 06:24:56 AM »
Thanks for that bit of code @rjen, it works great.  O0
" If everything seems under control, you’re not going fast enough." - Mario Andretti
Yesterday When I was Young.