PDA

View Full Version : showthread hack needed please.


Vinney
08-14-2002, 08:06 PM
ok come some complete this hack for me please :

i wish to allow non members to see the thread list, but not able to view them.

using :

$templatesused = 'showthread_ratingdisplay,postbit_search,postbit_b uddy,postbit_useremail,icq,aim,yahoo,postbit_homep age,postbit_profile,postbit_ip_show,postbit_ip_hid den,postbit,postbit_sendpm,postbit_avatar,postbit_ offline,postbit_online,postbit_editedby,postbit_si gnature,postbit_attachment,postbit_attachmentimage ,showthread_adminoptions,showthread_threadrate,sho wthread_pollresults_voted,showthread_pollresults_c losed,showthread_firstunread,showthread_nextnewest thread,showthread_nextoldestthread,forumrules,show thread';
require('./global.php');


adding this at the end :

if ($bbuserinfo[usergroupid] == "1") {
eval("standarderror(\"".gettemplate("error_nopermission_loggedout")."\");");
exit;
}



how do make it so it can be forum ID defined. So i can implement this for certain forums only.

FlyingDutchman
08-15-2002, 04:44 AM
err, maybe it's handier to do this:

Admin CP->User Groups->Forum Permissions->Not Registered/Not Logged In->use custom settings and set everything to 'no' except 'can view forum', set that one to 'yes'
that'll do the trick... no file editing needed...

oops, you can't see the headers then too... sorry...

Vinney
08-15-2002, 06:06 AM
exactly ............

Zzed
08-15-2002, 06:47 AM
The forum ID's are derived in both thread vew and post view sections of the code. You should be able to just use the information at hand to determince whether to allow the user to see the thread or not. :)