vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   need help with addign pages, and logging in (https://vborg.vbsupport.ru/showthread.php?t=236387)

swiper the fox 02-20-2010 11:43 AM

need help with addign pages, and logging in
 
I've added a few additional PHP pages to our forum

How can I set it to force a login (like rest of forum) so no content on the page is shown until you are logged in ?

Simon Lloyd 02-20-2010 01:10 PM

Use a conditional like this:
HTML Code:

<if condition="$show['member']">$header</if>
This will only show the header to members.

swiper the fox 02-20-2010 02:45 PM

I put this on my php page that I've created ?
when I do, all i get is : $header on the page
:)

I don't have a template for this, it is just a php page




thx for the response

kh99 02-20-2010 04:28 PM

You could try:

Code:

if (!$vbulletin->userinfo['userid'])
{
        print_no_permission();
}


swiper the fox 02-24-2010 01:15 PM

neither of these work properly
trying to incorporate a php include function for a script that hide download links with it, and still not working.

if i create the page and put in the php include, no template & no header& no permissions carried over, it works like a charm

If i create template ,to get headers & footer... etc... as inidcated by other posts, and try to incorporate the same php include function, the links break

I keep getting a %3C in front of where the php include function is ?
anyone ?

Simon Lloyd 02-24-2010 01:37 PM

How about posting your code for the php and the template you are using?

swiper the fox 02-24-2010 03:07 PM

The php page and template I created :

https://vborg.vbsupport.ru/showthread.php?t=62164

exactly as indicated here

php include needs to point to another php page as part of the script ( lets call it xxxx.php )

when i create just a regular page with html coding and the php include at the top , which looks like

Code:

<?php include"xxxx.php"; ?>

Simon Lloyd 02-25-2010 07:31 AM

Why create a template and try to call a different php file? simply include your stuff in your template. Maybe you need to do a "Require once" for it but without you supply code on what you are trying to do its going to be difficult to help.

borbole 02-25-2010 09:52 AM

Quote:

Originally Posted by Simon Lloyd (Post 1991028)
Why create a template and try to call a different php file? simply include your stuff in your template. Maybe you need to do a "Require once" for it but without you supply code on what you are trying to do its going to be difficult to help.

Indeed. That would be the easiest way.

@swiper the fox, have a look at my custom page mod. I have included that permission option that you want. It is for vb 4 but that part can be applied for vb 3 as well.

https://vborg.vbsupport.ru/showthread.php?t=235359


All times are GMT. The time now is 01:03 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.01092 seconds
  • Memory Usage 1,727KB
  • 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_code_printable
  • (1)bbcode_html_printable
  • (1)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