vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Need to install code to enable Members Only forum (https://vborg.vbsupport.ru/showthread.php?t=182395)

RichSage 06-13-2008 04:54 PM

Need to install code to enable Members Only forum
 
Hi All,

I've installed vBulletin, and all is well...

Now I need to install a few lines of php code to password protect the forums.

I am using a membership program to manage all aspects of that.

My problem is that I don't know where to find the vBulleting template files to insert the code into a web page above the body area. The page where I insert the code should be an index type of page that is "called" everywhere a user may go in vBulletin. Something like a header file would work...

Any suggestions where to insert the 5 lines of php code I have?

Thanks, Sam.

Opserty 06-13-2008 05:08 PM

<a href="http://www.vbulletin.com/docs/html/plugin_system" target="_blank">Plugin System</a>

Hook Location: global_start or global_setup_complete

RichSage 06-13-2008 05:49 PM

Opserty,

I have around 3 hours of 'back end work' on vB. Where can I find the above location or files?

Thanks very much for answering my question.
Cheers,
Sam

Opserty 06-13-2008 06:57 PM

You don't need to edit files, did you read through the link I provided? Use The Plugin Manager and create a plugin with the hook location I mentioned above.

RichSage 06-16-2008 09:33 AM

Quote:

Originally Posted by Opserty (Post 1548642)
You don't need to edit files, did you read through the link I provided? Use The Plugin Manager and create a plugin with the hook location I mentioned above.

Hi again,

I went through the setup and created a plugin for both variables, and no luck.

I also tested the code, and it works fine on a sample page that I am protecting.

How I need to protect my entire installation of vBulletin, and no progress on that front.

Any suggestions?

Thanks, Sam

--------------- Added [DATE]1213614361[/DATE] at [TIME]1213614361[/TIME] ---------------

Follow up...

Where is the template for example that 'calls' the header image (/images/misc/vbulletin3_logo_white.gif) for example. IF I can edit that template, I can insert my code so that vBulletin, the vB BLOG and vB Project areas are all protected.

Any advice?
Thanks, Sam

Marco van Herwaarden 06-16-2008 10:29 AM

That would be the 'header' template. Please be aware however that you can not insert PHP-code directly into templates.

RichSage 06-16-2008 10:39 AM

Quote:

Originally Posted by Marco van Herwaarden (Post 1550702)
That would be the 'header' template. Please be aware however that you can not insert PHP-code directly into templates.

Marco,

Then what is your suggestion for inserting my 5 lines of php code to make my membership site?

Sam

Marco van Herwaarden 06-16-2008 10:58 AM

See the manual: Including External Files

RichSage 06-16-2008 12:08 PM

Hi Marco,

The directions in the above URL worked perfectly! :D

Thanks a bunch!!!!

Preta Dag!

Sam


All times are GMT. The time now is 06:40 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.02359 seconds
  • Memory Usage 1,726KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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