vBadvanced Forums  

Installation Setting The Options Updates Upgrading F.A.Q. Help & Support


vBadvanced Homepage version 1.1
Introduction
vBadvanced Homepage is an advanced homepage / portal that will allow you to include different options from your vBulletin message board on your site's homepage. It also allows you to easily create and manage new pages which are completely powered by vBulletin and vBadvanced. In fact, this page right here and our homepage are both powered by vBadvanced Homepage. Everything is template based so it is very easy to customize and change everything through your Admin CP.
Features:
  • Login box for members to log in to your site on the homepage.
  • Post News in a forum you specify and have it appear on your homepage.
  • Show attachment from news posts.
  • Show the latest threads started in your forum on your homepage.
  • Show a poll and allow users to vote and see the results on your homepage.
  • Shows users avatar, new private messages, and buddy list for members who are logged in.
  • Shows a list of active users.
  • Shows statistics such as total members, threads, posts, top poster, newest member, and today's birthday's.
  • Shows a mini calendar with links to days with scheduled events, and a box with today's scheduled events.
  • Search box to allow users to quickly search your forums.
  • Set and change all options via the Admin CP.
  • Ability to easily switch on/off the polls, users avatar, buddy list, online users, search box, calendar, custom templates, news icons, news comments, smilies, set the maximum number of news posts, and many other options via the Admin CP.
  • Everything is completely template based so it is very easy to customize.
  • Install file that will make all database queries and templates for you in seconds.
  • Uninstalls in seconds.
  • Tested and stable with vBulletin 3.0 RC1, RC2, and RC3.
  • 100% validated XHTML 1.0 compliance
Scalebility & Queries
A nice feature of vBadvanced Homepage is that it is optimized and designed for large web sites. vBadvanced Homepage performs only 5 queries with all the options turned off. Some options will cause the script to perform extra queries, but even with all the options turned on it still performs only 17 queries at max.

Here is a list of each extra function that will cause extra queries:

  • News - 1 query
  • Latest Threads and/or Random Polls - 1 query (for forum permissions)
  • Latest Threads - 1 query
  • Poll - 1 query
  • User's Avatar - 1 query
  • Buddy List and/or Online Users - 1 query
  • Mini Calendar - 3 queries if a calendar ID is selected, 0 for the simple calendar
  • Stats - 1 query
  • New Posts - 1 query
Help & Support
Before asking for support, Please read the F.A.Q below! If you have any problems or questions that are not covered in the F.A.Q. please post them at vBadvanced.com, or on vbulletin.org in the vBadvanced Homepage thread. I will be more than happy to help in any way I can if the request for help is made there. Anyone trying to contact me via email, private message, or any other means will be ignored.
Copyright
This script is © 2003 - 2004 vBadvanced.com and PlurPlanet, LLC.
This hack is NOT to be re-distributed in any way or placed on a website for download without permission.
All copyright notes in the script itself must remain unchanged.


Installation Instructions
Step 1 - Admin CP Modifications
First log into your Admin CP and create a new forum called News and another called Polls (or whatever you would like for them to be called).

Setting you News & Polls forum's options:

  • If you do not want your News and Polls forum to be displayed on your forums index page, but do want to allow users to read and make comments on your news posts and polls - Set "Is active?" to no, and "Open for new posts?" to yes. Then edit the forums permissions and make sure only the groups you want to allow to post news and polls are allowed to post new threads, and be sure other groups are allowed to read these forums and post replies.
  • If you would like your new forums to be listed on your forums index page and would like to allow users to comment on news posts and polls - Set "Is active?" to yes, and "Open for new posts?" to yes. You will then need to edit your permissions for each forum and make sure only groups you want to be able to post news and polls have permission to make a new thread in these forums.
  • If you do not want your new forums to be displayed on your forums index page and do not want to allow users to comment on your news posts or polls - Set "Is active?" to yes, and "Open for new posts?" to yes. If you wish to limit the maximum number of characters displayed before a [read more] link replaces the rest of a news post, you must then edit forum permissions to and make sure Registered, Unregistered / Not Logged In, Users Awaiting Email Confirmation, and any additional groups have permission to view this forum, but not start new threads or post replies.
Next go to your Style Manager under "Styles & Templates" in your Admin CP. Choose to modify All Style Options. On this page, you will see a section for "Image Paths". Here you must change the path for each image directory (Title Image, Button Images Folder, Miscellaneous Images Folder, etc) to the full path (ex - /forum/images or http://yoursite.com/forum/images).

You must do this for each of your styles, otherwise your images will not show up!
Step 2 - Template Modifications
Open the templates.txt file which was included in the zip file. Make the changes to each template as specified there.
Step 3 - File Modifications
In your includes/adminfunctions_template.php file:

Find: 'forumhome' => $vbphrase['forum_home'],

Below that Add: 'index' => 'Index',
Make the following change to your includes/functions_calendar.php:

Find: function construct_calendar_output($today, $usertoday, $calendarinfo, $fullcalendar = 0, $weekrange = '')
{
  global $birthdaycache, $eventcache, $bbuserinfo, $vbphrase, $stylevar, $show, $offset, $colspan, $days, $months, $show;

Replace it with:function construct_calendar_output($today, $usertoday, $calendarinfo, $fullcalendar = 0, $weekrange = '', $dontshowweek = 0)
{
  global $birthdaycache, $eventcache, $bbuserinfo, $vbphrase, $stylevar, $show, $offset, $colspan, $days, $months, $show, $vboptions;
Make the following change to your includes/functions.php:

Find: if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))

Replace it with: if (THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'calendar' OR (THIS_SCRIPT == 'adv_index' AND $vboptions['showcalendar']) OR (THIS_SCRIPT == 'index' AND $vboptions['showevents']))
Now open your adv_index.php file in this folder and find:
chdir('/home/yoursite/public_html/forum');

Replace this with the full path to your forum on your server.
Example: chdir('/home/yoursite/public_html/forum');
Step 4 - Upload Files
Upload the new vBadvanced Homepage files and your modified vBulletin files to the directories listed below.

root folder - adv_index.php (you will probably rename this file to index.php once everything is set up)
root/forums/admincp - advindex_install.php
root/forums/includes - functions_calendar.php, functions.php, adminfunctions_template.php
root/forums/images/misc - noavatar.gif

Step 5 - Run the Install Script
Now you're almost done! It's time to add the vBadvanced Homepage settings and templates. Run the install script from your browser by going to http://yoursite.com/forum/admincp/advindex_install.php.

This script will make all necessary changes to your database and install the templates for you. Set the options as you wish and you're done!

Note: You must save the options in your Admin CP before they will take affect!


Setting the Options
News Forum ID - Here enter the ID number of your news forum. To figure out what this number is, go to your forums index page and put the mouse arrow over the link to your News forum. In your browsers status bar you will see a link with "http://yoursite.com/forum/forumdisplay.php?f=XX" where "XX" is the ID number of your forum.

Adds 1 Query
News Posts Maximum - As the description says, this is the maximum number of news posts you would like displayed on your homepage. If you wish to show all news posts, set this to 0.
News Maximum Characters - The maximum number of characters you would like to be displayed before the rest of the text is replaced by the [read more] link. If you wish to display the entire post no matter how long it is, set this to 0.
Allow News Comments? - If you would like show the number of comments and a link to make a comment about your news posts, set this to yes. If you do not want to display the comments links set this to no.
Show News Avatar? - Set this to yes if you would like to display the poster's avatar with the news post.
Show News Icon? - Set this to yes if you would like to display the selected icon with your news posts.
Show News Ratings? - Set this to yes if you would like to display the rating (stars images) of your news post.
Enable News Attachments? - When set to yes, this will display the first attachment associated with a news post.
Enable Printable Version? - When set to yes, this will display the small "printer" icon and allow your users to quickly show a printable version of the news post.
Enable Send to Friend? - When set to yes, this will display the small "send to friend" icon and allow your users to quickly send an email to a friend with a link to the news post.
Enable HMTL for News? - This will allow you to use HTML code in your news posts. Please note that this will only effect the way it is displayed on your homepage and not the actual thread itself.
Enable vBcode for News? - This will allow you to use vBcode tags in news news. Please note that this will only effect the way the text is displayed on your homepage and not the actual thread itself.
Enable vB image code for News? - This will allow you to use the [img] tag to post images with your news. If set to 'no' it will only display a link to the image. Please note that this will only effect the way it is displayed on your homepage and not the actual thread itself.
Allow News Smilies? - Switch this off to disable smilies in news posts. Please note that this will only effect the way it is displayed on your homepage and not the actual thread itself.
Polls Forum ID - This is the ID number of your polls forum. To figure out what this number is, go to your forums index page and hold the mouse arrow over the link to the forum. In your browsers status bar you will see a link with "http://yoursite.com/forum/forumdisplay.php?s=&forumid=XX" where "XX" is the ID number of your forum. You may also enter the word "RAND" in this field to pull a random poll from any forum a user has permission to access.

Adds 1 Query
Allow Poll Discussion? - Set this to yes if you would like to display the "Discuss This Poll" link and allow users to make comments about the poll. Be sure your forums permissions are set accordingly if you plan to use this.
Show Poll Smilies? - Switch this to "off" to disable smilie code in your polls question and options.
Latest Threads Maximum - This is the latest number of Latest Threads you would like to display on your homepage. You may set this to 0 to disable this option.

Adds 1 Query
Latest Threads Maximum Characters - The maximum number of characters in the posts title you would like to display before the rest is replaced by "...".
Show Latest Threads Date & Time? - Show the date and time the post was made in the Latest Threads section.
Show Latest Threads Icon? - Show the icon that was selected for the post in the Latest Threads section.
Latest Threads & Polls Excluded Forums - Here you may enter a list of forums that you wish to exclude from the latest threads section. Please not this also affects random fourms.
Calendar ID - Here you may specify a calendar id that you would like to display events from on your homepage.
To figure out what this number is, go to your Calendar Manager in the Admin CP. Hold the mouse arrow over the name of the calendar. In your browsers status bar you will see a link with "http://yoursite.com/forum/admincp/admincalendar.php?do=edit&calendarid=XX" where "XX" is the ID number of your forum.
You may also enter "-1" in this field to only display a simple calendar with no links to events which also requires no queries.

Adds 3 Queries (0 when "-1" is enterted and the simple calendar is displayed)
Block Bullet - This is the » symbol that is displayed next to each block's title. You may enter any HTML code here that you would like to be displayed by each title.
Show Users Avatar? - This option will display the users avatar on the homepage in the Welcome / Login block.

Adds 1 Query
Show New Posts? - When selected, this option will show a user the number of new posts since their last visit, along with a link to search for these new posts.

Adds 1 Query
Show Private Messages? - This option will display the number of new private messages a user has, along with a link to open their private message box. This will also enable the PM popup script on your homepage.
Show Search Box? - This option will display a simple search box on your homepage to allow your users to easily search your forums.
Show Users Buddylist? - This option will display the users buddylist on the homepage if they have any users in their buddy list.

This option adds 1 query unless the Online Users block is also displayed, in which case the same query pulls both.
Show Online Users? - This option will display a box of users that are currently online, along with the maximum number of users that were ever online at one time.

This option adds 1 query unless the Buddy list is also displayed, in which case the same query pulls both.
Show Stats? - This option will display stats such as the total number of members, posts, threads, your newest user, top poster, and today's birthdays.

Adds 2 queries
Show Welcome Box? - This option will display a box which allows users to log into your forums, or if the user is already logged in, it will display their avatar, new posts (if the options above are selected), and etc. With vBulletin 3's new navbar, some of this information is redundant, so there is now an option to turn this off.
Show Navbar? - This option will display the vBulletin navigation bar across the top of your homepage.


Creating More vBadvanced Pages
We have made it very easy for you to create new pages for your site using vBadvanced Homepage. It's as simple as creating a new template, and then linking to a specific URL. If the link contains the name of a new page, the content for this new template will replace the center news section on your homepage. Here's a quick tutorial on how this works:

  1. First, create a new template called index_links (For example purposes - You may change the "links" part to whatever you would like). Simply put the content that you would like displayed in this template - There is no need for body tags, the $header variable, or anything like this - only the content.
  2. Once you create the new template, simply link to it using something like: http://yoursite.com/adv_index.php?page=links. Simply add the suffix of your new templates after the "page=" part in the link and it will replace the news section of your homepage with the content of your new template.


Updates from v1.01 to v1.1
The new features include:

  • News Archive where you can display links and info about older news posts.
  • Online usere & buddylist now show "Username HTML Markup".
  • Shows subscribed threads in news, news archive, and latest threads.
  • Preivew on Latest threads and news archive (similar to the preview on forumdisplay).
  • Option to display what forum(s) the latest threads were posted in.
  • Poll icon in the latest threads section for threads which contain polls.
  • New option to change the date/time format for news posts.
  • Support for left/right text direction and languages.
  • All known bugs from v1.01 have been fixed.
There are 7 new options in your Admin CP which include:
  • News Date & Time Format (Allows you to change the date/time format for news posts)
  • Show News Subscribed Threads (Shows the "subscribed" icon in the news posts if a user is subscribed to that post)
  • Number of Archived News Posts to Display (Allows you to set the number of archived news posts you would like to display)
  • Show Preview in Archive? (Similar to the thread preview, shows a preview of the threads in the News Arcive section)
  • Show Subscribed Icon? (Shows the "subscribed" icon in the latest threads section for users that are subscribed to that thread)
  • Show Preview of New Threads? (Similar to the thread preview option for the forumdisplay page, it shows you a preview of the thread)
  • Show Latest Threads Forum? (Shows a link to, and the name of the forum the thread is in)

Most every template has changed as well, so it may be necessary to revert your templates and re-apply any chnages you have made.


Updates from v1.0 to v1.01
  • v1.01 has been released to fix some spacing issues that was apparently caused by my text editor. These spacing issues were causing problems for some users, but are fixed now.
  • Optimized a small bit of the code.


Updates from v1.0 RC3 to v1.0
  • Now fully phrased.
  • Updated to work with vBulletin RC.


Updates from v1.0 RC2 to v1.0 RC3
  • Updated the news section so you may now enter a list of forum ids to pull news posts from if you wish to have more than one news forum.
  • Added a new option to change each "block bullet" (The » symbol that appears next to each block's title).
  • Added a "Remember me?" checkbox to the login box to set whether the user will be automacitally logged in when they return to your site.
  • Fixed a bug where leaving the Excluded Forums option blank would result in a database error.
  • Fixed a bug where turning on news attachments would cause a database error if table prefixes are used.
  • Fixed a incorrect link that caused the search function to point to the wrong URL.
  • Fixed a bug that could cause the news avatar to appear as a broken image.
  • Fixed broken links in birthdays.
  • Fixed a bug that would cause the stats section to show an incorrect number of threads and posts.
  • Further optimized the code and reduced one query.


Updates from v1.0 RC1 to v1.0 RC2
  • Show attachments from news posts on your homepage.
  • Select which calendar you would like to display events from, or choose to have a simple calendar displayed with no links to events.
  • New option where you may specify a list of forum id's to exclude in the latest threads section (also affects the latest polls section if a random poll is selected).
  • Further optimized coding and reduced number of queries. Ability to disable vBcode in news posts.
  • Templates are now installed as global templates to prevent problems with different styles.


Upgrading From 1.0, 1.01, RC2, or RC3
To upgrade from v1.01, v1.0, RC2, or RC3 to v1.1 please follow these steps:
  1. Open your adv_index.php and change the chdir line to the full path to your fourms.
  2. Make the change to your functions.php file that is listed in the "File Changes" section above. There was a change in one of the recent vBulletin versions and this will be necessary for you calendar events to display properly.
  3. Upload the adv_index.php to your root directory (you probably want to rename this to index.php), and the advindex_install.php file to your forum/admincp directory.
  4. Go to the advindex_install.php file in your browser and select the option to upgrade.


Upgrading From RC1
To upgrade from RC1 it is recomended that you uninstall the script and re-install this version.


Frequently Asked Questions
Q. I get an error like this when I first try to install the script:
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/yoursite/html/adv_index.php on line 8

A.The path to your forums directory is set wrong. Create a file called info.php with the following content:

<? phpinfo(); ?>

Then upload that file to your server and go to it in your browser. You will see a list of options that were set by your host. One of them is called:

_SERVER["PATH_TRANSLATED"]

Copy that path, paste it over what you currently have for your path in the adv_index.php file, and reupload your adv_index.php file.

Q. Now that I've installed this script I can't log out!

A. Try clearing your cookies. If you're still having problems afterwards, edit your Cookie Domain (Under Cookies and HTTP Header Options in your vBulletin options section) and change that to ".yoursite.com" (note the two dots!).

Q. How can I use my forum's normal header and footer instead of the index_header and index_footer?

A. Edit your index template and replace $index_header and $index_footer with $header and $footer. Then you will need to edit your header template and change every link there to point to the full url to your forums (or you can just add $vboptions[bburl]/ in front of each one).


Help & Support
Before asking for support Please read the F.A.Q above! If you have any problems or questions that are not covered in the F.A.Q. please post them at vbadvanced.com or vbulletin.org in the vBadvanced Homepage thread. I will be more than happy to help in any way I can if the request for help is made there. Anyone trying to contact me via email, private message, or any other means will be ignored.