i create a page with this learning
now how can i change this page to a product? |
Quote:
|
Quote:
So I went into my PHP code and replaced the echo with: $test1 = "..." I then tested it by adding echo "$test1" and that worked. So then I tried adding this variable to the template but this is where I am having no luck. Here is what I have in the template: Code:
{vb:stylevar htmldoctype} |
You need to pass it to the template.
Add this before the print_output($templater->render()); line: PHP Code:
|
Quote:
PHP Code:
Also if I want to then add another variable I can just do the same thing? Add another line PHP Code:
and add the vb code in the template? |
Yes, you can do that for as many variables as you like.
Regarding your problem that only the last line is shown: In your while loop, you're overwriting your $test1 variable with every single loop, so only the result of the last one is returned in the end. You need not use $test1 = "whatever", but $test .= "whatever". This will not overwrite the existing value of the variable, but preserve the old value and add the new value at the end of the string. |
Quote:
One last problem I have. As I am trying to pull threads from X days ago, for some reason the date seems to be one day off. Here is what I have defined for x days ago: PHP Code:
|
You really need to open your own thread for this - this has nothing to do with this tutorial.
|
I've followed this tutorial to a 'T' (as far as I can tell) yet the php file I'm trying to call (a newsletter form submission) won't load within the template.
I created newssubscription.php and put it in my forum folder. Code:
<?php Code:
{vb:stylevar htmldoctype} Code:
ob_start(); |
There are no plugins in the test.php page. You need to put the php into the test.php page. Plugins are for modifying files you don't want to actually modify. When you create your own php page, you need to put all php in there because they don't use plugins.
|
All times are GMT. The time now is 08:14 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:
|