Forums

Click for Full Image

For some time now I have wanted to build a mobile vBulletin powered page for my mobile style and I finally succeeded after a few hours of messing around with it. It took a little bit of time, but I hope it helps you out.

Why am I build this mobile page? Well I wanted to make it easier to get mobile users to be able to see a page that had links to all my mobile apps without having to view it on the main forum style since I have set all mobile users to see the mobile style.

1. Create a php page:
- 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 – WARNING: the template name is CASE SENSITIVE!!!):

<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT', 'test.php');
define('CSRF_PROTECTION', true);
// change this depending on your filename

// ################### 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();

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = construct_navbits(array('' => 'Test'));
$navbar = render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle = 'Test';

// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######
$templater = vB_Template::create('Test');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('pagetitle', $pagetitle);
print_output($templater->render());

?> 

The above is based on Lynne and Gary’s post over at vBulletin.org on “How to Create Your Own vBulletin Page”, but here we are building it out for Bulletin’s Mobile style.

2. Creating the Template:
- Make sure you create this page in your Mobile Style, not your default or Master Style.
- Open your mobile style and in the dropdown menu choose “Add New Template”
- Add the following in your new template:

{vb:stylevar htmldoctype}
<html xmlns="http://www.w3.org/1999/xhtml"<vb:if condition="$vboptions['enablefacebookconnect']"> xmlns:fb="http://www.facebook.com/2008/fbml"</vb:if> dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
<head>
	{vb:raw headinclude}
	<title>{vb:raw vboptions.bbtitle}</title>
	{vb:raw headinclude_bottom}
</head>
<body>

{vb:raw header}

{vb:raw navbar}

<div id="pagetitle" class="pagetitle ui-bar-b">
	<h1 class="pagetitle">{vb:raw pagetitle}</h1>
</div>

YOUR CONTENT HERE

{vb:raw footer}
 </body>
</html>

A couple things of note:
Make sure that if you already have a normal vB powered page that you name your mobile style page something different as not to override your older page.

Please let me know if you have any questions or you can post in the comments if you need any help.

{ 0 comments }

This is pretty interesting…

LOS ANGELES, CA, Mar 07, 2012 – Internet Brands today announced the acquisition of Forum Runner ( www.forumrunner.net ), a mobile application that allows forum users to interact with online communities
from mobile devices. Forum Runner will operate as part of Internet Brands’ vBulletin software division.

You can read the rest of the story here

{ 0 comments }

ForumCon is Back for 2012

February 2, 2012

This year it will be once again in San Francisco, this time at the Hotel Kabuki on June 12th. I was wanting to go to Chicago last year, but my schedule just wouldn’t allow for it. This year I’m really thinking about going. Since it’s on the West Coast and it’s just a short flight [...]

Read the full article →

How to Disable vBadvanced when using vBulletin mobile style

January 24, 2012

*This is not for the mobile suite app, this is for the premium mobile style I love vBadvanced and use it on a couple of my forums. But there is one thing that bothers me, it doesn’t look good on a mobile phone when using the vBulletin premium mobile style. On one of my forums [...]

Read the full article →

SQL Query to Remove “Receive Emails from Administrators” in vBulletin

September 22, 2011

Sorry Guys I scheduled this post for the wrong day, DOH! As you saw in my post the other day about vBulletin and AOL emails fiasco. How do I uncheck all the “Receive Emails from Administrators” without searching the entire AOL and removing them one by one? First I did a search in my AdminCp, [...]

Read the full article →

vBulletin, AOL emails and My Troubles

September 20, 2011

For years I know that vBulletin and most other forum software programs have had issues with sending emails to AOL, whether it is registration emails, PM emails, newsletters, etc. So let me tell you about my issues that happen to me on Friday morning right before the long Labor Day Weekend, which I already planned [...]

Read the full article →