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

Recent

Welcome to TinyPortal. Please login or sign up.

December 13, 2024, 12:15:34 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,443
  • Total Topics: 21,252
  • Online today: 167
  • Online ever: 6,457 (November 30, 2024, 02:40:09 PM)
Users Online
  • Users: 0
  • Guests: 141
  • Total: 141

How to allow guest searches?

Started by MrMike, September 15, 2023, 07:18:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrMike

I'm using the most current versions of TP and SMF.

I'd like to allow guests to be able to use the TP search function, but I cannot seem to find where there's a setting to allow that. (??)

I have 'Guests allowed' in the SMF settings and they can perform searches (after verification), but TP still asks for a login before permitting searches.

How can I set TP to allow Guests to search?

@rjen

 :hmm: a permission for search was added recently, but like the other TinyPortal permissions that is not available to guest. May be an oversight when the permission was added...
Running Latest TP on SMF2.1 at: www.fjr-club.nl

MrMike

Quote from: @rjen on September 15, 2023, 07:26:16 PM:hmm: a permission for search was added recently, but like the other TinyPortal permissions that is not available to guest. May be an oversight when the permission was added...

I see a checkbox in Search Settings, but turning it on makes no difference.

I've been through all the settings shown in the 2nd image and I don't see anything that allows it.


@rjen

No, the TinyPortal permission are not showing for guests. For reference check the permissions for a member group: there you will see the TinyPortal permissions.
Running Latest TP on SMF2.1 at: www.fjr-club.nl

MrMike

I have all these turned on in the "Guest" profile permissions, but I still can't get it to allow searching. This looks like it's only for the boards, so I must be in the wrong place. (??)

The 2nd image shows my Groups, but I don't see Guests in there.

MrMike

I'm not sure where to go from here...

I've looked through every permission I can find and I'm not seeing anything that allows me to let guests search with TinyPortal.

I've kind of hit a roadblock with this; I need to allow guests to use the TP search function; is there no way to accomplish this?

tino


MrMike

I'll give that a try and let you know what happens.



Quote from: tino on September 22, 2023, 04:03:26 PMhttps://github.com/Tinyportal/TinyPortal/blob/0c20dea07b03b99c1329fd9621b01791ea28a904/TinyPortal/Integrate.php#L350

Can you try commenting out that line in the code?

It should then allow you to set the permission for guests.

MrMike

Here's what my edit was...when I had a test user go to the site and do a search, he still got the "not allowed" massage. (

Do I need to go back and look through the permissions again? Would commenting out that line make another option appear somewhere?


     'tp_dlupload',
            'tp_dlcreatetopic',
            'tp_can_list_images',
            /*'tp_can_search',*/

@rjen

That's what I tried to explain: there is no standard option to allow it. But you can try the fix Tino gave

With that change you should find a permission showing for guests that you can set
Running Latest TP on SMF2.1 at: www.fjr-club.nl

MrMike

Thank you!

That worked perfectly, the "Guest" option appeared in the Permissions list and  Guests are now able to search the articles.

Thank you again!  :tick:

@rjen

I think we should make this change permanent for the next release. There is no danger in allowing this permission for guests
Running Latest TP on SMF2.1 at: www.fjr-club.nl

MrMike

#12
Quote from: @rjen on September 22, 2023, 08:12:52 PMI think we should make this change permanent for the next release. There is no danger in allowing this permission for guests

That change makes sense to me. In our case it would prevent the majority of visitors from delving further into the site, people usually won't create an account just to do searches.

In any case, thank you again for your help; this was one of the last few remaining items I've been working on.

Cheers

MrMike

I probably should have posted this earlier but I wanted to get the site back up and running first.

The site I've installed TinyPortal on is DeltaBravo.net; a site where parents can find help with divorce and custody issues, as well as learn about Parenting Evaluations, a tool that Family Courts often use to determine who should be the primary or "custodial" parent.

The site has been mostly moribund for a while but there's still a lot of good information that people search for every day (this is why the Search function was crucial to me).

It's so much faster and cleaner after porting it from e107. (Yes, e107 is a capable CMS, but using it is like driving your battleship to the mini-market; it's way more complicated and fiddly than most people will ever need.)

Feel free to have a look: DeltaBravo.net
 

Cheers!