vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   hide "Announcements" to not registered users (https://vborg.vbsupport.ru/showthread.php?t=53270)

esfron 05-23-2003 03:52 AM

hide "Announcements" to not registered users
 
I'm looking for a hack to hide "Announcements" to not registered users ?

Thx

wolfe 05-23-2003 12:00 PM

will work on it d00d

filburt1 05-23-2003 12:01 PM

Untested: in announcement.php, find:
PHP Code:

require("./global.php"); 

After that, add:
PHP Code:

if ($bbuserinfo['userid'] == 0show_nopermission(); 


wolfe 05-23-2003 12:07 PM

d00d that don't work

filburt1 05-23-2003 12:10 PM

I did say untested...how doesn't it work? Any guest will be immediately turned away...check every occurance of require("./global.php");.

wolfe 05-23-2003 12:18 PM

sorry d00d it works but i think he wanted this other bit hidden aswell

so d00d after you have done filburt1's bit of code do the following

in forumdisplay.php FIND:

PHP Code:

  eval("\$announcement = \"".gettemplate('forumdisplay_announcement')."\";");
  
$doneannouncements 1;
 } 

and replace it with

PHP Code:

  if ($bbuserinfo['userid'] == "0") {
  
$announcement "";
  } else {
  eval(
"\$announcement = \"".gettemplate('forumdisplay_announcement')."\";");
  
$doneannouncements 1;
 }


this will not allow it to show in the forumdisplay thread list aswell


All times are GMT. The time now is 12:21 AM.

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.02143 seconds
  • Memory Usage 1,720KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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