Cdaknight
26th January 2004, 03:11 AM
... construct_nav_option2() in the location of the index.php in my admin cp.
I followed the instructions provided by the hack during installation... any ideas?
KuraFire
26th January 2004, 03:20 AM
Did you do the file edit in /includes/adminfunctions_navpanel.php ? did you save and upload it to your site again?
Cdaknight
26th January 2004, 03:28 AM
Yeah, I went back and did it for a 2nd time, actually. And I use SSH instead of FTP, so I edited it on the server, and saved it.
KuraFire
26th January 2004, 10:32 AM
what version of vBulletin are you running?
Cdaknight
26th January 2004, 01:21 PM
I'm running vB 3.0.0 RC3. Upgraded, then installed the HTL. Still having the problem, although I am very sure that in the adminfunctions_navpanel (I believe thats the file), that construct_nav_options2 is clearly defined. Then index.php of the admin cp uses requireonce, and it should work. Have I done something retarded?
KuraFire
26th January 2004, 01:46 PM
I'm running vB 3.0.0 RC3. Upgraded, then installed the HTL. Still having the problem, although I am very sure that in the adminfunctions_navpanel (I believe thats the file), that construct_nav_options2 is clearly defined. Then index.php of the admin cp uses requireonce, and it should work. Have I done something retarded?
What does your function line read in includes/adminfunctions_navpanel.php ?
it should read construct_nav_option2, and not construct_nav_options2 !
Cdaknight
26th January 2004, 05:31 PM
< code blocks removed for legibility >
There's the area of the function definition in my adminfunctions_navpanel.php.
Earlier, I just typed it wrong. :\
If you'd like, I'll go grab all the "Code" segments I copied, and the approximate area. Actually, I'll put them below.
[code]
< code blocks removed for legibility >
[code]
< code blocks removed for legibility >
And I forgot where the last code change was. It is completely slipping my mind right now.
KuraFire
26th January 2004, 05:42 PM
I see where you made a mistake. :)
In this block:
</script>
<?php
echo $controls . $_NAV . $_controls;
// [START HACK='Hack Tracking Log' AUTHOR='KuraFire' VERSION='1.00 Gold' CHANGEID= 2 ]
// ###################### Start makenavoption 2#######################
// similar to the normal one, except it doesn't send you to the main frame.
// function granted to the HTL by trafix, copyright (C) trafix
function construct_nav_option2($title, $url, $extra = '')
{
global $session, $options;
static $sessionlink;
if (!isset($options))
{
$options = array();
if ($session['sessionurl'] == '')
{
$sessionlink = '';
}
else
{
$sessionlink = "&s=$session[sessionhash]";
}
}
$options[] = "\t\t<div class=\"navlink-normal\" onclick=\"location='$url$sessionlink';\" onmouseover=\"this.className='navlink-hover';\" onmouseout=\"this.className='navlink-normal'\"><a href=\"$url$sessionlink\" target=\"_self\" onclick=\"window.event.cancelBubble = true;\">$title</a>$_extra</div>\n";
}
// ###################### Start build_hacknavs ######################
// creates navpanel menu blocks for all hacks in the HTL that have this enabled
function build_hacknavs()
{
global $DB_site;
static $hackmenu;
$get_hack_navs = $DB_site->query("SELECT menubits FROM " . TABLE_PREFIX . "hack WHERE (options & " . HTLSETTING_SHOWMENU . ") AND atstep=-1");
while ($hackmenu = $DB_site->fetch_array($get_hack_navs))
{
construct_hack_nav($hackmenu['menubits']);
}
}
// ###################### Start construct_hack_nav ##################
// takes $ser_data, which is a serialized array with info, and creates
// a whole menu block item out of it :)
function construct_hack_nav($ser_data)
{
global $vboptions;
$prefix = ($vboptions['htl_prefix_titles']) ? $vboptions['htl_prefix_what'] : '';
$data = unserialize($ser_data);
if (sizeof($data) > 1)
{
$title = $data[0];
unset($data[0]);
foreach($data as $displayorder=>$arry)
{
construct_nav_option($arry['text'], $arry['url'], '<br />');
}
construct_nav_group($prefix . $title, '<hr />');
construct_nav_spacer();
}
}
// [END HACK='Hack Tracking Log' AUTHOR='KuraFire' VERSION='1.00 Gold' CHANGEID= 2 ]
}
/*======================================================================*\
You pasted the new code in the wrong location. You pasted it above the } but it's supposed to go BELOW the }. Here is what that segment SHOULD be:
</script>
<?php
echo $controls . $_NAV . $_controls;
}
// [START HACK='Hack Tracking Log' AUTHOR='KuraFire' VERSION='1.00 Gold' CHANGEID= 2 ]
// ###################### Start makenavoption 2#######################
// similar to the normal one, except it doesn't send you to the main frame.
// function granted to the HTL by trafix, copyright (C) trafix
function construct_nav_option2($title, $url, $extra = '')
{
global $session, $options;
static $sessionlink;
if (!isset($options))
{
$options = array();
if ($session['sessionurl'] == '')
{
$sessionlink = '';
}
else
{
$sessionlink = "&s=$session[sessionhash]";
}
}
$options[] = "\t\t<div class=\"navlink-normal\" onclick=\"location='$url$sessionlink';\" onmouseover=\"this.className='navlink-hover';\" onmouseout=\"this.className='navlink-normal'\"><a href=\"$url$sessionlink\" target=\"_self\" onclick=\"window.event.cancelBubble = true;\">$title</a>$_extra</div>\n";
}
// ###################### Start build_hacknavs ######################
// creates navpanel menu blocks for all hacks in the HTL that have this enabled
function build_hacknavs()
{
global $DB_site;
static $hackmenu;
$get_hack_navs = $DB_site->query("SELECT menubits FROM " . TABLE_PREFIX . "hack WHERE (options & " . HTLSETTING_SHOWMENU . ") AND atstep=-1");
while ($hackmenu = $DB_site->fetch_array($get_hack_navs))
{
construct_hack_nav($hackmenu['menubits']);
}
}
// ###################### Start construct_hack_nav ##################
// takes $ser_data, which is a serialized array with info, and creates
// a whole menu block item out of it :)
function construct_hack_nav($ser_data)
{
global $vboptions;
$prefix = ($vboptions['htl_prefix_titles']) ? $vboptions['htl_prefix_what'] : '';
$data = unserialize($ser_data);
if (sizeof($data) > 1)
{
$title = $data[0];
unset($data[0]);
foreach($data as $displayorder=>$arry)
{
construct_nav_option($arry['text'], $arry['url'], '<br />');
}
construct_nav_group($prefix . $title, '<hr />');
construct_nav_spacer();
}
}
// [END HACK='Hack Tracking Log' AUTHOR='KuraFire' VERSION='1.00 Gold' CHANGEID= 2 ]
/*======================================================================*\
Cdaknight
26th January 2004, 06:12 PM
Thanks! That makes so much sense, and apologies about the illegible code segments. I'm in school, and copied and pasted quickly.
KuraFire
26th January 2004, 10:33 PM
Did it work now? :)
and no worries, I'm just cleaning up older posts to make things easier to read :)