![]() |
does it work with vb 3.7.0 ??
I tried only to find nothing works. Just an page. |
Quote:
|
Thanks, I was looking for this
|
Stupid question here, but where do i create the template?
Strike that lol ! |
Quote:
|
Hello,
I got about 20 pages in and realized it was a 49 page thread. I followed the steps, and got the page working - no problem. I'm sure this question was asked before, but... How do you get PHP code working inside of the template? All my pages have custom written PHP functions. Thank you in advance. |
Templates are not supposed to execute code. This is not just with vbulletin, but the entire concept of templating is separation of presentation from code (business logic).
Execute the php before calling the template, keep the presentation data in certain variables, and use the template just to show those variables. |
I'll give it a try, thanks.
|
Can I configure this so that the user has to be logged in to see this? I have pages with content I don't want readily available to guests.
I'm using 3.7.0 and I want 'ONLY' registered users to see my vbpowered pages. I don't want them available to unregistered guests. I checked herebut what template or folder page gets edited? --------------- Added [DATE]1213282180[/DATE] at [TIME]1213282180[/TIME] --------------- Quote:
Code:
<?php |
hello all
is it possible to insert php code in this kind of pages? thank you Manuel |
Quote:
--------------- Added [DATE]1213612612[/DATE] at [TIME]1213612612[/TIME] --------------- Quote:
|
Quote:
|
does this work with latest VB..
|
yep, example http://www.xentoo.com/privacy
|
Quote:
Code:
if ($vbulletin->userinfo->userid==0) |
I can't seem to get this to work outside of my VB forum.
I used this: chdir('../forum/'); require_once('./global.php'); But it doesn't work properly. The script is located in ../xxxx/yyyy/test.php and my VB install is in ../forum Also, I am running this on IIS. Maybe something is wrong with my chdir? Thanks! |
Your script is 2 levels down from the website root, so you have to use .. twice.
chdir('../../forum/'); |
Quote:
|
Can anyone help me with this?
I have: / (root) /forum (VB forum) /test/test2 (where my script resides) What do I set the require_once or chdir to in order to have the script in my test directory find global.php? Thanks! |
Worked like a charm. Thank you.
Quote:
|
Quote:
|
Quote:
2. you can use [php] $show['guest'] and $show['member'] PHP Code:
hth |
this is my Template Coding
Quote:
Quote:
http://www.mknexusonline.com/test.php but it's not working someone plz tell what i did wrong |
Quote:
correct this in your php file |
you see above i already did this in test.php
Quote:
|
Quote:
|
what do you mean in my test.php i just added below code
Quote:
|
Where have you kept test.php? If it is in the same directory as vbulletin, you dont need this line:
Code:
chdir('/home/username/public_html/'); |
my file is there http://www.mknexusonline.com/test.php
my forums link is this http://www.mknexusonline.com/forums now what should i do |
Quote:
|
Quote:
|
Quote:
|
Quote:
Every new template must have the prefix "custom" and an underscore, ie. custom_test this is the link you should use for every custom page you create. just replace the last word with your custom page name Code:
http://www.yourdomain.com/misc.php?do=page&template=test |
Quote:
For example, the very first page I created using this tutorial is here: www.cogonline.net/forums/banners.php The template name I use is BANNERS. The file is banners.php. Navigating to misc.php misc isn't going to take me anywhere near this page. |
Dude, did you miss the part where I said I have over 40 pages created like this? Each page .php page has it's own name and that name matches up with custom_same page name.
test.php matches up with custom_test = Code:
http://www.yourdomain.com/misc.php?do=page&template=test Code:
http://www.yourdomain.com/misc.php?do=page&template=test1 Code:
http://www.yourdomain.com/misc.php?do=page&template=test2 |
Quote:
Quote:
And this is an article, not a mod. |
How can I put sound files or rss feeds into a page like this?
|
Quote:
|
I can't seem to force users to login to view my page created with this script.
What do I need to do to force guests to login so they can view the page? |
Folks
Could someone please confirm that this works with 3.7.2 ? VMT |
All times are GMT. The time now is 07:25 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|