vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   showthread hack needed please. (https://vborg.vbsupport.ru/showthread.php?t=42296)

Vinney 08-14-2002 08:06 PM

showthread hack needed please.
 
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 :

PHP Code:

$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,showthread';
require(
'./global.php'); 

adding this at the end :
PHP Code:

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...

[EDIT] oops, you can't see the headers then too... sorry...[/EDIT]

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. :)


All times are GMT. The time now is 10:03 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00987 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete