![]() |
sub pages from custom portal.
I have tried posting this question in the appropriate channels without the response so I'm hoping you coders can help.
This should be theoretically simple however I digress I'm not a coder and I can't resolve even a simple concept. The task is to load sub_pages from smedd's portal and I want to do so without having to create additional php pages for each page I want to have. so, basically index.php?page=mypagename. I'm ok with creating a page.php so that I can call out like page.php?do=mypagename etc. I've gone through the API tutorial and while it partially works it uses the forum template not the index.php format. Here is the code for my index.php Code:
<?php Code:
if ($_REQUEST['do'] == 'ventrilo') If possible what I would like to have is a piece of code in the page that would call out custom templates.. I know vbadvanced does this seamlessly but I don't want to run vbadvanced, just syndicate news and add my own content. Can anyone offer a suggestion or 2 to point me in the right direction? If you need, the context of the project is here so you can see what I'm working towards. Kind regards, Ryan |
You don't say where you added that code - but remember that you can only call print_output once() - once you call that, the page is output and execution ends.
|
Thanks for responding Paul,
I placed the last bit of code at the end of the page before the final ?> as instructed in the tutorial I read. How do I set the print_out to be dynamic so that I can generate URL's like page.php?do=mypage where mypage is a template. |
PHP Code:
|
Thank you dismounted, I'll try that this evenin when I get home. As I plan to add many pages to the site am I correct that I will be adding code for each page like:
Code:
if ($_REQUEST['do'] == 'ventrilo') |
PHP Code:
|
Use switch as opposed to multiple elseif's I'm pretty sure they work as expected in vB.
http://php.net/switch |
Thank you Dismounted. For clenliness sake I've actually created a page.php and call the evals from there..
Opserty, what advantage is switch over what has been presented. I looked it over and it looked like I'd need a good sit down and a coffee to apply it. |
Converted to switches :).
PHP Code:
|
All times are GMT. The time now is 03:36 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|