I have my SMF forum set to no guess access, but i want the mod_smf_recenttopics module in my Joomla frontpage, to show the topics, and when user clicks on topic link heīll find out that he is not allowed to see the topic unless he registers.
Canīt this be done? Right now the recent topics module is displaying blank to guests
The recent topics can only use permissions on a per board level. So if your Forum is set to disallow guests but each board is set to public, it will show your boards and then give the error. Generally speaking, I use the same query that is found in SSI.php, so it is written by SMF.
My question is, why not simply set the recent topics module to registered in Joomla? Then no guests even see the module.
Great it works as you say, if i set each board to permit access to guest, but then i disallow global SMF guest access.
The reason why i want the recent topics to work like this is because my site will have as one of its major key points the quality of the topics being discussed(so i hope, hehehe). I will use a "Register to read the whole article and/or to read/post in the forum" approach.
Therefore the mod_smf_recenttopics in the frontpage is another very good way of showing to first-time visitors to my site that itīs worth registering.
The other way to tempt them i also use is to show only the intro of articles to guest, but must register to read the whole article.
you could simply list the topics to guests instead of allowing them to be clickable links. In the code make the following changes, on or around line 250 change this code:
Code:
//Start subject link echo '<a class="latestnews'.$moduleclass_sfx.'" href="'.$post['href'].'" '; //external links if ($external) { echo 'target="_blank" '; } echo '>';
To this:
Code:
//Start subject link if (!$user_info['is_guest']) { echo '<a class="latestnews'.$moduleclass_sfx.'" href="'.$post['href'].'" '; //external links if ($external) { echo 'target="_blank" '; } echo '>'; }
For now i prefer to leave the links for guests. I know it sounds weird, but in my case(it might not suit all type of communities) i want to leave it clear that "You interested in this? Then you must register". I left the normal behaviour(guest clicks on link and is taken to the Login/Register box) but i changed the language defines a little bit to include a link to the cb user register page and also a link explaining why i require registration, blah blah blah).
But thanks for posting this hack anyway. I write it down in case i have to change approach ;-)
Plus i am using another module next to the recent topics to display latest reviews to articles that has the same functionality. It displays links to reviews in the frontpage for everybody, but when guest clicks gets "must login or register" page
Cheers, NiCo
« Last Edit: January 13, 2007, 10:55:10 AM by GlingGlo »
Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use