The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
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.
|
#12
|
|||
|
|||
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?: Code:
<!-- 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,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=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:000000;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> |
#13
|
||||
|
||||
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.
|
#14
|
|||
|
|||
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: Code:
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 |
#15
|
||||
|
||||
Please post the block of code you are using.
|
#16
|
|||
|
|||
Here it is, I bolded the part I added:
Code:
<?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 |
#17
|
||||
|
||||
I'm quite sure that the public_html directory isn't in the filesystem root. The path should look more like:
Code:
/home/user/public_html/domain/forum |
#18
|
|||
|
|||
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 |
#19
|
||||
|
||||
PHP Code:
|
#20
|
|||
|
|||
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!
Code:
<?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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|