You'd need much more than a simple variable. You basically need the code to get all the forum data from database.
|
Quote:
|
Quote:
|
Quote:
I can see that I can the style_fetch hook & a few other locations to have a constant meta tag override but I'm not seeing how to get a dynamic one in there for a custom page. :o Thanks |
Just add this to your test.php page:
PHP Code:
|
Quote:
|
For some reason all of my text goes above the template, above the template header. I am putting my coding after:
// ################################################## ##################### // ######################## START MAIN SCRIPT ############################ // ################################################## ##################### $navbits = construct_navbits(array('' => 'Test Page')); $navbar = render_navbar_template($navbits); // ###### YOUR CUSTOM CODE GOES HERE ##### $pagetitle = 'This is a Test Page'; |
You should have no echo statements in your coding or it will go above the template header. All output in your page should be assigned to a variable, that variable registered for use in a template, and then the variable put in the template where you want your output to show.
|
how to support php
|
I know how to create a template but how do you "create a new file"?
|
Quote:
|
Ok, yay! I got that. What I am trying to do is link an amazon store to a page. I have uploaded your code in the OP to the ftp and created a template. I guess what I am having trouble with is linking my amazon store to that template. Does that make sense?
|
Then in your template, using proper html, link to the store.
|
This is what I put but when I type in www.mysite.com/amazon.php, it is just a blank page
{vb:stylevar htmldoctype} <html xmlns="<iframe src="http://astore.amazon.com/coupo002-20" width="90%" height="4000" frameborder="0" scrolling="no"></iframe>"{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html"> <head> <title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title> {vb:raw headinclude} {vb:raw headinclude_bottom} </head> <body> {vb:raw header} {vb:raw navbar} <div id="amazon.php"> <h1>{vb:raw pagetitle}</h1> </div> <h2 class="blockhead">amazon</h2> <div class="blockbody"> <div class="blockrow"> Text </div> </div> {vb:raw footer} </body> </html> |
Quote:
|
I created a template named Amazon under my style and added the code above into it.
|
Quote:
|
I finally got it! Thanks so much Lynne!
|
Lynne, may I make a suggestion, if you don't mind? Maybe it would be a good thing to add a big bold note in first post about the case sensivity. That seems to get people in trouble fairly regularly. (or have I missed that note? just took a quick look)
|
Quote:
|
How do I delete a just created 'test' template?
Thank you |
Go to your template you just created in Styles & Templates and revert that template
|
Hello Lynne,
We renamed index.php to oldindex.php and named our custom page index.php as instructed, worked perfectly and looks great, thanks for all the help on this. One issue, when someone logs in they are then taken back to the same new index.php custom page and not the standard content.php page they used to be taken to with the old index.php file. How do we fix this please. thanks in advance for the help |
Quote:
|
this was very helpfull :)
but i find it myself tricky to show this on mainpage you guys can help me on how to show test.php on main page below navbar? because it will be a tiny php file..... i also did read up Lynne his link to it.... but that making me more confused how to do this... a little hand would be very apprciated :) thank you.. |
This is an article about how to create a whole page, not how to create a little bit of text to show on existing pages.
|
its is a page m8!
i dint say its txt though..... |
Quote:
I will try and find a coder to take a look at this for me |
well ive fixed it on how to show the page on main page..:)
but im wonder how i can add the collapse button to it.. anyone has an idea on how to adcive that? gracias :) |
When you add the result of this tutorial to another page, you end up with invalid source code.
Regarding the collapse button: Just do a search. I did a tutorial for vB4 on this. |
Quote:
|
Will this actually work for the CMS aswell?
I have added a dropdown box to my menu, but using static pages bugs me off a little as when I first make it, I end up using html to show things properly. But editing the static page afterwards, make it all wonky. |
Quote:
|
Quote:
Like <br> turning into <br> Thanks for the answer tho, I was actually going to try it and see how it ended up, probably saved me quite a bit of cursing :) As a total sidenote, any idea where I could find some good information about modding the CMS? |
If it exists, it would be on vbulletin.org. I'm afraid there's not much yet, tho, as you have noted.
|
after creating the external page. What happens if i want to list latest 5 threads from each of my forums?
thanks |
You add the code for that, but that's clearly not part of this tutorial and you should create your own thread for that. Also, you seem to be not quite sure what version of vB you are using?
|
I am creating a TEST page (with Test.php code in the first page) in my sub domain (faqs.policywala.com).
Link to my TEST page is - faqs.policywala.com/TEST.PHP Getting error - PHP Code:
Please help what am I doing wrong? :confused: |
This tutorial worked perfectly for me. Thanks. :)
|
Thank you for this perfect article.
Just 1 question, how can i parse special characters in username? My members using some special char like ®... in their usernames, it doesn't showing up correctly when output. |
All times are GMT. The time now is 05:13 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|