Quote:
This thread is about creating a completely new page using the vbulletin framework, with vbulletin's header, navbar and footer. |
I'm trying to import this table (like your countries one)
http://www.lvasp.com/providers_hook.php into http://www.lvasp.com/forum/providers.php --------------- Added [DATE]1207200883[/DATE] at [TIME]1207200883[/TIME] --------------- What tutorial did you follow to create your page then? (cause thats what I'm trying to emulate) Thanks, and sorry for being thick-headed. --------------- Added [DATE]1207201020[/DATE] at [TIME]1207201020[/TIME] --------------- I'm looking at the vbulletin manual and I cant seem to find a tutorial for a page like yours. |
I followed this tutorial to create the countries page. Hooks did not exists when this article was written (March 2004). Therefore, you can be certain that hooks are not needed for the page itself (apart from the fact that I am telling you).
The article tells you to edit original php files for "Who's online". In newer vbulletin versions, we can do this through hooks. Your provider.php is fine. I suppose you are following test.php from the article in this file. Note the part where it says "START MAIN SCRIPT". The code from providers_hook.php will go here. How are you displaying the output from providers_hook.php? The vbulletin method is to calculate all the variables and then call a template. In the article, the template is called test. Everything between $navbar and $footer in this template is your custom stuff. If there are any loops in the page (such as a table with multiple rows, like my countries page), then you have to create an additional template - the bit template. Default vbulletin has many examples of this - postbit, threadbit, reputationbit, forumbit etc etc. Within your php code, you must have a loop and within that you call the 'bit' template and store the result into a variable. In the main template for the page, you just put the variable where you want that table. Here is my countries template for reference (I call it countries_countries, meaning that its the main template of the countries page). Code:
$stylevar[htmldoctype] Code:
<tr> Code:
<?php p.s.: The code above is unaltered, but its not usable because you also need supporting code which stores the countries data in the session table. |
ok (thanks soo much for your help thus far) Here is my PROVIDERS template
Code:
$stylevar[htmldoctype] Code:
if(empty($provider[featured_pic])) { Code:
<?php |
amcd, thanks for that. Makes complete sense.
Reckon you could give us the heads up on how we do the hooks for "Who's online"? Cheers! |
GOT it, thanks
|
I'm trying to create a page within a folder called 'template' in the forum root.
[root]/template/test.php. I tried this method, it worked fine as long as the pages were in the root. What changes do i need to do to make it work when inside 'template' folder in the root.? |
Is there an update for 3.70 I need to add online location
|
Quote:
|
Quote:
Code:
switch ($filename) hook online_location_unknown Code:
switch ($userinfo['activity']) |
All times are GMT. The time now is 11:05 AM. |
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:
|