View Full Version : How to copy the navbar?
pjkcards
12-22-2008, 11:30 PM
I want to copy my forum's navbar to another page off the site. How do I do this?
There is a lot of PHP embedded into it, which may make it hard. Is there an easy way to do this?
Thanks in advance.
RLShare
12-23-2008, 01:11 AM
Is it a custom external page using Vbulletin templates? Either way, including global.php from the forum root will give you access to the $navbar variable which holds the navbar template code. But you should in all reality you should set the 'navbits' section and then rebuild it.
Dismounted
12-23-2008, 02:23 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=62164" target="_blank">How to create your own vBulletin-powered page!</a>
pjkcards
12-23-2008, 03:55 AM
No, it isn't an external page using vB templates. It is a wiki that is a sub-set of my site which uses vB. The wiki is in the /wiki directory, while vB is in the /forum directory. I want to include my navbar on the wiki, so I want to know how to copy it over.
Either way, including global.php from the forum root will give you access to the $navbar variable which holds the navbar template code. But you should in all reality you should set the 'navbits' section and then rebuild it.
How do I go about that? Copy global.php into /wiki, and then copy the navbar code over? What do you mean set the 'navbits' section and rebuild? If you could give me more details, that would be greatly appreciated.
Thanks!
pjkcards
12-25-2008, 02:45 AM
How do I go about that? Copy global.php into /wiki, and then copy the navbar code over? What do you mean set the 'navbits' section and rebuild? If you could give me more details, that would be greatly appreciated.
pjkcards
01-03-2009, 11:13 PM
Any help with this would be great. I'd like to get this squared away ASAP so I can move onto the next project.
Thanks!
Lynne
01-04-2009, 02:15 AM
in the php of the other pages, you would chdir to the vb directory and then include global.php:
chdir ('/path/to/your/vbforums');
require_once('./global.php');
pjkcards
01-04-2009, 02:59 AM
I don't quite understand. Do I simply copy all my navbar code, paste it into the /wiki page, and include the PHP code you pasted in it somewhere? Why chdir to the vb forums?
Lynne
01-04-2009, 03:06 AM
No, I thought you wanted to include that actual template and if you do, you need to include global.php in your pages and I was telling you the code to include global.php in the pages.
I am unfamiliar with whatever wiki you are trying to install, so I can't really comment on whether that is the right way to go about it or if it's better to just copy the navbar html itself.
pjkcards
01-04-2009, 03:21 AM
I have a Wiki installed as a sub-site of my forum. I want to create header so it looks very similar to the header of my forum, so users can navigate to the wiki without noticing too much of a difference. I have most of it complete, except I want the navbar displayed. It can be a custom navbar (HTML w/ links) that I will need to edit each time I add a link to the other navbar, but I simply want it to look the same. The navbar template has quite a bit of PHP (like if else statements) which would affect how the navbar looks. Hence, I am wondering if simply including the template would be easier. The navbar on my forum is actually built into the header, I can post the code if you can help me figure out what I need to do to make this work.
How would I go about this? Thanks!
Lynne
01-04-2009, 03:35 AM
Well, I don't know the wiki files, but I would guess there is some basic templates for it and you would add the navbar html into the one that puts out the header on the pages. You may have to ask how to do this on the site where you got the wiki.
pjkcards
01-04-2009, 03:46 AM
I know where the navbar code needs to go to make it appear, but what navbar code is my problem.
Here is my navbar code, I will put the global.php into the same directory as the wiki, what part of this do I need to put into the wiki to make the navbar appear?:
<!-- logo -->
<a name="top"></a>
<!-- main table --><table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center" class="maintable">
<tr>
<td><!-- content table --><table border="0" width="100%" cellpadding="0" cellspacing="0" align="center">
<tr>
<td class="header-row"><table border="0" cellspacing="0" cellpadding="0" class="header-table" width="100%">
<tr>
<td class="header-table-left" width="9"><img src="$vboptions[cleargifurl]" width="9" height="1" border="0" alt="" /></td>
<td align="$stylevar[left]" class="header-table-logo"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" onload="if(this.height > 165) { this.height = 165; }" /></a></td>
<td align="$stylevar[right]" valign="bottom" width="100%" nowrap="nowrap" class="header-table-login">
<if condition="$show['member']">
<div class="smallfont">
<strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<if condition="$show['pmstats']"><br /><phrase 1="$vbphrase[unread_x_nav_compiled]" 2="$vbphrase[total_x_nav_compiled]" 3="$session[sessionurl_q]">$vbphrase[private_messages_nav]</phrase></if>
<if condition="$show['pmwarning']"><br /><strong><phrase 1="$vbphrase[pmpercent_nav_compiled]">$vbphrase[your_pm_box_is_x_full]</phrase></strong></if>
</div>
<else />
<!-- login form -->
<!-- nav buttons bar -->
<tr>
<td style="border: none; padding: 0;"><table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="9" align="right" valign="bottom"><img src="$stylevar[imgdir_misc]/nav_top_left.gif" width="9" height="2" border="0" alt="" /></td>
<td width="100%" class="navbar-top-row"><img src="$vboptions[cleargifurl]" width="1" height="2" border="0" alt="" /></td>
<td width="9" align="left" valign="bottom"><img src="$stylevar[imgdir_misc]/nav_top_right.gif" width="9" height="2" border="0" alt="" /></td>
</tr>
</table></td>
</tr>
<tr>
<td class="navbar-row" align="center"><table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" class="navbar-row-table">
<tr align="center" class="vbmenu_dark">
<td width="9" align="right" style="padding: 0;"><img src="$stylevar[imgdir_misc]/nav_left.gif" width="9" height="21" border="0" alt="" /></td>
<td class="vbmenu_control">
<if condition="THIS_SCRIPT == 'adv_index'"><a href="$vboptions[bburl]/$vboptions[forumhome].php$session[sessionurl]">Forum <else />
<a href="http://www.domain.com">Home</if></a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
$template_hook[navbar_buttons_left]
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<if condition="$show['popups']">
<td id="FAQ/Rules" class="vbmenu_control">
<a href="#">FAQ/Rules</a>
<script type="text/javascript">
vbmenu_register("FAQ/Rules");
</script>
</td>
<td id="More" class="vbmenu_control">
<a href="#">More</a>
<script type="text/javascript">
vbmenu_register("More");
</script>
</td>
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></td>
</if>
<if condition="$show['member']">
<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>
</if>
</if>
$template_hook[navbar_buttons_right]
<if condition="$show['member']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
</if>
<td width="9" align="left" style="padding: 0;"><img src="$stylevar[imgdir_misc]/nav_right.gif" width="9" height="21" border="0" alt="" /></td>
</tr>
</table></td>
</tr>
</table>
<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->
<div class="vbmenu_popup" id="FAQ/Rules_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">FAQ/Rules</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/faq.php">FAQ</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/rules.php">Rules</a>
</td>
</tr>
</table>
</div>
<div class="vbmenu_popup" id="More_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">More</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/wiki" target="_blank">domain Wiki</a>
</td>
</tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/index.php?pageid=interviews" target="_blank">domain Interviews</a>
</td>
</tr>
<tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/chat.php" target="_blank">domain</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/" target="_blank">domain.com</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/linkto.php">Link to domain.com</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/exchange.php">Partners/Links</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/donate.php">Donate</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/premium.php">Premium Membership</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/subscribe.php">Subscribe</a>
</td>
</tr>
</table>
</div>
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
<tr>
<form action="http://www.google.com/custom" type="hidden" method=GET name="search"><td class="thead">Search Google</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<input type="hidden" name="client" value="pub-xxx">
<input type="hidden" name="forid" value="1">
<input type="hidden" name="ie" value="ISO-8859-1">
<input type="hidden" name="oe" value="ISO-8859-1">
<input name="cof" type="hidden" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:250;L:http://domain.com/forumlogo-1.gif;S:http://www.domain.com;FORID:1">
<input name="domains" type="hidden" value="www.domain.com">
<input type="hidden" name="hl" value="en">
<input type="text" class="bginput" name="q" size="25" maxlength="255" />$gobutton<br />
<input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></A>
</td></form>
</tr>
$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->
</if>
Lynne
01-04-2009, 03:51 AM
You can't put the global.php into the same directory. It calls other files also. If you are going to include it in a php file for your wiki, you may do so with the code I already posted. I'm still not sure exactly how you would get the $navbar template included. Like I said before, you may need to ask for help with this at the place you got the wiki.
pjkcards
01-04-2009, 04:02 AM
Oh, okay. I asked at their support forums and they referred me here., which does make sense. The problem I am having is making my navbar appear on a page off-site of vBulletin.
Perhaps just using the HTML of my navbar is easiest, rather than including the $navbar template. Can you help me put together my navbar in HTML so I can simply paste the HTML and go from there?
Also, when I include the PHP code you posted above into my main template, I get this error:
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/patjk/public_html/domain/wiki/skins/MonoBook.php on line 3
Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/patjk/public_html/domain/wiki/skins/MonoBook.php on line 4
Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='/home/patjk/public_html/domain/wiki:/home/patjk/public_html/domain/wiki/includes:/home/patjk/public_html/domain/wiki/languages:.:/usr/lib/php:/usr/local/lib/php') in /home/patjk/public_html/domain/wiki/skins/MonoBook.php on line 4
The global file is in "home/patjk/public_html/domain/wiki/skins/", as well as the path to the vbforums, which I specified.
Dismounted
01-04-2009, 04:23 AM
Please post the block of code you are using.
pjkcards
01-04-2009, 04:30 AM
Here it is, I bolded the part I added:
<?php
chdir ('/public_html/domain/forum');
require_once('./global.php');
/**
* MonoBook nouveau
*
* Translated from gwicke's previous TAL template version to remove
* dependency on PHPTAL.
*
* @todo document
* @file
* @ingroup Skins
*/
if( !defined( 'MEDIAWIKI' ) )
die( -1 );
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
* @todo document
* @ingroup Skins
*/
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
function initPage( &$out ) {
SkinTemplate::initPage( $out );
$this->skinname = 'monobook';
$this->stylename = 'monobook';
$this->template = 'MonoBookTemplate';
# Bug 14520: skins that just include this file shouldn't load nonexis-
# tent CSS fix files.
$this->cssfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl' );
}
}
/**
* @todo document
* @ingroup Skins
*/
class MonoBookTemplate extends QuickTemplate {
var $skin;
/**
* Template filter callback for MonoBook skin.
* Takes an associative array of data set from a SkinTemplate-based
* class, and a wrapper for MediaWiki's localization database, and
* outputs a formatted page.
*
* @access private
*/
function execute() {
global $wgRequest;
$this->skin = $skin = $this->data['skin'];
$action = $wgRequest->getText( 'action' );
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
} ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
<head>
<meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
<?php $this->html('headlinks') ?>
<title><?php $this->text('pagetitle') ?></title>
<style type="text/css" media="screen, projection">/*<![CDATA[*/
@import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
/*]]>*/</style>
<link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('printcss') ?>?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
<?php if( in_array( 'IE50', $skin->cssfiles ) ) { ?><!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE55', $skin->cssfiles ) ) { ?><!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE60', $skin->cssfiles ) ) { ?><!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE70', $skin->cssfiles ) ) { ?><!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } ?><!--[if lt IE 7]><?php if( in_array( 'IE', $skin->cssfiles ) ) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
<?php } ?><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
<!-- Head Scripts -->
<?php $this->html('headscripts') ?>
<?php if($this->data['jsvarurl']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl') ?>"><!-- site js --></script>
<?php } ?>
<?php if($this->data['pagecss']) { ?>
<style type="text/css"><?php $this->html('pagecss') ?></style>
<?php }
if($this->data['usercss']) { ?>
<style type="text/css"><?php $this->html('usercss') ?></style>
<?php }
if($this->data['userjs']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
<?php }
if($this->data['userjsprev']) { ?>
<script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
<?php }
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
</head>
<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload']) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?>
class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>">
<div id="header">
<a href="http://www.domain.com/wiki"><img src="http://domain/forumlogo-3.gif"></a>
</div>
<div id="wholebody">
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
<h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
<?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
<?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk') ?></div><?php } ?>
<?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
<!-- start content -->
<?php $this->html('bodytext') ?>
<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
<!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div id="p-cactions" class="portlet">
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['content_actions'] as $key => $tab) {
echo '
<li id="ca-' . Sanitizer::escapeId($key).'"';
if( $tab['class'] ) {
echo ' class="'.htmlspecialchars($tab['class']).'"';
}
echo'><a href="'.htmlspecialchars($tab['href']).'"';
# We don't want to give the watch tab an accesskey if the
# page is being edited, because that conflicts with the
# accesskey on the watch checkbox. We also don't want to
# give the edit tab an accesskey, because that's fairly su-
# perfluous and conflicts with an accesskey (Ctrl-E) often
# used for editing in Safari.
if( in_array( $action, array( 'edit', 'submit' ) )
&& in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
echo $skin->tooltip( "ca-$key" );
} else {
echo $skin->tooltipAndAccesskey( "ca-$key" );
}
echo '>'.htmlspecialchars($tab['text']).'</a></li>';
} ?>
</ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5><?php $this->msg('personaltools') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
<li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
if(!empty($item['class'])) { ?> class="<?php
echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
echo htmlspecialchars($item['text']) ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url(<?php $this->text('logopath') ?>);" <?php
?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php
echo $skin->tooltipAndAccesskey('n-mainpage') ?>></a>
</div>
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
<?php
$sidebar = $this->data['sidebar'];
if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
foreach ($sidebar as $boxName => $cont) {
if ( $boxName == 'SEARCH' ) {
$this->searchBox();
} elseif ( $boxName == 'TOOLBOX' ) {
$this->toolbox();
} elseif ( $boxName == 'LANGUAGES' ) {
$this->languageBox();
} else {
$this->customBox( $boxName, $cont );
}
}
?>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<?php
if($this->data['poweredbyico']) { ?>
<div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
<?php }
if($this->data['copyrightico']) { ?>
<div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
<?php }
// Generate additional footer links
?>
<ul id="f-list">
<?php
$footerlinks = array(
'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
'privacy', 'about', 'disclaimer', 'tagline',
);
foreach( $footerlinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
<?php }
}
?>
</ul>
</div>
</div></div>
<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
<?php $this->html('reporttime') ?>
<?php if ( $this->data['debug'] ): ?>
<!-- Debug output:
<?php $this->text( 'debug' ); ?>
-->
<?php endif; ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1539656-6");
pageTracker._trackPageview();
</script>
</body></html>
<?php
wfRestoreWarnings();
} // end of execute() method
/************************************************** ***********************************************/
function searchBox() {
?>
<div id="p-search" class="portlet">
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
<input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
if( isset( $this->data['search'] ) ) {
?> value="<?php $this->text('search') ?>"<?php } ?> />
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
</div></form>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function toolbox() {
?>
<div class="portlet" id="p-tb">
<h5><?php $this->msg('toolbox') ?></h5>
<div class="pBody">
<ul>
<?php
if($this->data['notspecialpage']) { ?>
<li id="t-whatlinkshere"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
<?php
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
<li id="t-recentchangeslinked"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
<?php }
}
if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
<li id="t-trackbacklink"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
<?php }
if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
<?php } ?></li><?php
}
foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
if($this->data['nav_urls'][$special]) {
?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
<?php }
}
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
<li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
}
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
<li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
}
wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
?>
</ul>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function languageBox() {
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet">
<h5><?php $this->msg('otherlanguages') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $langlink) { ?>
<li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<?php
}
}
/************************************************** ***********************************************/
function customBox( $bar, $cont ) {
?>
<div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
<?php foreach($cont as $key => $val) { ?>
<li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
if ( $val['active'] ) { ?> class="active" <?php }
?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
<?php } ?>
</ul>
<?php } else {
# allow raw HTML block to be defined by extensions
print $cont;
}
?>
</div>
</div>
<?php
}
} // end of class
Dismounted
01-04-2009, 04:47 AM
I'm quite sure that the public_html directory isn't in the filesystem root. The path should look more like:
/home/user/public_html/domain/forum
pjkcards
01-04-2009, 05:24 AM
Okay, that fixed that problem, but created another related to the navbar code I was using.
Say I wanted to use the $navbar template on some other site, separate of vB, how would I do that? Say all I wanted to do was create a page, and use the $navbar and make a navbar appear? What do I need to do to make that happen?
Thanks
Dismounted
01-04-2009, 05:40 AM
eval('$navbar = "' . fetch_template('navbar') . '";');
pjkcards
01-04-2009, 05:47 PM
I included that and didn't notice any affect. Here is the code I'm using, I bolded the parts that I added (took out my info and replaced it with 'user' and 'domain'). I added the code you just mentioned into the place where I wanted the navbar to appear. Why is it not appearing? Thanks!
<?php
chdir ('/home/user/public_html/domain/forum');
require_once('./global.php');
/**
* MonoBook nouveau
*
* Translated from gwicke's previous TAL template version to remove
* dependency on PHPTAL.
*
* @todo document
* @file
* @ingroup Skins
*/
if( !defined( 'MEDIAWIKI' ) )
die( -1 );
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
* @todo document
* @ingroup Skins
*/
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
function initPage( &$out ) {
SkinTemplate::initPage( $out );
$this->skinname = 'monobook';
$this->stylename = 'monobook';
$this->template = 'MonoBookTemplate';
# Bug 14520: skins that just include this file shouldn't load nonexis-
# tent CSS fix files.
$this->cssfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl' );
}
}
/**
* @todo document
* @ingroup Skins
*/
class MonoBookTemplate extends QuickTemplate {
var $skin;
/**
* Template filter callback for MonoBook skin.
* Takes an associative array of data set from a SkinTemplate-based
* class, and a wrapper for MediaWiki's localization database, and
* outputs a formatted page.
*
* @access private
*/
function execute() {
global $wgRequest;
$this->skin = $skin = $this->data['skin'];
$action = $wgRequest->getText( 'action' );
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
} ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
<head>
<meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php
$this->text('charset') ?>" />
<?php $this->html('headlinks') ?>
<title><?php $this->text('pagetitle') ?></title>
<style type="text/css" media="screen, projection">/*<![CDATA[*/
@import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion']
?>";
@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo
$GLOBALS['wgStyleVersion'] ?>";
/*]]>*/</style>
<link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?>
href="<?php $this->text('printcss') ?>?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
<?php if( in_array( 'IE50', $skin->cssfiles ) ) { ?><!--[if lt IE 5.5000]><style type="text/css">@import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css?<?php echo $GLOBALS['wgStyleVersion']
?>";</style><![endif]-->
<?php } if( in_array( 'IE55', $skin->cssfiles ) ) { ?><!--[if IE 5.5000]><style type="text/css">@import
"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css?<?php echo $GLOBALS['wgStyleVersion']
?>";</style><![endif]-->
<?php } if( in_array( 'IE60', $skin->cssfiles ) ) { ?><!--[if IE 6]><style type="text/css">@import "<?php
$this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion']
?>";</style><![endif]-->
<?php } if( in_array( 'IE70', $skin->cssfiles ) ) { ?><!--[if IE 7]><style type="text/css">@import "<?php
$this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion']
?>";</style><![endif]-->
<?php } ?><!--[if lt IE 7]><?php if( in_array( 'IE', $skin->cssfiles ) ) { ?><script type="<?php
$this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion']
?>"></script>
<?php } ?><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' )
?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
<!-- Head Scripts -->
<?php $this->html('headscripts') ?>
<?php if($this->data['jsvarurl']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl') ?>"><!-- site js
--></script>
<?php } ?>
<?php if($this->data['pagecss']) { ?>
<style type="text/css"><?php $this->html('pagecss') ?></style>
<?php }
if($this->data['usercss']) { ?>
<style type="text/css"><?php $this->html('usercss') ?></style>
<?php }
if($this->data['userjs']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
<?php }
if($this->data['userjsprev']) { ?>
<script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
<?php }
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
</head>
<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload']) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?>
class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>">
<div id="header">
<a href="http://www.domain.com/wiki"><img src="http:/domain/forumlogo-3.gif"></a>
eval('$navbar = "' . fetch_template('navbar') . '";');
</div>
<div id="wholebody">
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php }
?>
<h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title')
?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
<?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete')
?></div><?php } ?>
<?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk')
?></div><?php } ?>
<?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a
href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch')
?></a></div><?php } ?>
<!-- start content -->
<?php $this->html('bodytext') ?>
<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
<!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div id="p-cactions" class="portlet">
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['content_actions'] as $key => $tab) {
echo '
<li id="ca-' . Sanitizer::escapeId($key).'"';
if( $tab['class'] ) {
echo ' class="'.htmlspecialchars($tab['class']).'"';
}
echo'><a href="'.htmlspecialchars($tab['href']).'"';
# We don't want to give the watch tab an accesskey if the
# page is being edited, because that conflicts with the
# accesskey on the watch checkbox. We also don't want to
# give the edit tab an accesskey, because that's fairly su-
# perfluous and conflicts with an accesskey (Ctrl-E) often
# used for editing in Safari.
if( in_array( $action, array( 'edit', 'submit' ) )
&& in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
echo $skin->tooltip( "ca-$key" );
} else {
echo $skin->tooltipAndAccesskey( "ca-$key" );
}
echo '>'.htmlspecialchars($tab['text']).'</a></li>';
} ?>
</ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5><?php $this->msg('personaltools') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
<li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key)
?><?php
if(!empty($item['class'])) { ?> class="<?php
echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
echo htmlspecialchars($item['text']) ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url(<?php $this->text('logopath') ?>);" <?php
?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php
echo $skin->tooltipAndAccesskey('n-mainpage') ?>></a>
</div>
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
<?php
$sidebar = $this->data['sidebar'];
if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
foreach ($sidebar as $boxName => $cont) {
if ( $boxName == 'SEARCH' ) {
$this->searchBox();
} elseif ( $boxName == 'TOOLBOX' ) {
$this->toolbox();
} elseif ( $boxName == 'LANGUAGES' ) {
$this->languageBox();
} else {
$this->customBox( $boxName, $cont );
}
}
?>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<?php
if($this->data['poweredbyico']) { ?>
<div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
<?php }
if($this->data['copyrightico']) { ?>
<div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
<?php }
// Generate additional footer links
?>
<ul id="f-list">
<?php
$footerlinks = array(
'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
'privacy', 'about', 'disclaimer', 'tagline',
);
foreach( $footerlinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
<?php }
}
?>
</ul>
</div>
</div></div>
<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
<?php $this->html('reporttime') ?>
<?php if ( $this->data['debug'] ): ?>
<!-- Debug output:
<?php $this->text( 'debug' ); ?>
-->
<?php endif; ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1539656-6");
pageTracker._trackPageview();
</script>
</body></html>
<?php
wfRestoreWarnings();
} // end of execute() method
/************************************************** ***********************************************/
function searchBox() {
?>
<div id="p-search" class="portlet">
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
<input id="searchInput" name="search" type="text"<?php echo
$this->skin->tooltipAndAccesskey('search');
if( isset( $this->data['search'] ) ) {
?> value="<?php $this->text('search') ?>"<?php } ?> />
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php
$this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php
$this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
</div></form>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function toolbox() {
?>
<div class="portlet" id="p-tb">
<h5><?php $this->msg('toolbox') ?></h5>
<div class="pBody">
<ul>
<?php
if($this->data['notspecialpage']) { ?>
<li id="t-whatlinkshere"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php
$this->msg('whatlinkshere') ?></a></li>
<?php
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
<li id="t-recentchangeslinked"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php
$this->msg('recentchangeslinked') ?></a></li>
<?php }
}
if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
<li id="t-trackbacklink"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php
$this->msg('trackbacklink') ?></a></li>
<?php }
if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
echo htmlspecialchars($feed['href']) ?>"<?php echo
$this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
<?php } ?></li><?php
}
foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
if($this->data['nav_urls'][$special]) {
?><li id="t-<?php echo $special ?>"><a href="<?php echo
htmlspecialchars($this->data['nav_urls'][$special]['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special)
?></a></li>
<?php }
}
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
<li id="t-print"><a href="<?php echo
htmlspecialchars($this->data['nav_urls']['print']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php
$this->msg('printableversion') ?></a></li><?php
}
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo
htmlspecialchars($this->data['nav_urls']['permalink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php
$this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
<li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php
$this->msg('permalink') ?></li><?php
}
wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
?>
</ul>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function languageBox() {
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet">
<h5><?php $this->msg('otherlanguages') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $langlink) { ?>
<li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text']
?></a></li>
<?php } ?>
</ul>
</div>
</div>
<?php
}
}
/************************************************** ***********************************************/
function customBox( $bar, $cont ) {
?>
<div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo
$this->skin->tooltip('p-'.$bar) ?>>
<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
<?php foreach($cont as $key => $val) { ?>
<li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
if ( $val['active'] ) { ?> class="active" <?php }
?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo
$this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
<?php } ?>
</ul>
<?php } else {
# allow raw HTML block to be defined by extensions
print $cont;
}
?>
</div>
</div>
<?php
}
} // end of class
Lynne
01-04-2009, 07:37 PM
The eval line is php and you have it sitting in the middle of a bunch of html. You can probably put that eval line right after the require_once global.php line. Then, where you currently have the eval line, just put $navbar
Zachery
01-04-2009, 07:54 PM
If you're trying to insert the vbulletin navbar into an external app, be aware the navbar won't look like it does in vB with its pretty drill down folder view or anything. You'll also haev to make that happen yourself for any page you include it on.
Lynne
01-04-2009, 08:03 PM
I didn't even think of that Zachery, you are right. You would really need to include the $header and $headerinclude templates also. Basically, you would want to follow one of these articles and insert your wiki text into them - How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc. (https://vborg.vbsupport.ru/showthread.php?t=98009)
UKBusinessLive
01-04-2009, 08:35 PM
I have a Wiki installed as a sub-site of my forum. I want to create header so it looks very similar to the header of my forum, so users can navigate to the wiki without noticing too much of a difference. I have most of it complete, except I want the navbar displayed. It can be a custom navbar (HTML w/ links) that I will need to edit each time I add a link to the other navbar, but I simply want it to look the same. The navbar template has quite a bit of PHP (like if else statements) which would affect how the navbar looks. Hence, I am wondering if simply including the template would be easier. The navbar on my forum is actually built into the header, I can post the code if you can help me figure out what I need to do to make this work.
How would I go about this? Thanks!
would something like this help??
Demo: http://www.ukbusinesslive.co.uk/forum/demo.html
https://vborg.vbsupport.ru/showthread.php?t=200686
Its html and an easy edit for your forum or alternative site :)
pjkcards
01-04-2009, 10:56 PM
I didn't even think of that Zachery, you are right. You would really need to include the $header and $headerinclude templates also. Basically, you would want to follow one of these articles and insert your wiki text into them - How to create your own vBulletin-powered page! (uses vB templates) or [How-To] vBulletin API Basics: Creating Custom Pages & Misc.
Would I use these to include the $headericnlue and $header templates?:
eval('$headerinclude = "' . fetch_template('headerinclude') . '";');
eval('$header = "' . fetch_template('header') . '";');
After I have done that, along with what you mentioned in regards to the $navbar, would that make the navbar format nicely? Would I need to put $headerinclude and $header variables with my $navbar variable that you mentioned above?
As far as the two links you gave me, I have created several vB powered pages with content for Premium Memberships and whatnot. However, the wiki is in /wiki, so simply inserting my wiki homepage code into a vB powered powered page wouldn't work, I don't think, since that would make no changes to /wiki files.
would something like this help??
Demo: http://www.ukbusinesslive.co.uk/forum/demo.html
https://vborg.vbsupport.ru/showthread.php?t=200686
Its html and an easy edit for your forum or alternative site
That is nice, however, it isn't what I need. I want to copy my navbar. By using what you have, I'd have to change my existing navbar as well. Thanks though.
Lynne
01-04-2009, 11:11 PM
Would I use these to include the $headericnlue and $header templates?:
eval('$headerinclude = "' . fetch_template('headerinclude') . '";');
eval('$header = "' . fetch_template('header') . '";');
After I have done that, along with what you mentioned in regards to the $navbar, would that make the navbar format nicely? Would I need to put $headerinclude and $header variables with my $navbar variable that you mentioned above?
I really don't know. I've never tried to do what you are doing. I think you are just going to have to do this by trial and error.
pjkcards
01-05-2009, 12:47 AM
Okay. I tried what you suggested in post #21, and I get this error:
Fatal error: Call to a member function query_first_slave() on a non-object in /home/user/public_html/domain/forum/includes/functions.php on line 1178
This seems like something that should be quite do-able. If I can at least make the navbar exist without errors, I can work toward formatting it. Why is the above error is occurring?
Lynne
01-05-2009, 02:14 AM
I was thinking about this some more and realized even if you get the head/headinclude/navbar to print out on that page, the links may all be wrong since they are going to assume you are in the vb directory. You really may have a much easier time just copying the page source of the navbar from one of your forum pages and putting it in your wiki page.
Dismounted
01-05-2009, 02:23 AM
the links may all be wrong since they are going to assume you are in the vb directory.
The HTML base element comes to save the day!
<base href="http://www.yoursite/forum" />
Lynne
01-05-2009, 02:27 AM
Ah yes, I forgot about that (cuz it doesn't work on my test site - weird).
As for the error.... I'm not sure. Did you define the $navbits like in those articles I linked you to? I know those get used in the navbar and I'm not sure what would happen if you don't define them.
pjkcards
01-05-2009, 02:42 AM
I was thinking about this some more and realized even if you get the head/headinclude/navbar to print out on that page, the links may all be wrong since they are going to assume you are in the vb directory. You really may have a much easier time just copying the page source of the navbar from one of your forum pages and putting it in your wiki page.
I am unsure how to include the $header and $headerinclude. Here is what I have thus far. I don't want to display the entire $header, I only simply need the navbar to show, but I have included the $header and $headerinclude since you stated it was necessary:
<?php
chdir ('home/user/public_html/domain/forum');
require_once('./global.php');
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('$headerinclude = "' . fetch_template('headerinclude') . '";');
eval('$header = "' . fetch_template('header') . '";');
/**
* MonoBook nouveau
*
* Translated from gwicke's previous TAL template version to remove
* dependency on PHPTAL.
*
* @todo document
* @file
* @ingroup Skins
*/
if( !defined( 'MEDIAWIKI' ) )
die( -1 );
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
* @todo document
* @ingroup Skins
*/
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
function initPage( &$out ) {
SkinTemplate::initPage( $out );
$this->skinname = 'monobook';
$this->stylename = 'monobook';
$this->template = 'MonoBookTemplate';
# Bug 14520: skins that just include this file shouldn't load nonexis-
# tent CSS fix files.
$this->cssfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl' );
}
}
/**
* @todo document
* @ingroup Skins
*/
class MonoBookTemplate extends QuickTemplate {
var $skin;
/**
* Template filter callback for MonoBook skin.
* Takes an associative array of data set from a SkinTemplate-based
* class, and a wrapper for MediaWiki's localization database, and
* outputs a formatted page.
*
* @access private
*/
function execute() {
global $wgRequest;
$this->skin = $skin = $this->data['skin'];
$action = $wgRequest->getText( 'action' );
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
} ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
<head>
<meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
<?php $this->html('headlinks') ?>
<title><?php $this->text('pagetitle') ?></title>
<style type="text/css" media="screen, projection">/*<![CDATA[*/
@import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
/*]]>*/</style>
<link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('printcss') ?>?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
<?php if( in_array( 'IE50', $skin->cssfiles ) ) { ?><!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE55', $skin->cssfiles ) ) { ?><!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE60', $skin->cssfiles ) ) { ?><!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE70', $skin->cssfiles ) ) { ?><!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } ?><!--[if lt IE 7]><?php if( in_array( 'IE', $skin->cssfiles ) ) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
<?php } ?><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
<!-- Head Scripts -->
<?php $this->html('headscripts') ?>
<?php if($this->data['jsvarurl']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl') ?>"><!-- site js --></script>
<?php } ?>
<?php if($this->data['pagecss']) { ?>
<style type="text/css"><?php $this->html('pagecss') ?></style>
<?php }
if($this->data['usercss']) { ?>
<style type="text/css"><?php $this->html('usercss') ?></style>
<?php }
if($this->data['userjs']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
<?php }
if($this->data['userjsprev']) { ?>
<script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
<?php }
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
</head>
<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
<?php if($this->data['body_onload']) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?>
class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>">
<div id="header">
<a href="http://www.domain.com/wiki"><img src="http://domain.com/forumlogo-3.gif"></a>
$navbar
</div>
<div id="wholebody">
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
<h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
<?php if($this->data['undelete']) { ?><div id="contentSub2"><?php $this->html('undelete') ?></div><?php } ?>
<?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk') ?></div><?php } ?>
<?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
<!-- start content -->
<?php $this->html('bodytext') ?>
<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
<!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div id="p-cactions" class="portlet">
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['content_actions'] as $key => $tab) {
echo '
<li id="ca-' . Sanitizer::escapeId($key).'"';
if( $tab['class'] ) {
echo ' class="'.htmlspecialchars($tab['class']).'"';
}
echo'><a href="'.htmlspecialchars($tab['href']).'"';
# We don't want to give the watch tab an accesskey if the
# page is being edited, because that conflicts with the
# accesskey on the watch checkbox. We also don't want to
# give the edit tab an accesskey, because that's fairly su-
# perfluous and conflicts with an accesskey (Ctrl-E) often
# used for editing in Safari.
if( in_array( $action, array( 'edit', 'submit' ) )
&& in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
echo $skin->tooltip( "ca-$key" );
} else {
echo $skin->tooltipAndAccesskey( "ca-$key" );
}
echo '>'.htmlspecialchars($tab['text']).'</a></li>';
} ?>
</ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5><?php $this->msg('personaltools') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
<li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
if(!empty($item['class'])) { ?> class="<?php
echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
echo htmlspecialchars($item['text']) ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url(<?php $this->text('logopath') ?>);" <?php
?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php
echo $skin->tooltipAndAccesskey('n-mainpage') ?>></a>
</div>
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
<?php
$sidebar = $this->data['sidebar'];
if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
foreach ($sidebar as $boxName => $cont) {
if ( $boxName == 'SEARCH' ) {
$this->searchBox();
} elseif ( $boxName == 'TOOLBOX' ) {
$this->toolbox();
} elseif ( $boxName == 'LANGUAGES' ) {
$this->languageBox();
} else {
$this->customBox( $boxName, $cont );
}
}
?>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<?php
if($this->data['poweredbyico']) { ?>
<div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
<?php }
if($this->data['copyrightico']) { ?>
<div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
<?php }
// Generate additional footer links
?>
<ul id="f-list">
<?php
$footerlinks = array(
'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
'privacy', 'about', 'disclaimer', 'tagline',
);
foreach( $footerlinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
<?php }
}
?>
</ul>
</div>
</div></div>
<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
<?php $this->html('reporttime') ?>
<?php if ( $this->data['debug'] ): ?>
<!-- Debug output:
<?php $this->text( 'debug' ); ?>
-->
<?php endif; ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1539656-6");
pageTracker._trackPageview();
</script>
</body></html>
<?php
wfRestoreWarnings();
} // end of execute() method
/************************************************** ***********************************************/
function searchBox() {
?>
<div id="p-search" class="portlet">
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
<input id="searchInput" name="search" type="text"<?php echo $this->skin->tooltipAndAccesskey('search');
if( isset( $this->data['search'] ) ) {
?> value="<?php $this->text('search') ?>"<?php } ?> />
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
</div></form>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function toolbox() {
?>
<div class="portlet" id="p-tb">
<h5><?php $this->msg('toolbox') ?></h5>
<div class="pBody">
<ul>
<?php
if($this->data['notspecialpage']) { ?>
<li id="t-whatlinkshere"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
<?php
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
<li id="t-recentchangeslinked"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
<?php }
}
if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
<li id="t-trackbacklink"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
<?php }
if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
echo htmlspecialchars($feed['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a> </span>
<?php } ?></li><?php
}
foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
if($this->data['nav_urls'][$special]) {
?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
<?php }
}
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
<li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
}
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
<li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
}
wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
?>
</ul>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function languageBox() {
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet">
<h5><?php $this->msg('otherlanguages') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $langlink) { ?>
<li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<?php
}
}
/************************************************** ***********************************************/
function customBox( $bar, $cont ) {
?>
<div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
<?php foreach($cont as $key => $val) { ?>
<li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
if ( $val['active'] ) { ?> class="active" <?php }
?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
<?php } ?>
</ul>
<?php } else {
# allow raw HTML block to be defined by extensions
print $cont;
}
?>
</div>
</div>
<?php
}
} // end of class
Post 2:
Did you define the $navbits like in those articles I linked you to? I know those get used in the navbar and I'm not sure what would happen if you don't define them.
I am unsure how to include those. Do I put this in the file as well?:
$navbits = construct_navbits($navbits);
The HTML base element comes to save the day!
How/where do I use this?
I really appreciate your assistance and time thus far! Thanks.
Lynne
01-05-2009, 02:51 AM
Put all the stuff related to the navbits into your code just prior to evaling the $navbar (just like in those articles). I don't believe you need to eval the header or headinclude cuz that happens in global.php. But, you definitely need to include a bunch of the code from those templates in your page even if you don't want to include the actual header or headinclude - you need the page css and menu javascript otherwise your navbar is just not gonna work (or look ok). You may need more than that, but as I've said, I've never gone about doing what your doing so I've never really analyzed it much.
And the base code is html that would need to go in the <head> part of your page.
Dismounted
01-05-2009, 02:51 AM
Ah yes, I forgot about that (cuz it doesn't work on my test site - weird).
Make sure it is place at the top of headinclude. :)
How/where do I use this?
As above.
Lynne
01-05-2009, 02:54 AM
Make sure it is place at the top of headinclude. :)
I did. I actually have a thread around here somewhere about it. It's a very odd problem that I finally just gave up on.
pjkcards
01-05-2009, 03:45 AM
Put all the stuff related to the navbits into your code just prior to evaling the $navbar (just like in those articles). I don't believe you need to eval the header or headinclude cuz that happens in global.php. But, you definitely need to include a bunch of the code from those templates in your page even if you don't want to include the actual header or headinclude - you need the page css and menu javascript otherwise your navbar is just not gonna work (or look ok). You may need more than that, but as I've said, I've never gone about doing what your doing so I've never really analyzed it much.
And the base code is html that would need to go in the <head> part of your page.
I am getting this error again:
Fatal error: Call to a member function query_first_slave() on a non-object in /home/user/public_html/domain/forum/includes/functions.php on line 1178
Here is the code I used (bolded new stuff, red stuff is what I pulled from the links you gave). Is this the correct navbits stuff to add?:
<?php
chdir ('/home/user/public_html/domain/forum');
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// ##################### DEFINE IMPORTANT CONSTANTS #######################
// change the line below to the actual filename without ".php" extention.
// the reason for using actual filename without extention as a value of this constant is to ensure
uniqueness of the value throughout every PHP file of any given vBulletin installation.
define('THIS_SCRIPT', 'test');
// #################### 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(
// change the lines below to the list of actual templates used in the script
'test_mytesttemplate1',
'test_mytesttemplate22',
);
// pre-cache templates used by specific actions
$actiontemplates = array();
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
// #################### HARD CODE JAVASCRIPT PATHS ########################
$headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript',
$headinclude);
// ################################################## ######################
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
$navbits = array();
// change the line below to contain whatever you want to show in the navbar (title of your custom page)
$navbits[$parent] = 'Test Page';
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
/**
* MonoBook nouveau
*
* Translated from gwicke's previous TAL template version to remove
* dependency on PHPTAL.
*
* @todo document
* @file
* @ingroup Skins
*/
if( !defined( 'MEDIAWIKI' ) )
die( -1 );
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
* @todo document
* @ingroup Skins
*/
class SkinMonoBook extends SkinTemplate {
/** Using monobook. */
function initPage( &$out ) {
SkinTemplate::initPage( $out );
$this->skinname = 'monobook';
$this->stylename = 'monobook';
$this->template = 'MonoBookTemplate';
# Bug 14520: skins that just include this file shouldn't load nonexis-
# tent CSS fix files.
$this->cssfiles = array( 'IE', 'IE50', 'IE55', 'IE60', 'IE70', 'rtl' );
}
}
/**
* @todo document
* @ingroup Skins
*/
class MonoBookTemplate extends QuickTemplate {
var $skin;
/**
* Template filter callback for MonoBook skin.
* Takes an associative array of data set from a SkinTemplate-based
* class, and a wrapper for MediaWiki's localization database, and
* outputs a formatted page.
*
* @access private
*/
function execute() {
global $wgRequest;
$this->skin = $skin = $this->data['skin'];
$action = $wgRequest->getText( 'action' );
// Suppress warnings to prevent notices about missing indexes in $this->data
wfSuppressWarnings();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php
foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
} ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php
$this->text('dir') ?>">
<head>
<base href="http://www.domain.com/forum" />
<meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php
$this->text('charset') ?>" />
<?php $this->html('headlinks') ?>
<title><?php $this->text('pagetitle') ?></title>
<style type="text/css" media="screen, projection">/*<![CDATA[*/
@import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo
$GLOBALS['wgStyleVersion'] ?>";
@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename')
?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
/*]]>*/</style>
<link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) {
?>media="print"<?php } ?> href="<?php $this->text('printcss') ?>?<?php echo $GLOBALS['wgStyleVersion']
?>" />
<?php if( in_array( 'IE50', $skin->cssfiles ) ) { ?><!--[if lt IE 5.5000]><style
type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename')
?>/IE50Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE55', $skin->cssfiles ) ) { ?><!--[if IE 5.5000]><style
type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename')
?>/IE55Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE60', $skin->cssfiles ) ) { ?><!--[if IE 6]><style
type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename')
?>/IE60Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } if( in_array( 'IE70', $skin->cssfiles ) ) { ?><!--[if IE 7]><style
type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename')
?>/IE70Fixes.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";</style><![endif]-->
<?php } ?><!--[if lt IE 7]><?php if( in_array( 'IE', $skin->cssfiles ) ) { ?><script
type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php
echo $GLOBALS['wgStyleVersion'] ?>"></script>
<?php } ?><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' )
?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
<!-- Head Scripts -->
<?php $this->html('headscripts') ?>
<?php if($this->data['jsvarurl']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl')
?>"><!-- site js --></script>
<?php } ?>
<?php if($this->data['pagecss']) { ?>
<style type="text/css"><?php $this->html('pagecss') ?></style>
<?php }
if($this->data['usercss']) { ?>
<style type="text/css"><?php $this->html('usercss') ?></style>
<?php }
if($this->data['userjs']) { ?>
<script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' )
?>"></script>
<?php }
if($this->data['userjsprev']) { ?>
<script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev')
?></script>
<?php }
if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
</head>
<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick')
?>"<?php } ?>
<?php if($this->data['body_onload']) { ?> onload="<?php $this->text('body_onload') ?>"<?php } ?>
class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php
$this->text('pageclass') ?>">
<div id="header">
<a href="http://www.domain.com/wiki"><img
src="http://img.photobucket.com/albums/v113/domain/forumlogo-3.gif"></a>
$navbar
</div>
<div id="wholebody">
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php
$this->html('sitenotice') ?></div><?php } ?>
<h1 class="firstHeading"><?php
$this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"><?php $this->html('subtitle') ?></div>
<?php if($this->data['undelete']) { ?><div id="contentSub2"><?php
$this->html('undelete') ?></div><?php } ?>
<?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php
$this->html('newtalk') ?></div><?php } ?>
<?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php
$this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a
href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
<!-- start content -->
<?php $this->html('bodytext') ?>
<?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
<!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div id="p-cactions" class="portlet">
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['content_actions'] as $key => $tab) {
echo '
<li id="ca-' . Sanitizer::escapeId($key).'"';
if( $tab['class'] ) {
echo ' class="'.htmlspecialchars($tab['class']).'"';
}
echo'><a href="'.htmlspecialchars($tab['href']).'"';
# We don't want to give the watch tab an accesskey if the
# page is being edited, because that conflicts with the
# accesskey on the watch checkbox. We also don't want to
# give the edit tab an accesskey, because that's fairly su-
# perfluous and conflicts with an accesskey (Ctrl-E) often
# used for editing in Safari.
if( in_array( $action, array( 'edit', 'submit' ) )
&& in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
echo $skin->tooltip( "ca-$key" );
} else {
echo $skin->tooltipAndAccesskey( "ca-$key" );
}
echo '>'.htmlspecialchars($tab['text']).'</a></li>';
} ?>
</ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5><?php $this->msg('personaltools') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
<li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
if ($item['active']) { ?> class="active"<?php } ?>><a
href="<?php
echo htmlspecialchars($item['href']) ?>"<?php echo
$skin->tooltipAndAccesskey('pt-'.$key) ?><?php
if(!empty($item['class'])) { ?> class="<?php
echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
echo htmlspecialchars($item['text']) ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url(<?php $this->text('logopath') ?>);" <?php
?>href="<?php echo
htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php
echo $skin->tooltipAndAccesskey('n-mainpage') ?>></a>
</div>
<script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
<?php
$sidebar = $this->data['sidebar'];
if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
foreach ($sidebar as $boxName => $cont) {
if ( $boxName == 'SEARCH' ) {
$this->searchBox();
} elseif ( $boxName == 'TOOLBOX' ) {
$this->toolbox();
} elseif ( $boxName == 'LANGUAGES' ) {
$this->languageBox();
} else {
$this->customBox( $boxName, $cont );
}
}
?>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<?php
if($this->data['poweredbyico']) { ?>
<div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
<?php }
if($this->data['copyrightico']) { ?>
<div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
<?php }
// Generate additional footer links
?>
<ul id="f-list">
<?php
$footerlinks = array(
'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
'privacy', 'about', 'disclaimer', 'tagline',
);
foreach( $footerlinks as $aLink ) {
if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
<?php }
}
?>
</ul>
</div>
</div></div>
<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
<?php $this->html('reporttime') ?>
<?php if ( $this->data['debug'] ): ?>
<!-- Debug output:
<?php $this->text( 'debug' ); ?>
-->
<?php endif; ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1539656-6");
pageTracker._trackPageview();
</script>
</body></html>
<?php
wfRestoreWarnings();
} // end of execute() method
/************************************************** ***********************************************/
function searchBox() {
?>
<div id="p-search" class="portlet">
<h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
<input id="searchInput" name="search" type="text"<?php echo
$this->skin->tooltipAndAccesskey('search');
if( isset( $this->data['search'] ) ) {
?> value="<?php $this->text('search') ?>"<?php } ?> />
<input type='submit' name="go" class="searchButton" id="searchGoButton"
value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' );
?> />
<input type='submit' name="fulltext" class="searchButton"
id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo
$this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
</div></form>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function toolbox() {
?>
<div class="portlet" id="p-tb">
<h5><?php $this->msg('toolbox') ?></h5>
<div class="pBody">
<ul>
<?php
if($this->data['notspecialpage']) { ?>
<li id="t-whatlinkshere"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere')
?>><?php $this->msg('whatlinkshere') ?></a></li>
<?php
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
<li id="t-recentchangeslinked"><a href="<?php
echo
htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked')
?>><?php $this->msg('recentchangeslinked') ?></a></li>
<?php }
}
if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
<li id="t-trackbacklink"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink')
?>><?php $this->msg('trackbacklink') ?></a></li>
<?php }
if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a
href="<?php
echo htmlspecialchars($feed['href']) ?>"<?php echo
$this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo
htmlspecialchars($feed['text'])?></a> </span>
<?php } ?></li><?php
}
foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages')
as $special ) {
if($this->data['nav_urls'][$special]) {
?><li id="t-<?php echo $special ?>"><a href="<?php echo
htmlspecialchars($this->data['nav_urls'][$special]['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php
$this->msg($special) ?></a></li>
<?php }
}
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
<li id="t-print"><a href="<?php echo
htmlspecialchars($this->data['nav_urls']['print']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php
$this->msg('printableversion') ?></a></li><?php
}
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo
htmlspecialchars($this->data['nav_urls']['permalink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php
$this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
<li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink')
?>><?php $this->msg('permalink') ?></li><?php
}
wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
?>
</ul>
</div>
</div>
<?php
}
/************************************************** ***********************************************/
function languageBox() {
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet">
<h5><?php $this->msg('otherlanguages') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $langlink) { ?>
<li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo
$langlink['text'] ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<?php
}
}
/************************************************** ***********************************************/
function customBox( $bar, $cont ) {
?>
<div class='generated-sidebar portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo
$this->skin->tooltip('p-'.$bar) ?>>
<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out;
?></h5>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
<?php foreach($cont as $key => $val) { ?>
<li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
if ( $val['active'] ) { ?> class="active" <?php }
?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo
$this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
<?php } ?>
</ul>
<?php } else {
# allow raw HTML block to be defined by extensions
print $cont;
}
?>
</div>
</div>
<?php
}
} // end of class
Lynne
01-05-2009, 03:39 PM
What is on line 1178 in your functions.php page?
I'm really not sure where that error is coming from. You can try commenting out stuff and see if the error goes away. Then you would find what line is causing it.
I'll assume that when you copy/pasted the code, it caused the double lines in some cases (like your $headinclude line with the extra line - and you probably don't need that line since you aren't going to use the $headinclude I would guess).
Also, you didn't close the php at the end of that code (probably just forgot that line?).
pjkcards
01-06-2009, 02:40 AM
What is on line 1178 in your functions.php page?
Here is the functions line 1178 (bolded) and its surroundings:
// return the cached result if it exists
if (isset($usercache["$userid"]))
{
return $usercache["$userid"];
}
$hook_query_fields = $hook_query_joins = '';
($hook = vBulletinHook::fetch_hook('fetch_userinfo_query')) ? eval($hook) : false;
// no cache available - query the user
$user = $vbulletin->db->query_first_slave("
SELECT " .
iif(($option & 16), ' administrator.*, ') . "
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid" .
iif(($option & 2) AND $vbulletin->options['avatarenabled'], ', avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline, customavatar.width AS avwidth, customavatar.height AS avheight').
iif(($option & 8), ', customprofilepic.userid AS profilepic, customprofilepic.dateline AS profilepicdateline, customprofilepic.width AS ppwidth, customprofilepic.height AS ppheight') .
iif(($option & 32), ', sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight') .
iif(!isset($vbphrase), fetch_language_fields_sql(), '') . "
$hook_query_fields
I'm really not sure where that error is coming from. You can try commenting out stuff and see if the error goes away. Then you would find what line is causing it.
I'll assume that when you copy/pasted the code, it caused the double lines in some cases (like your $headinclude line with the extra line - and you probably don't need that line since you aren't going to use the $headinclude I would guess).
Also, you didn't close the php at the end of that code (probably just forgot that line?).
I need to close the PHP, it doesn't look like the file has it, my fault.
Lynne
01-06-2009, 03:14 AM
I don't know why that is giving you an error. The only thing I can think of is that perhaps you are adding to the query in fetch_userinfo_query. Try disabling your plugins and see if you still get that error. If you do, I'm really not the person to help out with it.
Zachery
01-06-2009, 03:23 PM
With the ammount of effort you're going though to build the navbar on an external page, it seems like it would have been alot easier to code your own to work for your own site, really its just about filling some varibles in html.
pjkcards
01-07-2009, 10:22 PM
In regards to Zachery's comment, can I get some guidance on how to do that? Thanks
Dismounted
01-08-2009, 03:22 AM
I think he suggests to just create a vBulletin page, and place those variables to be output in a template.
How to create your own vBulletin-powered page! (uses vB templates) (https://vborg.vbsupport.ru/showthread.php?t=62164)
Zachery
01-09-2009, 07:48 AM
I mean it would have been far easier to write some html for each page you want to use it on, or write your own php to output varibles onto a page for you to generate your own navbar like code.
pjkcards
01-12-2009, 06:57 PM
Using premade vBulletin pages I don't think would work, since the wiki template is in /wiki/file.php. The file.php calls for many things in /wiki.
Zachery, how would I do this? Can you give me some steps I should take to make this work? I am still working on this and would like to get it finished. Thanks!
Lynne
01-12-2009, 07:39 PM
Have you tried just copying the html of the navbar from the page source on a vbulletin page and just putting that into your wiki page? It seems that would be so much easier at this point.
pjkcards
01-19-2009, 01:53 AM
Have you tried just copying the html of the navbar from the page source on a vbulletin page and just putting that into your wiki page? It seems that would be so much easier at this point.
The problem is that the html is combined with PHP to determine values and whatnot. Where would I find what values the PHP is inputing? For example, this:
<td width="9" align="right" valign="bottom"><img src="$stylevar[imgdir_misc]/nav_top_left.gif" width="9" height="2" border="0" alt="" /></td>
Here is my navbar code, any help putting this into HTML so I can paste it would be greatly appreciated. Thanks!
<!-- nav buttons bar -->
<tr>
<td style="border: none; padding: 0;"><table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="9" align="right" valign="bottom"><img src="$stylevar[imgdir_misc]/nav_top_left.gif" width="9" height="2" border="0" alt="" /></td>
<td width="100%" class="navbar-top-row"><img src="$vboptions[cleargifurl]" width="1" height="2" border="0" alt="" /></td>
<td width="9" align="left" valign="bottom"><img src="$stylevar[imgdir_misc]/nav_top_right.gif" width="9" height="2" border="0" alt="" /></td>
</tr>
</table></td>
</tr>
<tr>
<td class="navbar-row" align="center"><table cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" class="navbar-row-table">
<tr align="center" class="vbmenu_dark">
<td width="9" align="right" style="padding: 0;"><img src="$stylevar[imgdir_misc]/nav_left.gif" width="9" height="21" border="0" alt="" /></td>
<td class="vbmenu_control">
<if condition="THIS_SCRIPT == 'adv_index'"><a href="$vboptions[bburl]/$vboptions[forumhome].php$session[sessionurl]">Forum <else />
<a href="http://www.domain.com">Home</if></a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
</if>
<if condition="$show['registerbutton']">
<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
</if>
$template_hook[navbar_buttons_left]
<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
<if condition="$show['popups']">
<td id="FAQ/Rules" class="vbmenu_control">
<a href="#">FAQ/Rules</a>
<script type="text/javascript">
vbmenu_register("FAQ/Rules");
</script>
</td>
<td id="More" class="vbmenu_control">
<a href="#">More</a>
<script type="text/javascript">
vbmenu_register("More");
</script>
</td>
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></td>
</if>
<if condition="$show['member']">
<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
</if>
<else />
<if condition="$show['searchbuttons']">
<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
<else />
<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
</if>
</if>
<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
<if condition="$show['member']">
<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td>
</if>
</if>
$template_hook[navbar_buttons_right]
<if condition="$show['member']">
<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
</if>
<td width="9" align="left" style="padding: 0;"><img src="$stylevar[imgdir_misc]/nav_right.gif" width="9" height="21" border="0" alt="" /></td>
</tr>
</table></td>
</tr>
</table>
<if condition="$show['popups']">
<!-- NAVBAR POPUP MENUS -->
<div class="vbmenu_popup" id="FAQ/Rules_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">FAQ/Rules</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/faq.php">FAQ</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/rules.php">Rules</a>
</td>
</tr>
</table>
</div>
<div class="vbmenu_popup" id="More_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">More</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/wiki" target="_blank">Domain Wiki</a>
</td>
</tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/index.php?pageid=interviews" target="_blank">Domain Interviews</a>
</td>
</tr>
<tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com" target="_blank">Domain Chat Room</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/" target="_blank">Doman.com</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/linkto.php">Link to Domain.com</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/exchange.php">Partners/Links</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/donate.php">Donate</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/premium.php">Premium Membership</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/subscribe.php">Subscribe</a>
</td>
</tr>
</table>
</div>
<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
<tr>
<form action="http://www.google.com/custom" type="hidden" method=GET name="search"><td class="thead">Search Google</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<input type="hidden" name="client" value="pub-6443571670362868">
<input type="hidden" name="forid" value="1">
<input type="hidden" name="ie" value="ISO-8859-1">
<input type="hidden" name="oe" value="ISO-8859-1">
<input name="cof" type="hidden" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:250;L:http://www.domain.com;S:http://www.domain.com;FORID:1">
<input name="domains" type="hidden" value="www.domain.com">
<input type="hidden" name="hl" value="en">
<input type="text" class="bginput" name="q" size="25" maxlength="255" />$gobutton<br />
<input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></A>
</td></form>
</tr>
$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->
</if>
<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">$vbphrase[quick_links]</td></tr>
<if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,me nubar=no,toolbar=no,scrollbars=yes,resizable=yes,w idth=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
$template_hook[navbar_quick_links_menu_pos1]
<tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
<if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
<!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
$template_hook[navbar_quick_links_menu_pos2]
<tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
<if condition="$show['pmmainlink']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
<tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
<if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
$template_hook[navbar_quick_links_menu_pos3]
</table>
</div>
<!-- / user cp tools menu -->
</if>
<!-- / NAVBAR POPUP MENUS -->
<!-- PAGENAV POPUP -->
<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" />
</form>
</td>
</tr>
</table>
</div>
<!-- / PAGENAV POPUP -->
</if>
Lynne
01-19-2009, 02:33 AM
I mean go to your actual page source in the browser - browser > view > page source
pjkcards
01-19-2009, 02:46 AM
Ah, okay. Here is the navbar code from the view source. Where is the CSS for classes and whatnot stored? What else would I need to do other than copy and paste what is below? Thanks!:
<!-- nav buttons bar -->
<tr>
<td style="border: none; padding: 0;"><table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="9" align="right" valign="bottom"><img src="http://www.domain.com/forum/images/ca_evo2/misc/nav_top_left.gif" width="9" height="2" border="0" alt="" /></td>
<td width="100%" class="navbar-top-row"><img src="clear.gif" width="1" height="2" border="0" alt="" /></td>
<td width="9" align="left" valign="bottom"><img src="http://www.domain.com/forum/images/ca_evo2/misc/nav_top_right.gif" width="9" height="2" border="0" alt="" /></td>
</tr>
</table></td>
</tr>
<tr>
<td class="navbar-row" align="center"><table cellpadding="4" cellspacing="0" border="0" width="100%" align="center" class="navbar-row-table">
<tr align="center" class="vbmenu_dark">
<td width="9" align="right" style="padding: 0;"><img src="http://www.domain.com/forum/images/ca_evo2/misc/nav_left.gif" width="9" height="21" border="0" alt="" /></td>
<td class="vbmenu_control">
<a href="http://www.domain.com/forum/index.php">Forum </a></td>
<td class="vbmenu_control"><a href="http://www.domain.com/forum/usercp.php">User CP</a></td>
<td class="vbmenu_control"><a href="http://www.domain.com/forum/memberlist.php">Members List</a></td>
<td class="vbmenu_control"><a href="http://www.domain.com/forum/calendar.php">Calendar</a></td>
<td id="FAQ/Rules" class="vbmenu_control">
<a href="#">FAQ/Rules</a>
<script type="text/javascript">
vbmenu_register("FAQ/Rules");
</script>
</td>
<td id="More" class="vbmenu_control">
<a href="#">More</a>
<script type="text/javascript">
vbmenu_register("More");
</script>
</td>
<td class="vbmenu_control"><a href="http://www.domain.com/forum/search.php?do=getnew" accesskey="2">New Posts</a></td>
<td id="navbar_search" class="vbmenu_control"><a href="http://www.domain.com/forum/search.php" accesskey="4" rel="nofollow">Search</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td>
<td id="usercptools" class="vbmenu_control"><a href="/index.php?nojs=1#usercptools">Quick Links</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
<td class="vbmenu_control"><a href="http://www.domain.com/forum/login.php?do=logout&logouthash=8aa82e3d351efbeb859 e8dcb172dbede" onclick="return log_out('Are you sure you want to log out?')">Log Out</a></td>
<td width="9" align="left" style="padding: 0;"><img src="http://www.domain.com/forum/images/ca_evo2/misc/nav_right.gif" width="9" height="21" border="0" alt="" /></td>
</tr>
</table></td>
</tr>
</table>
<!-- NAVBAR POPUP MENUS -->
<div class="vbmenu_popup" id="FAQ/Rules_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">FAQ/Rules</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/faq.php">FAQ</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/rules.php">Rules</a>
</td>
</tr>
</table>
</div>
<div class="vbmenu_popup" id="More_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">More</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/wiki" target="_blank">Domain Wiki</a>
</td>
</tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/index.php?pageid=interviews" target="_blank">Domain Interviews</a>
</td>
</tr>
<tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/chat.php" target="_blank">Domain Room</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/" target="_blank">Domain.com</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/linkto.php">Link to Domain.com</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/exchange.php">Partners/Links</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/donate.php">Donate</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/premium.php">Premium Membership</a>
</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<a href="http://www.domain.com/forum/subscribe.php">Subscribe</a>
</td>
</tr>
</table>
</div>
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">Search Forums</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="http://www.domain.com/forum/search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="Go" tabindex="1004" /></div>
<div style="margin-top:4px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />Show Threads</label>
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />Show Posts</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="http://www.domain.com/forum/search.php" accesskey="4" rel="nofollow">Advanced Search</a></td>
</tr>
<tr>
<form action="http://www.google.com/custom" type="hidden" method=GET name="search"><td class="thead">Search Google</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<input type="hidden" name="client" value="pub-6443571670362868">
<input type="hidden" name="forid" value="1">
<input type="hidden" name="ie" value="ISO-8859-1">
<input type="hidden" name="oe" value="ISO-8859-1">
<input name="cof" type="hidden" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:250;L:http://domain.com-1.gif;S:http://www.domain.com;FORID:1">
<input name="domains" type="hidden" value="www.domain.com">
<input type="hidden" name="hl" value="en">
<input type="text" class="bginput" name="q" size="25" maxlength="255" /><input type="submit" class="button" value="Go" /><br />
<input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></A>
</td></form>
</tr>
</table>
</div>
<!-- / header quick search form -->
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead">Quick Links</td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/search.php?do=getdaily">Today's Posts</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/forumdisplay.php?do=markread">Mark Forums Read</a></td></tr>
<tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?do=buddylist&focus=1','buddy list','statusbar=no,menubar=no,toolbar=no,scrollba rs=yes,resizable=yes,width=250,height=300'); return false;">Open Buddy List</a></td></tr>
<tr><td class="thead"><a href="http://www.domain.com/forum/usercp.php">User Control Panel</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/profile.php?do=editsignature">Edit Signature</a></td></tr>
<!--<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/profile.php?do=editavatar">Edit Avatar</a></td></tr>-->
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/profile.php?do=editprofile">Edit Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/profile.php?do=editoptions">Edit Options</a></td></tr>
<tr><td class="thead">Miscellaneous</td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/private.php" rel="nofollow">Private Messages</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/subscription.php" rel="nofollow">Subscribed Threads</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/member.php?u=1">My Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.domain.com/forum/online.php">Who's Online</a></td></tr>
</table>
</div>
<!-- / user cp tools menu -->
<!-- / NAVBAR POPUP MENUS -->
<!-- PAGENAV POPUP -->
<div class="vbmenu_popup" id="pagenav_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead" nowrap="nowrap">Go to Page...</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="index.php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
<input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
<input type="button" class="button" id="pagenav_ibtn" value="Go" />
</form>
</td>
</tr>
</table>
</div>
<!-- / PAGENAV POPUP -->
Lynne
01-19-2009, 03:13 AM
The css is either also in the page source or there should be a link in the page source to the css. So, you can just copy the relevant classes from there.
You probably also need the link to the clientscript/vbulletin_menu.js from the source code also.
Lynne
01-21-2009, 02:30 PM
Have you seen this mod - vBulletin Style Skin for MediaWiki (https://vborg.vbsupport.ru/showthread.php?t=193244) - I'm not sure which wiki you are using, but that may help.
pjkcards
01-22-2009, 03:52 AM
I haven't seen that mod. The example sites that the mod creator shows are definitely not matching. I will give that a try, and if not, I will try your suggestions above, which should work.
For future reference, how do I "link to" clientscript/vbulletin_menu.js in the HTML? Same as adding a CSS file?
Thanks!
Lynne
01-22-2009, 03:57 AM
If you view the page source on your site, you should see a line like this - it will be different depending on which version of vbulletin you are running. vb.org is running version 3.6.12, so theirs looks like this:
<script type="text/javascript" src="clientscript/vbulletin_menu.js?v=3612"></script>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.