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 |
#1282
|
|||
|
|||
is there a way to use this and have a flash file run in the center on the custom page?
|
#1283
|
||||
|
||||
sure, just make a table using vbulletins style variables so it has all the same style, then load your flash file wherever you want in that table.
|
#1284
|
|||
|
|||
Hello,
I need to integrate header and footer of the my site in vBulletin. Is there a way,I do not want to use iframes,neither want to use file_get_contents for getting the code. Is there a way to do it neatly in vbulletin. |
#1285
|
||||
|
||||
you're reading an article on how to create a vbulletin powered page that uses the vbulletin header and footer.
Did you actually even read it or are you waiting for someone to take you by the hand and read it for you? |
#1286
|
||||
|
||||
Since the user is new (first post) your derisive reaction is quite uncalled for. Especially as it seems you may not have read his question. Taking him by the hand to go through this article won't help him, since this article does not do what he wants to achieve.
@demo.hidden: You should open your own thread to ask this question in an appropriate forum. This article does not cover your question, hence this thread not really is the place to ask this. |
#1287
|
||||
|
||||
I'm sorry, I didn't even realize he had only a single post. I don't even remember replying to this thread to be honest.
|
#1288
|
|||
|
|||
is it possible to capture the output of an external script (maybe using include) and display it in the template? I need to assign some text to a variable and display it
thanks |
#1289
|
||||
|
||||
That's what the php part is for. Of course you can assign a value to a variable with php.
|
#1290
|
|||
|
|||
Any help for vb 4.1.0 ?
|
#1291
|
||||
|
||||
In a thread for vB3.x in the forum "vBulletin 3 Articles"? Probably not.
Try the vB4 version of this tutorial in the "vBulletin 4 Articles" forum: https://vborg.vbsupport.ru/showthread.php?t=228112 It should work perfectly well with vB4.1 |
#1292
|
|||
|
|||
Hi everyone.
The page title is set on the template, Code:
<title>$vboptions[bbtitle]</title> Thanks in advance. |
#1293
|
||||
|
||||
If you make a variable on the .php file like $customtitle, then put <title>$customtitle</title> in the template that *should* work. I'd try it at least.
|
#1294
|
|||
|
|||
Quote:
Thanks BirdOPrey5, I'll give it a try! Edit: Worked like a charm, thanks! |
#1295
|
|||
|
|||
Thanks for the tutorial, works perfect!
|
#1296
|
|||
|
|||
I need some help guys, I've got my page working for the most part. I just need to know how to make it parse BBCode that's being pulled from vBulletins threads.
|
#1297
|
||||
|
||||
Quote:
In the php file near the top add the lines: PHP Code:
PHP Code:
|
#1298
|
|||
|
|||
Quote:
PHP Code:
PHP Code:
Quote:
PHP Code:
Quote:
Then you can use this line (change the $rawthread and $parsedthread variables to your needs) to get the parsed output (BB Code converted to HTML) |
#1299
|
||||
|
||||
It looks like the errors are because you need the require_once ('./global.php') file above everything else basically... in your script directly under the "error reporting" line near the top. Also if this php file is in the same directory as your forum root (where global.php is located) you don't need the ./ just use require_once ('global.php');
Quote:
--------------- Added [DATE]1292812596[/DATE] at [TIME]1292812596[/TIME] --------------- Looking over your code you seem to be missing any data to parse... You don't parse a template usually, a template should have real HTML not BB Code. Usually text like posts and signatures would be the only things requiring parsing. |
#1300
|
|||
|
|||
Well I'm making some progress at least,.. you've got it working- which I owe you millions of thanks for, but I'm having an issue of it parsing a little to much onto the page.
I'll break down what I'm trying to accomplish. The test.php page calls a new template called test,. The test template calls a plugin named $homepage_recent_post,.. $homepage_recent_post displays: 7 recent threads from specific subforums, Display the thread title, Display the date posted, Display who posted it, Display the pagetext, (the post itself), Display a link to that thread. If I setup my test.php page like: PHP Code:
With this plugin: PHP Code:
I'll get the 7 last post, but they're unparsed. Now if I setup my test.php like: PHP Code:
and with the same $homepage_recent_post plugin, it'll parse the plugin- pagetext and all, but then it's parsing too much onto my page. Here's an example of the same post from above, but parsed. Is there any way to parse just post.pagetext onto this page instead of parsing the entire plugin? If so, how do I go about doing it? |
#1301
|
||||
|
||||
The BB Code parsing needs to be done in your plugin not the .php file...
Using the 1st version you posted in the above post make the plugin into: PHP Code:
PHP Code:
|
#1302
|
|||
|
|||
awesome bro, I'll go check it out right now, thanks for lending me a hand.
--------------- Added [DATE]1292886240[/DATE] at [TIME]1292886240[/TIME] --------------- Almost got it, we're most definitely closer.. It parses the post correctly but parsed the [img] into a clickable link instead of showing the picture. Any ideas? Using your suggestion results like this with or without requiring global at the top of the plugin, I also made the test.php with requiring the bbcode_parser, or the parsing line that it had previously.... I'm stumped.. --------------- Added [DATE]1292887793[/DATE] at [TIME]1292887793[/TIME] --------------- I just noticed something else, the plugin results in 14 results instead of 7, it displays the first 7 threads from the forum and displays each of them twice. |
#1303
|
|||
|
|||
I have fixed it where it shows the posts twice, but for some reason I cannot get it to parse the images from the post. Any ideas?
|
#1304
|
||||
|
||||
Yeah forgot they don't parse images when using 'nonforum'- replace that with a valid forum id of one of your forums where images are allowed...
Basically try something like... Code:
$thrds[pagetext] = $bbcode_parser->parse($thrds[pagetext] , 2, true,); |
#1305
|
|||
|
|||
Worked like a charm- I'm good to go. Thanks for helping me out soo much- I appreciate it. Happy Holidays!!
|
#1306
|
||||
|
||||
Glad to help. :up: Happy Holidays.
|
#1307
|
|||
|
|||
How do i add certain forums to the additional page? And would i be able to remove them from my index.php?
|
#1308
|
||||
|
||||
Add them in what way - a link? This is just a php page, so put in whatever php you need/want to do what you want. Or, if you just want a link, just put the link in the template.
|
#1309
|
||||
|
||||
It sounds like all you want is hidden forums.
|
#1310
|
|||
|
|||
Hi,
I never Create a new file and create the template. Any one cant help me to do that and include that on vbulletin? |
#1311
|
|||
|
|||
Here are the errors I'm getting on the page I created. Can someone please tell me what I've done wrong?
Quote:
|
#1312
|
||||
|
||||
What you did wrong was follow instructions for an article written for vBulletin 3.x when you have vBulletin 4.x. Please see the vBulletin 4 articles section for a comparable article- there are some significant differences in programming between the two when it comes to templates.
|
#1313
|
|||
|
|||
@#%@#
Took me forever googling around to find this. Could I please ask if you can point me in the right direction? |
#1314
|
||||
|
||||
It was the very first thread in the VB4 Articles Section:
https://vborg.vbsupport.ru/showthread.php?t=228112 [HOW TO - vB4] Create your own vBulletin page. |
#1315
|
||||
|
||||
Quote:
|
#1316
|
||||
|
||||
Thousands? That is impressive...
But yeah, the way templates are called (and cached) changed... Once you get the hang of it it's not too bad but it will mean a manual edit to every php file you have that calls a template (which is probably all of them.) |
#1317
|
||||
|
||||
Well, I have been running my site for over 10 years now. Converting the site over to the new format has been a heck of a job with a little still to go. I'd hate to start that process all over again. If I did would the required changes be required only in the php file or the template as well?
|
#1318
|
||||
|
||||
Both. Honestly, in your situation, I'd recommend using either the CMS (so hopefully you'd be converting one last time only) or creating just one framework page that pulls it's content data from a custom database table. This way, it'd be easier for future conversions. But, of course, I don't know what kind of pages we're talking about.
|
#1319
|
||||
|
||||
VB4 uses table-less design so depending on how much existing code you rely on in your templates could mean a lot of work. Also all template conditionals and variable uses in templates has changed.
|
#1320
|
||||
|
||||
Quote:
|
#1321
|
|||
|
|||
Anybody know how to make these pages searchable in google or other search engines? I've added the meta data to each of the templates for the pages I've created. However, I get no results when I search in google even when I enter the entire URL.
Thank you, any help is greatly appreciated. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|