![]() |
Creating Custom Pages
Hi,
Where can i get tutorials for "Creating Custom Pages that query the database"? I have read How to create your own vBulletin-powered page! (uses vB templates) at https://vborg.vbsupport.ru/showthrea...=62164&page=32 I have also read about the database classes. As i understand now, i have to do the coding part in the php file and create a template to display the data. How do i pass data obtained from the database to the template. If there is any guide/tutorial for the same, please give me the link. If there isnt please give me some pointers Thanks in advance |
So, Noone replied!! I guess i have asked a very broad question..
Let me start with a narrower one Suppose i make a file test.php and retrive some values from a database. Now, i want to display those values. How exactly do i go about doing so? I mean the values will be displayed in the templates and the retrieve done in the php, so how does one go about passing values to the template. I hope i explained my query properly. Thanks in advance ~M |
Here is a section of code from one of my pages that should help you out. I'm not sure I can explain it all, but I know it works.
Code:
if ($_REQUEST['do'] == 'Calculate with Own Data') |
Thanks tht helped.
I am facing a problem now with scripts placed outside the vbulletin directory See http://www.genportal.org/team/team_builder.php The forum is located at genportal.org/forum/ The images and the links do not work because they dont get the right path... Here is the code i have used. What have i done wrong Code:
<?php |
Change your links in your header, footer and navbar templates to full links.
Change your image paths to full URL's. This happens with anything that is not in the same directory. |
Wht about CSS?
The pages dont get the CSS as well Where is $style[css] defined? |
Try using the CSS in the db instead of the filesystem
|
How does one do that? Please explain
I havent changed anything. Is the default CSS from the file or from the database |
It seems to be working ok here with the default style. Is it the default style or another one that you are having problems with?
BTW, your CSS is stored in the db already. |
Thanks
How do i get IP and username of the person on my page?? |
okay username can be obtained by $vbulletin->userinfo[username]
How do i get IP?? |
Why are you wasting your time with this? Their is a WebTemplates hack that allows you to create custom pages with dozens of options. I create pages in seconds using HTML, BB Code or text.
|
All times are GMT. The time now is 09:39 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:
|