Go Back   NuHIT - SEO, Wiki, Forums > Site, Feedback and Miscellaneous > Coders
Reply
 
Thread Tools
 
#1
Old 02-02-2007, 11:36 PM
 
pegasus
Premium Member
 
Join Date: Nov 2006
Location: New York
Posts: 364
Send a message via AIM to pegasus
pegasus is offline  
PHP Code:
require_once('./global.php');
require_once(
'./includes/functions_login.php');
require_once(
"./includes/functions.php");
require_once(
"./includes/adminfunctions.php" ); 
You can't call functions.php twice (already called in global.php). It stops vbWikiPro_Tunnel.php from processing by trying to redeclare functions.

Should be:
PHP Code:
require_once('./global.php');
require_once(
'./includes/functions_login.php');
require_once(
"./includes/adminfunctions.php" ); 
However, I'm still not seeing the NuHIT logo and not getting my cookies tunneled. And yes, I'm using the plugins.

BUT $stylevar['vbw_cookie_tunnel'] is appearing now.

Last edited by pegasus : 02-02-2007 at 11:43 PM.
Reply With Quote

#2
Old 02-03-2007, 12:40 AM
 
Also your navbits code is all screwy above

PHP Code:
($hook vBulletinHook::fetch_hook('vbwikipro_before_navbits')) ? eval($hook) : false

The code above should be:
PHP Code:
if ($translate_to_utf8)
{
      
$navbits["{$wikidata['mainpage_href']}"] = $wgSitename iconv'UTF-8'$stylevar['charset'], $wgSitename ) : iconv'UTF-8'$stylevar['charset'], 'Wiki' );
      
$navbits[''] = $wiki_pagetitle_iso;
}    
else
{
      
$navbits["{$wikidata['mainpage_href']}"] = $wgSitename $wgSitename 'Wiki';
      
$navbits[''] = $wiki_pagetitle;

pegasus
Premium Member
 
Join Date: Nov 2006
Location: New York
Posts: 364
Send a message via AIM to pegasus
pegasus is offline  
Reply With Quote

#3
Old 02-03-2007, 01:21 AM
 
ElfMage
nuHIT Team
 
ElfMage's Avatar
 
Join Date: Aug 2006
Posts: 3,603
ElfMage is offline  
:-)

Take a look at the require_once documentation: http://us2.php.net/manual/en/function.require-once.php

You can call require_once as many times as you want, it will only include the file if it has not been included before... .

So, the original code is correct.

Quote:
Also your navbits code is all screwy above...
I beg to differ. , what you wrote does exactly what the code in vbWiki Pro does. And you have to admit that the original code is cleaner and more elegant.

Just to be clear, as stated above the original code is correct in both accounts.

So, in short. I respectfully disagree with both your statements.

Quote:
BUT $stylevar['vbw_cookie_tunnel'] is appearing now.
What do you mean by this? Where is it appearing? Notice that what needs to be added to the templates is:

PHP Code:
$stylevar[vbw_cookie_tunnel
Reply With Quote

#4
Old 02-03-2007, 02:09 AM
 
Well, despite what the require_once() documentation says, until I deleted that line, I was getting an error on vbWikiPro_Tunnel.php saying that it could not redefine the functions.

And until I deleted that line $stylevar['vbw_cookie_tunnel'] would be empty. (That's what I meant by saying that it's appearing now).

Also, until I adjusted the navbits code to match vBulletin specifications, $navbits[''] was empty.

Your original code:
PHP Code:
if ($translate_to_utf8)
     
$navbits["{$wikidata['mainpage_href']}"] = iconv'UTF-8'$stylevar['charset'], $wgSitename $wgSitename 'Wiki' );
else
     
$navbits["{$wikidata['mainpage_href']}"] = $wgSitename $wgSitename 'Wiki';
$navbits[''] = $wiki_pagetitle_iso
According to the original code, $navbits[''] would only be empty if $wiki_pagetitle_iso was never defined at all.

PHP Code:
if ($translate_to_utf8)
     
$wiki_pagetitle_iso iconv'UTF-8'$stylevar['charset'], $wiki_pagetitle ); 
If $translate_to_utf8 is false, as it is on my setup, $navbits[''] will be empty. In order to compensate, I maintain my claim that your code is screwy and should be altered .

If not to mine, then at least to:
PHP Code:
if ($translate_to_utf8)
     
$wiki_pagetitle_iso iconv'UTF-8'$stylevar['charset'], $wiki_pagetitle );
else
     
$wiki_pagetitle_iso $wiki_pagetitle
or my personal favorite (which still conforms to vBulletin coder specs):
PHP Code:
$wiki_pagetitle_iso = ($translate_to_utf8) ? iconv'UTF-8'$stylevar['charset'], $wiki_pagetitle ) : $wiki_pagetitle

Last edited by pegasus : 02-03-2007 at 02:36 AM.
pegasus
Premium Member
 
Join Date: Nov 2006
Location: New York
Posts: 364
Send a message via AIM to pegasus
pegasus is offline  
Reply With Quote

#5
Old 02-07-2007, 12:39 PM
 
ElfMage
nuHIT Team
 
ElfMage's Avatar
 
Join Date: Aug 2006
Posts: 3,603
ElfMage is offline  
.
Reply With Quote

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross domain setups ElfMage vbWiki Pro - Installation and Support 96 07-25-2007 02:42 AM
Wiki reference-link BB code MediaHound vbWiki Pro - Pre-sales and feedback 0 11-21-2006 12:13 PM


All times are GMT -4. The time now is 02:24 PM.