The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
How to create your own vBulletin-powered page! (uses vB templates)
Want to create your very own vBulletin powered page which includes the header, footer, and the user permissions system as well? Well now you can Want to know how it will look? Take a look at the attached screenshot below! Now includes the Who's Online modification! Also, instructions included on how to create your own pages that are integrated with current vBulletin files! I'm going to give you a generic page but you can easily modify the contents of the page by changing the template So here we go Instructions: Create a new file, whatever you want to call it (let's say test.php). Open up test.php and add the following (replace TEST with whatever template you want to show): PHP Code:
Now create the template, called TEST with the following content: HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle]</title> $headinclude </head> <body> $header $navbar <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="tcat">Title</td> </tr> <tr> <td class="alt1">Text</td> </tr> </table> $footer </body> </html> Now check it out by going to test.php Who's Online Modification Now if you want to show who is browsing this new page of yours, just open up includes/functions_online.php and find: PHP Code:
PHP Code:
Then find: PHP Code:
PHP Code:
---------------------------------- Also if you want to create your own pages 'within' current vBulletin files, do the following: Open the file you want, and then right before the final ?> in the source code, add the following: PHP Code:
edit by Lynne: If running 3.8.4 or above, see this post to take care of the PHP 5.3.0-related problems - https://vborg.vbsupport.ru/showpost....postcount=1171 |
#122
|
||||
|
||||
Okay, I just copied it straight out of the control panel, and those "+" marks weren't there. I have no idea where they came from, but when I pasted here, they showed up.
|
#123
|
||||
|
||||
Fascinating. For some reason, my copy of BBEdit is placing characters in those places in my files when I save them. Looks like problem solved. Thank you.
One question, though; There's no link in the NavBar for the page. Where in the NavBar should it be? |
#124
|
||||
|
||||
Quote:
|
#125
|
||||
|
||||
Quote:
https://vborg.vbsupport.ru/showpost....3&postcount=36 Code:
$vboptions[homeurl]/ I have many operating pages outside the forums directory using this hack. |
#126
|
||||
|
||||
Quote:
|
#127
|
||||
|
||||
Quote:
I knew I could count on a fellow Texan for help. |
#128
|
||||
|
||||
Some of us need all the help we can get.
|
#129
|
||||
|
||||
I have removed the following code from the PHP file and it still works. Could you tell me what the purpose of this code is and what it does?
Code:
// ################### PRE-CACHE TEMPLATES AND DATA ###################### // get special phrase groups $phrasegroups = array( ); // get special data templates from the datastore $specialtemplates = array( ); // pre-cache templates used by all actions $globaltemplates = array( 'TEST', ); // pre-cache templates used by specific actions $actiontemplates = array( ); |
#130
|
|||
|
|||
OK, read through everything - I think. When I run test.php located in my development forum dir, it comes out correct
When I try to run test.php outside of my dev forum, I get this: http://www.rimfirecentral.com/test.php I have modified test.php with: PHP Code:
Thanks, Dan |
#131
|
|||
|
|||
I had the same style problem on my page outside of the forum. Copying the clientscript and images folders in the directory the test.php page resides seemed to correct that.
The problem I can't figure out though... the links in the navbar and footer portion of the test page do not link properly if the page is outside of the forum folder. The address is missing the forum portion of the URL. Example: link leads to http://www.yourdomain.com/register.php when it should lead to http://www.yourdomain.com/forum/register.php. |
#132
|
|||
|
|||
Quote:
"also needs to be added to the beginning of all the relative links in the navbar and footer templates." If I have to copy any script out there, I'm not even going to mess with it. I did have use for it if I could get it to work though. I'm also going to use it within my forum dir for two or three pages that I need too. Will start working on those tonight! |
#133
|
||||
|
||||
Quote:
They are for phrasegroups, and also for template-cache; meaning if you put your template names there then you will save 1 extra query. |
#134
|
||||
|
||||
Quote:
Would those lines cause more memory usage? |
#135
|
||||
|
||||
Those lines would cause less memory usage.
|
#136
|
||||
|
||||
Quote:
|
#137
|
|||
|
|||
Quote:
|
#138
|
|||
|
|||
i am wondering if i can use $post[musername] or other varibles in the text.
i have tried every combination i can think of with no luck. |
#139
|
|||
|
|||
nevermind i got it.
well most of it. i needed the following : $bbuserinfo[username] |
#140
|
||||
|
||||
Great hack!
|
#141
|
||||
|
||||
Quote:
To display the info about whoever is viewing the page (if they're a member) shouldn't be too hard. |
#142
|
||||
|
||||
How could I stick coppermine into this page??
|
#143
|
|||
|
|||
I must be doing something wrong. I've created test.php, renamed to privacy.php, changed all occurences of "test" to "privacy", uploaded to root folder and created template "privacy" in ACP, but all I get when going to myforums.org/privacy.php is a blank page. I'm befuddled...
|
#144
|
||||
|
||||
Quote:
|
#145
|
|||
|
|||
I have a question, and everybody is forewarned that I'm a bit of a hacking n00b.
Alrighty, taken care of that. I'm interesting in making my site run off of vB templates, etc to make it all look continuous (same footer, etc). However, I know you can't run php code in most of the templates (php_start, and end excluded from that), but a large section of my site uses php and mySQL to retrieve information. Am I correct in saying that if I put the php code in the actual page (test.php for example), that in my template "test", I can call the variables that are in test.php? (Like if I have the array $comicinfo, and I need $comicinfo[date], or even just "$date" that it would display?) Thanks in advance Chris |
#146
|
||||
|
||||
/me clicks install
|
#147
|
||||
|
||||
I was wondering. I don't see where this has been asked before or not. But can you use this hack and put another site withing the template? What I want to do is have my template and have another URL upen within the template so that my header is still on top and the other site can be viewed.
|
#148
|
||||
|
||||
Quote:
|
#149
|
||||
|
||||
This was just what i needed, thanks!
Got a question though, not really a hackproblem but i'm gonna ask it anyway I have a html page that i wanted to display inside the forum, and using this hack could do that perfectly, by just copying that html page inside the template. But, the html page is generated automatically each day so hardcopying it into the template isn't an option. Is there a way to grab the html contents and to display it inside the template? It kinda works by using an iframe in the template, but iframes need height dimensions and the generated page varies in height (and a scrollbar for the iframe looks very ugly). Any idea on how to do this? or how to set the height of the iframe to be variable? Or alternatively, is there a way to do it the other way around, add the header/navbar/footer to the html page (everthough it's generated i can determine what fixed components should be in this html page) and maybe shange the html page in an php page? Oh btw... [high]* BarBeQue clicks install [/high] |
#150
|
|||
|
|||
very nice
installed and thank You! |
#151
|
|||
|
|||
Omega]fantastic. thank you very much, Gary
|
#152
|
||||
|
||||
Have a question for you all???
I have added exactly what you have shown on the 1st page in order for this hack to work, but I'm running into a problem when this page is called up like this: http://www.gspotracing.com/4x4rigs/s.../cat/516/page/ I added your hack to the showphoto.php page and it only works in the whos online area when the page is being visited by: This link: http://www.gspotracing.com/4x4rigs/s...o.php?photo=61 And by a direct link to the page, but not by the 1st link I have given you above... PLEASE HELP ME.. I REALLY NEED THIS INTEGRATED HACK... |
#153
|
||||
|
||||
You must be a registered user to view images!
To register click on the REGISTER button in the menu above. |
#154
|
||||
|
||||
Quote:
|
#155
|
||||
|
||||
I dont know what I'm doing wrong here, please can someone help me on this. I have the following file being called: "referals.php" with the .php scripting in it and one template being used as well called: "reflist"... Any help would be appreciated, no matter what I do, nothing is outputed from the database. I see the columns correctly, but no usernames or number of referrals, I know there are many members with referrals at this time also. Maybe it's just something messed up in my coding.. PLEASE HELP...
HTML Code:
$stylevar[htmldoctype] <html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]"> <head> <title>$vboptions[bbtitle] - Top Referrers</title> $headinclude </head> <body> $header $navbar <table cellpadding="$stylevar[outerborderwidth]" cellspacing="0" border="0" class="tborder" width="$stylevar[tablewidth]" align="center"><tr><td> <table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%"> <tr> <td class="thead" colspan="3"><b>Top Referers!</b></td> </tr> <td class="alt1" align="center" $stylevar[tablewidth]><smallfont><b><u>Members</u></b></smallfont></td> <td class="alt2" align="center"><smallfont color="{tableheadtextcolor}"><b><u>Actual # of referrals verified</u></b></smallfont></td> <td class="alt1" align="center"><smallfont><b><u>Members Referred<br> And Successfully Registered/Activated</u></b></smallfont></td> </tr> <tr align="center"> <td><smallfont><b><a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$referrer[userid]">$referrer[username]</a></b></smallfont></td> <td><smallfont>$referreractual</smallfont></td> <td><smallfont>$referrerlist</smallfont></td> </tr> </table> </td> </tr> </table> $footer </body> </html> |
#156
|
||||
|
||||
Quote:
|
#157
|
|||
|
|||
hi, i installed this and it worked all ok.
wat im trying to achieve is have a phpMyChat section in it inbetween the header and the footer. how do i go about this? is there code that can call the file for the chat www.mywebsite.com/chat/chat/index.php3 that places it in the center. im only have basic html. can i create a table and have the page inside that? plz help |
#158
|
||||
|
||||
Quote:
You say you have done exactly as shown in the first page of this post. But you added to the PHP file. The way I understand this hack is that is was created so you can use the template that you create to put all your information in that you want displayed. I looked at your PHP file and you added to that. I doin think it was intended for this to be done. That is why I think no-one has replied to you on this. You have added the following code in you PHP file: Code:
//start referral script// $max=3; //This number decides how many users to display $referrers = $DB_site->query("SELECT COUNT(*) AS referrals, user.username, user.userid FROM user AS users LEFT JOIN user ON (users.referrerid = user.userid) WHERE users.referrerid <> 0 AND user.usergroupid=2 GROUP BY users.referrerid ORDER BY referrals DESC LIMIT $max"); while ($referrer=$DB_site->fetch_array($referrers)) { $referreds = $DB_site->query("SELECT username FROM user WHERE referrerid = '$referrer[userid]' AND user.usergroupid=2 GROUP BY username ORDER BY username ASC"); while ($referred = $DB_site->fetch_array($referreds)){ $enc_username = urlencode($referred[username]);//get username for href link info below if ($referrerlist) { $referrerlist.=", <A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>";//make referred members clickable to user info. } else { $referrerlist ="<A HREF=member.php?action=getinfo&username=$enc_username>$referred[username]</A>"; //make referred members clickable to user info. } } //show actual number of verified/registered members script $referredstest = $DB_site->query("SELECT COUNT(*) AS username FROM user WHERE referrerid = '$referrer[userid]' AND user.usergroupid=2 GROUP BY user.usergroupid ORDER BY referrerid DESC"); while ($referred11 = $DB_site->fetch_array($referredstest)){ if ($referreractual) { $referreractual.=", $referred11[username] "; } else { $referreractual = "$referred11[username]"; } //end actual # script } } |
#159
|
||||
|
||||
$vboptions[bburl] works better than $vboptions[homeurl] for those who don't have vB installed in the root directory.
|
#160
|
|||
|
|||
I'm lost can someone try to fill me in? LOL
Ok all I need to do is open up notepad and copy the first set of text in their right? I don't need to add any other <body> tags or anything? When I want to add stuff I just edit the template or do I edit the so called test file? Thanks for helping a NewB |
#161
|
||||
|
||||
Save the first set of text as a .php file in Notepad. Upload to your server.
When you want to add stuff edit the template. You don't need to edit the PHP file again. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|