TinyPortal

Development => Support => Topic started by: mikedown on April 23, 2008, 05:54:04 AM

Title: recent topics help for guest
Post by: mikedown on April 23, 2008, 05:54:04 AM
hey gurus i need your expertise

how do i set the recent forum topics in the main homepage for everyone view BUT when they click on the recent topic links they should be registered/logged in users to view it?
is it possible? im lost right now.


Title: Re: recent topics help for guest
Post by: G6Cad on April 23, 2008, 06:30:42 AM
You have a setting for that

Allow gusest to see the news even if they are not allowed to wiew the board.

That leads automaticly to a registration page
Title: Re: recent topics help for guest
Post by: mikedown on April 23, 2008, 08:09:51 AM
bro i think your talking about TinyPortal - Front page settings

"Allow guests to see news from the news board - even if guest are not allowed to see the board"?

what i meant was

recent forum topics blocks.  how do i let it show for guest  and they log in when they click on it

my current settings are:

Allow guests to see news from the news board - even if guest are not allowed to see the board: YES
Allow guests to browse the forum: is unticked
recent topics block is: ticked to all


but in my front block is a login replacing the recent topic block


Title: Re: recent topics help for guest
Post by: IchBin on April 23, 2008, 03:00:13 PM
I have not seen any block codes that will do this.
Title: Re: recent topics help for guest
Post by: JPDeni on April 23, 2008, 05:10:25 PM
If you are absolutely sure you will always want to do this, you can edit the SSI.php file to do what you want. I think. :) Be really careful and be sure that you can put it back in case it doesn't do what you want.

In SSI.php, look for


function ssi_recentTopics


Down a little bit further, you'll see


$request = db_query("


This is the beginning of the code that does the search. Part of the search is


AND $user_info[query_see_board]


Take out that line.

Be aware that this will cause the script to do absolutely no permissions checking, which means that if you have any admin-only or staff-only boards, recent topics from those will show up, too. If you have any boards that you don't want everyone to see, it would probably be better to use the ssi function directly, instead of using the TP recentbox.
Title: Re: recent topics help for guest
Post by: mikedown on April 24, 2008, 12:56:11 AM
awesome awesome! thanks!
Title: Re: recent topics help for guest
Post by: mikedown on April 24, 2008, 01:11:35 AM
it doesnt do the thing i want to do :(
any suggestions?
Title: Re: recent topics help for guest
Post by: JPDeni on April 24, 2008, 01:29:22 AM
What does it do?

I'm not exactly sure what you're wanting anyway. Is this the "canned" recenttopics TP block? Or an SSI block? Or a php block?

Title: Re: recent topics help for guest
Post by: mikedown on April 24, 2008, 01:41:59 AM
uhmmm nothing as far as i know....

im using the recent topics TP block

i want the recent topics TP block to be shown to everyone in the homepage but when you click on the recent topics you need to be registered to view it (the forum).
Title: Re: recent topics help for guest
Post by: JPDeni on April 24, 2008, 03:22:40 AM
And what version of TP are you using?
Title: Re: recent topics help for guest
Post by: mikedown on April 24, 2008, 09:03:01 AM
im using tp 0.983

SMF 1.1.4
Title: Re: recent topics help for guest
Post by: JPDeni on April 24, 2008, 01:57:39 PM
I'm really having a hard time figuring this out, because the line that I told you to delete is the only permissions check for the recent topics display. So maybe something else is going on.

What happens when you, as an admin, views the block? How about registered members? Do guests just see an empty block or does the block not appear at all?
Title: Re: recent topics help for guest
Post by: mikedown on April 25, 2008, 01:41:46 AM
Hi

i took out the line and this is what happens:

registered members and admin can view the block
guests are prompted to a
"Warning! Only registered members are allowed to access this section.
Please login below or register an account with Income-Tacts.Com"

log in block:

heres the link
http://www.income-tacts.com/
Title: Re: recent topics help for guest
Post by: JPDeni on April 25, 2008, 01:56:22 AM
Sorry for all the questions. Just trying to work out what's going on.

Is this in a center block? Left or right? Front page block? What are your front page settings?
Title: Re: recent topics help for guest
Post by: mikedown on April 25, 2008, 02:40:20 AM
no worries its a front page block..

Allow guests to see news from the news board - even if guest are not allowed to see the board? YES
What to show on front page: Forum-posts and articles - sorted on date
How frontblocks will be shown:Frontblocks are added first
Visual options for frontpage  all ticked
Articles layout for the front page: A
Title: Re: recent topics help for guest
Post by: mikedown on April 25, 2008, 02:48:17 AM
i think i managed to do it! :D

edit: ssi.php
Allow guests to browse the forum: is ticked
set all boards Allowed Groups: to all except guests
recent topic blocked is ticked to all

Title: Re: recent topics help for guest
Post by: JPDeni on April 25, 2008, 02:59:04 AM
Yahoo!!!!!!