Quote:
|
You're doing SOMETHING wrong. Can you post the .php and template codes you're using?
|
hi all
I want to make the header and footer but the content of the page is from another site can anyone explain this 2 me easily as I'm not professional @ all |
Is this up to date with the latest VB? (3.8.3)
Or do I need to do some extra modifications? :) --------------- Added [DATE]1246386340[/DATE] at [TIME]1246386340[/TIME] --------------- In addition, would it be a good idea to put PHP logic into the VBulletin plugin system? Or should I just put them in this new php page? |
This worked great! Thank you.
|
1 Attachment(s)
Hello
I'm trying to design one custom page while keeping vbulletin header, navbar and footer on it. I've referred to following topics : https://vborg.vbsupport.ru/showthrea...ight=logicians https://vborg.vbsupport.ru/showthread.php?t=217075 http://www.vbulletin.com/forum/showthread.php?t=197563 Here is the custom page i wanna have headers and footers on. http://www.projectsplanet.org/forums/testverify.php Enter code 1234test to test above page. When i try to put my code as follows in custom template created in Vbulletin admin CP, i'm getting error : Quote:
Code:
The following error occurred when attempting to evaluate this template: Please check attached php file testverify.php Please tell me how do i put vbulletin header, navbar and footer there. Following are the contents of attached testverify.php if you do not wish to download it : Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Detailed instructions are much appreciated. Regards |
You should follow Gary King's article that you linked to. In it, you'll see that you don't do your php page like you have written above at all. Your template will be fine as long as you don't put php in it. Start with the stuff in Gary's article and then add your custom code to it.
|
Is there any way i can do PHP with this like
Quote:
|
Quote:
You are supposed to do this: something.php Code:
set some variables Code:
header and navbar |
Thank you my good Sir. Ill try that out
Edit - What do you mean output of PHP code, the HTML form? |
Yes, if that is what you want to show. The html (design and fixed data) part of the form can be put directly into the template, and any dynamic data can be displayed through variables set in the php code.
The basic purpose of templating (whether vbulletin or otherwise) is to separate the front end design from the business logic. The template holds just enough code (actually html with conditionals, not programming code) to show whatever needs to be shown. The template is simply 'shown', and that is why you cannot have php code in there. The vbulletin manual has a section on templates, and reading the default vb templates can be very instructive for newcomers. --------------- Added [DATE]1246858288[/DATE] at [TIME]1246858288[/TIME] --------------- This will work: php: Code:
$htmlform = "<form>........</form>" Code:
$header |
Thanks AMCD i finally got it to work.
|
Sorry, but this makes no sence at all to me
anyone care to explain it in more detail for me? Sorry Gary, i just dont find your instructions very clear at all :S |
Quote:
|
Okay, I accidentally deleted my test file that I finally got working and really can't spend another week reading through all 76 pages of this topic, fun as that was the first time, to find the answer to this simple question. What do I change in this code to make this page viewable by nonmembers?
Quote:
|
Remove
Code:
if (!$vbulletin->userinfo['userid']) print_no_permission(); |
Sorry, I couldn't figure out those tags. And thanks for the help. Much appreciated.
Quote:
|
They're the same as the quote tags..... just php, code, and html
|
Quote:
I have fixed issue... It was a template issue. Thanks 4 your time & help. :D:D:D |
is there any way to insert html into the template, something like this:
eval('$showhtml = "' .$showhtml . '";'); // with $showhtml containing html I want to convert one of my scripts but if I can't do this it'll be a huge headache. |
Quote:
You should be able to do this (don't forget to escape any quotes): PHP Code:
|
It doesn't work, you just get some apache error. It doesn't like < or >.
|
Quote:
|
I tried to regenerate the problem but used your line and it seems to be working now. It was probably just a pebcak error.
Thanks Edit: I just thought, does vbulletin cache the scripts? |
Quote:
|
useful...thanks!
|
Hi,
I need to create new template fro blogs.Under blog template i need create other blog extension templates.how to do create templates. |
Any idea why i get a blank page ?
Code:
<?php |
Did you create a template for your page? I'm guessing not from seeing Default Style. The style name doesn't go there. Thats where you put your name of the template you created. Re-read the instructions ;)
|
hello friends, I have a question, I am trying to create the next page. I have a page in vBulletin you can just put the forum that you specify.
example: I have 10 forum forum 1 forum 2 forum 3 forum 4 ect ..... I want to do is to page 1 show forum 1 and 3 on page 2 show forum 2 and 4 well with other forum pages can divide by page I already have the example running on a test forum but can not find the code that I need to show the different forums. Can someone give me a hand with this. thanks |
I am getting this error when i create a new page, so i tried using the same php file and template info but still get an error:
Code:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/sdfaheem/public_html/desimeet.com/disclaimer.php on line 2 |
Make sure you are using a text editor made for coding, not something like Microsoft Word. It sounds like line breaks or extra text is getting added to your file.
|
I just used this again and I just wish I could give it more stars because I LOVE THIS TUTORIAL.
:D I don't find this code in functions_online any longer, is there a new fix for that? Quote:
|
Quote:
|
Sorry if this has already been asked but what would I have to change in the php file in order to place the page in another directory?
|
You need to add a line leading to the forum with the vbulletin files like this prior to requiring the global.php file:
PHP Code:
|
Many thanks for the quick response. :)
|
What can I add or remove from the following code to keep out Guests and members of Usergroups 1, 2, 3, & 4 who are not also part of Usergroups 5 or higher (if that makes a difference)?
Code:
<?php |
Quote:
Code:
if (!$vbulletin->userinfo['userid']) print_no_permission(); Code:
if (!$vbulletin->userinfo['userid'] OR !is_member_of($vbulletin->userinfo, 5, 6, 7)) print_no_permission(); |
Quote:
|
All times are GMT. The time now is 07:36 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|