Dhtml navbar on each page

Theme, template, layout, or image issues

Dhtml navbar on each page

Postby maktta » Mon Nov 16, 2009 10:54 am

Im wanting to add a dhtml nav bar, like the one found at http://www.mtm-guild.com, to the top of my roster page so that my users can access other pages on my website without having to go back to the main page. Ive tried editing out the header.html file to do the body onload="init()" command needed to display this menu. Nothing happens. Even typed in the full address for the .js files needs and still nothing. the way my body tag in header.html looks like is <body{ROSTER_BODY}<!-- IF ROSTER_ONLOAD --> onload="init(); {ROSTER_ONLOAD}"<!-- ENDIF -->>. Ive moded the init function to many different locations with no success. Anyone got any ideas? Am i editing the wrong page?
maktta
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Nov 16, 2009 10:45 am

Re: Dhtml navbar on each page

Postby zanix » Mon Nov 16, 2009 6:14 pm

Please do not make 2 posts asking the same question
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Dhtml navbar on each page

Postby zanix » Mon Nov 16, 2009 6:16 pm

If I knew more about what you are trying to add, then I can help.
Where is this nav bar from, where can it be downloaded? What page shows the instructions?
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Dhtml navbar on each page

Postby maktta » Mon Nov 16, 2009 6:53 pm

its from dynamicdrive.com. and the instructions are listed in the readme file.
maktta
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Nov 16, 2009 10:45 am

Re: Dhtml navbar on each page

Postby Ulminia » Mon Nov 16, 2009 7:47 pm

this is based on Top Navigational Bar III v3.5..

index.php line 169 add
Code: Select all
$roster->output['html_head'] = '<script type="text/javascript" language="javascript" src="js/sniffer.js">

/***********************************************
* Top Navigational Bar III v3.5 (By BrotherCake- brothercake.com)
* Exclusive permission by Dynamicdrive.com to include script in archive
* For this and 100\'s more DHTML scripts, visit http://www.dynamicdrive.com/
* This notice MUST stay intact for legal use
***********************************************/

</script>

<script type="text/javascript" language="javascript1.2" src="js/custom.js"></script>
<script type="text/javascript" language="javascript1.2" src="js/style.js"></script>';     


footer line 22 add
Code: Select all
echo'<p>&nbsp;</p>









<script type="text/javascript" language="javascript1.2" src="js/menu.js"></script>';


edit ccustom.js set "var baseHREF = "";" to "var baseHREF = "js/";" your done
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: Dhtml navbar on each page

Postby zanix » Mon Nov 16, 2009 8:06 pm

There is no need to edit any php files
I would add this to the template files header.html and footer.html

First, extract all the files from the zip to roster/js/menu/

header.html - Find
Code: Select all
<script type="text/javascript" src="{ROSTER_PATH}js/overlib_hideform.js"></script>


Add After
Code: Select all
<script type="text/javascript" src="{ROSTER_PATH}js/menu/sniffer.js">

/***********************************************
* Top Navigational Bar III v3.5 (By BrotherCake- brothercake.com)
* Exclusive permission by Dynamicdrive.com to include script in archive
* For this and 100's more DHTML scripts, visit http://www.dynamicdrive.com/
* This notice MUST stay intact for legal use
***********************************************/

</script>

<script type="text/javascript" src="{ROSTER_PATH}js/menu/custom.js"></script>
<script type="text/javascript" src="{ROSTER_PATH}js/menu/style.js"></script>


footer.html - Find
Code: Select all
</body>


Add Before
Code: Select all
<script type="text/javascript" src="{ROSTER_PATH}js/menu/menu.js"></script>


Then edit custom.js
Code: Select all
var baseHREF = "";   // base path to .js files for the script (ie: resources/)


Change to
Code: Select all
var baseHREF = "js/menu/";   // base path to .js files for the script (ie: resources/)
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Dhtml navbar on each page

Postby Ulminia » Mon Nov 16, 2009 11:55 pm

yea that would work better lol
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: Dhtml navbar on each page

Postby maktta » Tue Nov 17, 2009 5:41 am

k, im not using that navbar, the one i am using is http://www.dynamicdrive.com/dynamicinde ... /index.htm. its requires the body onload fucntion. where do i put that at?
maktta
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Nov 16, 2009 10:45 am

Re: Dhtml navbar on each page

Postby Ulminia » Tue Nov 17, 2009 12:38 pm

$roster->output['body_onload'] = 'INIT()'; ?? in index or header some where
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: Dhtml navbar on each page

Postby zanix » Tue Nov 17, 2009 4:34 pm

Probably in header.php, before $roster->output['body_onload'] is assigned to the $tpl array
And I would use .=
Code: Select all
$roster->output['body_onload'] .= 'init()'
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5543
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Dhtml navbar on each page

Postby maktta » Tue Nov 17, 2009 9:44 pm

here is the code from my header.html file under /templates/default/
Code: Select all
<script type="text/javascript" src="{ROSTER_PATH}/includes/browser.js">

/***********************************************
* Jim's DHTML Menu v5.7- © Jim Salyer (jsalyer@REMOVETHISmchsi.com)
* Visit Dynamic Drive: http://www.dynamicdrive.com for script and instructions
* This notice must stay intact for use
***********************************************/

</script>
<script type="text/javascript" src="{ROSTER_PATH}/config.js"></script>
<body{ROSTER_BODY}<!-- IF ROSTER_ONLOAD -->{ROSTER_ONLOAD}<!-- ENDIF -->>


Here is the code from header.php
Code: Select all
$roster->output['body_onload'] .= 'init()';

/**
 * Assign template vars
 */
$roster->tpl->assign_vars(array(
   // These are duplicated since there might be an error before settings.php finishes and sets these
   'XML_LANG'        => substr($roster->config['locale'],0,2),
   'ROSTER_URL'      => ROSTER_URL,
   'ROSTER_PATH'     => ROSTER_PATH,
   'S_HEADER_LOGO'   => ( !empty($roster->config['logo']) ? true : false ),
   'WEBSITE_ADDRESS' => $roster->config['website_address'],
   'U_MAKELINK'      => makelink(),
   'HEADER_LOGO'     => $roster->config['logo'],
   'IMG_URL'         => $roster->config['img_url'],
   // End duplication

   'PAGE_TITLE'      => $roster_title,
   'ROSTER_HEAD'     => $roster->output['html_head'],
   'ROSTER_BODY'     => (!empty($roster->config['roster_bg']) ? ' style="background-image:url(' . $roster->config['roster_bg'] . ');"' : '')
                  . (!empty($roster->output['body_attr']) ? ' ' . $roster->output['body_attr'] : ''),
   'ROSTER_ONLOAD'   => (!empty($roster->output['body_onload']) ? $roster->output['body_onload'] : ''),
   'ROSTER_MENU_BEFORE' => $roster->output['before_menu'],
   )


ive tried everything listed so far, and even modded it a little but still nothing. Am i missing something?

Heres a copy of the source code when displayed in firefox
Code: Select all
<script type="text/javascript" src="/roster/js/overlib.js"></script>

<script type="text/javascript" src="/roster/js/overlib_hideform.js"></script>
<script type="text/javascript" src="/roster/js/color_functions.php?path=/roster/templates/default"></script>
</head>
<script type="text/javascript" src="/roster//includes/browser.js">

/***********************************************
* Jim's DHTML Menu v5.7- © Jim Salyer (jsalyer@REMOVETHISmchsi.com)
* Visit Dynamic Drive: http://www.dynamicdrive.com for script and instructions
* This notice must stay intact for use
***********************************************/

</script>
<script type="text/javascript" src="/roster//config.js"></script>
<body style="background-image:url(img/wowroster_bg.jpg);"initARC('config_config','radioOn','radioOff','checkboxOn','checkboxOff');init()>

<div id="overDiv" style="position:absolute;visibility:hidden;z-index:1000;"></div>

<div class="roster-wrap" align="center">


ive also changed the $roster->output['body_onload'] .= 'init()'; to $roster->output['body_onload'] .= 'onLoad = init()'; and to $roster->output['body_onload'] .= 'onLoad = \'init()\''; and still nothing.

Edit: changed the code so it wasnt // anymore, but that didnt fix it either.
maktta
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Nov 16, 2009 10:45 am

Re: Dhtml navbar on each page

Postby PleegWat » Tue Nov 17, 2009 11:15 pm

Looks like you didn't revert your changes to header.html correctly. The correct <body> tag is:

Code: Select all
<body{ROSTER_BODY}<!-- IF ROSTER_ONLOAD --> onload="{ROSTER_ONLOAD}"<!-- ENDIF -->>


Also, it might be worth trying this on a plain HTML file first.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Dhtml navbar on each page

Postby maktta » Tue Nov 17, 2009 11:58 pm

still nothing. and im guess that by plain html file you mean something other then the roster? cause it works on the rest of my site. same files and everything.
maktta
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Nov 16, 2009 10:45 am

Re: Dhtml navbar on each page

Postby Ulminia » Wed Nov 18, 2009 6:52 am

ok i got this worken on my website......

header.php befor
Code: Select all
$roster->tpl->assign_vars(array(
   // These are duplicated since there might be an error before settings.php finishes and sets these

add this..
Code: Select all
$roster->output['html_head'] .= '<script type="text/javascript" src="'.ROSTER_PATH.'/js/includes/browser.js">

/***********************************************
* Jim\'s DHTML Menu v5.7- © Jim Salyer (jsalyer@REMOVETHISmchsi.com)
* Visit Dynamic Drive: http://www.dynamicdrive.com for script and instructions
* This notice must stay intact for use
***********************************************/

</script>
<script type="text/javascript" src="'.ROSTER_PATH.'/js/config.js"></script>';
$roster->output['body_onload'] .= 'init()';


ok now .. read readme's this package says you have to edit the browser.js .. fisrt line ...
Code: Select all
//---- Set this variable only! ----
var buildDir = "/roster_dir/js/includes/";
//---------------------------------

change roster_dir to what ever path your roster is ... or to where ever you have the js files sored and this should work .... alsop if you are not storing the js files in the roster js folder change '.ROSTER_PATH.' to where ever you are storing them ....remember ../ will drop back a directory in html too...
Ulminia of Zangarmarsh
Zonous of Zangarmarsh
Author of Roster Gallery
WoWRoster-Profiler Redesigner
User avatar
Ulminia
WoWRoster.net Dev Team
WoWRoster.net Dev Team
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 1223
Joined: Tue Jul 04, 2006 4:41 pm
Location: New Brunswick, Canada
Realm: Zangarmarsh (PvE) - US
gmail/gtalk: ulminia@gmail.com

Re: Dhtml navbar on each page

Postby maktta » Wed Nov 18, 2009 8:20 pm

thanks for all the help, i finally got it work work. had to remove the / after roster path variable and had to edit the browser.js file to say /roster/js/includes instead of /home/uname/roster/js/includes
maktta
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Mon Nov 16, 2009 10:45 am


Return to Appearance

Who is online

Users browsing this forum: No registered users and 0 guests

cron