Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-20-2010, 11:43 AM
swiper the fox swiper the fox is offline
 
Join Date: Dec 2007
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 ?
Reply With Quote
  #2  
Old 02-20-2010, 01:10 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use a conditional like this:
HTML Code:
<if condition="$show['member']">$header</if>
This will only show the header to members.
Reply With Quote
  #3  
Old 02-20-2010, 02:45 PM
swiper the fox swiper the fox is offline
 
Join Date: Dec 2007
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 02-20-2010, 04:28 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could try:

Code:
if (!$vbulletin->userinfo['userid'])
{
	print_no_permission();
}
Reply With Quote
  #5  
Old 02-24-2010, 01:15 PM
swiper the fox swiper the fox is offline
 
Join Date: Dec 2007
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ?
Reply With Quote
  #6  
Old 02-24-2010, 01:37 PM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about posting your code for the php and the template you are using?
Reply With Quote
  #7  
Old 02-24-2010, 03:07 PM
swiper the fox swiper the fox is offline
 
Join Date: Dec 2007
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"; ?>
Reply With Quote
  #8  
Old 02-25-2010, 07:31 AM
Simon Lloyd's Avatar
Simon Lloyd Simon Lloyd is offline
 
Join Date: Aug 2008
Location: Manchester
Posts: 3,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 02-25-2010, 09:52 AM
borbole's Avatar
borbole borbole is offline
 
Join Date: Jan 2010
Posts: 2,559
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Simon Lloyd View Post
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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:14 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.11081 seconds
  • Memory Usage 2,238KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete