Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: Navigation Link Builder
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

work mule
Senior Member

USA
1358 Posts

Posted - 07 August 2001 :  20:48:10  Show Profile
NAVIGATION LINK BUILDER

If you've visited either The Writer or Tschive's Portal Mod, you've seen an alternative for the navigation menu for Snitz Forums.

This code was "unofficially" released a couple of months ago and I'm sure it was hard to edit or make changes. So...to make it easier to edit/modify your navigation links, here's an update to my previous code. This should be a major improvement over the previous code released for the navigation menu.

Happy Mod'ing

DOWNLOAD
http://www.scalemodelernetwork.com/downloads/snitz/inc_navigation.zip
(zip updated Aug 11, 2001)

UPDATE HISTORY
Aug 11, 2001 - The Nav_Links_Builder() sub has been tweaked. The sectionid is optional. If no value is present, then the sectionid querystring element will not be appended to the url. Accounted for blank array elements. Provided code for versions 3.1sr4 and 3.3sr2.

ADDITIONAL NOTES
SectionID's - The Writer and other Portal versions both rely upon a sectionid being passed to determine which set of links to display in the second row. This requires the additional line of code in inc_top.asp:

dim sectionid : sectionid = request("sectionid")

P.S. Before you modify your inc_top.asp file, I recommend that you have a basic understanding of that file. There is code available in the download file which modularizes the navigation links, the login/logout message, the forum title, the login/logout buttons, making it easier to change their placement in the forum. Copy and Paste as desired.

HISTORY (Related Topics)
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=10385
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=6863


The Work Mule Forums
The Writer Community


Edited by - work mule on 11 August 2001 23:53:25

work mule
Senior Member

USA
1358 Posts

Posted - 08 August 2001 :  02:17:45  Show Profile
A couple of additional notes:

The main objective of this mod was to separate the navigation link data from the presentation code. This would make it easier for people to add, edit, rearrange and remove navigation links.

This is accomplished by hardcoding the navigation elements into arrays.

Each array element holds link information:
arrayNav(x) = ("name|link|acronymn|icon|sectionid|mlev_min|mlev_max")


What I'm really excited about is the mlev_min & mlev_max.
The mlev_min & mlev_max values are used to compare against the mLev value to determine if the navigation element should be displayed or not. This eliminates the need to add "If (mLev=x) Then" code anymore. So if you need to change which links are displayed to members vs. non-members, all you have to do is change these two values.

So for something like The Writer, the first row of navigation links would look similiar to this:

dim arrayNav(6)

arrayNav(0) = ("Forums|default.asp|Forum Homepage|icons/icon_nav_forums.gif||0|4")
arrayNav(1) = ("Calendar|events.asp|Events Calendar....|icons/icon_nav_calendar.gif|1|0|4")
arrayNav(2) = ("Register|policy.asp?mode=register|Register...|icons/icon_nav_profile.gif|2|0|0")
arrayNav(3) = ("Profile|pop_profile.asp?mode=display|Membership Area|icons/icon_nav_profile.gif|2|1|4")
arrayNav(4) = ("Help|faq.asp|Help, FAQ, and more...|icons/icon_nav_help.gif|3|0|4")
arrayNav(5) = ("Search|search.asp|Perform a search...|icons/icon_nav_search.gif|4|0|4")
arrayNav(6) = ("Admin Options|admin_home.asp|Administer|icons/icon_nav_admin.gif|888|4|4")


This is then passed to a sub procedure, along with a couple of additional parameters/values, which will then build that line of navigation. I didn't want to say "row" because this could built between a set of <div> tags or a set of <td> tags. It doesn't matter.

There's more to it, but it's all documented/commented in the code.

This can be used for the simple navigation menus (like on the Basic forum) all the way up to the Portal navigation menus. It should be flexible enough to meet most people's needs.



The Work Mule Forums
The Writer Community


Edited by - work mule on 08 August 2001 02:27:44
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 08 August 2001 :  02:49:47  Show Profile
I'm going to try this out in a little while. looks really good!
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 09 August 2001 :  18:57:12  Show Profile
Just looking for feedback.



The Work Mule Forums
The Writer Community
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 09 August 2001 :  19:15:17  Show Profile
I had to change some of the CSS you were using, but other than that it works nice.
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 11 August 2001 :  11:57:48  Show Profile
quote:

One additional note...the Writer and Portal versions both rely upon a sectionid being passed to determine which set of links to display in the second row. This requires the additional line of code in inc_top.asp:

dim sectionid : sectionid = request("sectionid")



...however if you don't want to pass this in the querystring, you can always put in a line of code that sets the sectionid for each page that would be different than the default areas of the site.

dim sectionid : sectionid = 1 'Events (or whatever section...)

The value of the querystring would be ignored.



The Work Mule Forums
The Writer Community
Go to Top of Page

RDoGG™
Junior Member

USA
329 Posts

Posted - 11 August 2001 :  14:07:14  Show Profile  Visit RDoGG™'s Homepage  Send RDoGG™ an AOL message  Send RDoGG™ a Yahoo! Message
Sounds great, but...

You link looks down.

RDoGG™
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 11 August 2001 :  14:51:09  Show Profile
quote:

You link looks down.



Try it now...
I'm hosted with Readyhosting. They're usually pretty good, but every now and then it could be down temporarily.



The Work Mule Forums
The Writer Community
Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 11 August 2001 :  20:36:10  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
I would love to implement this, but am having trouble figuring out exactly how to implement it in my inc_top.asp, so could someone please post the contents of their inc_top.asp so that I have something to reference when doing my own?

Many thanks!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 11 August 2001 :  21:23:57  Show Profile
Which version of the forum are you going to use? Version 3.3 or an earlier version?



The Work Mule Forums
The Writer Community
Go to Top of Page

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 11 August 2001 :  21:35:51  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
I'm currently using 3.1 sr4, as I am waiting for 3.3 to have more of the bugs worked out of it before attempting to upgrade.

thanks!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

aston
New Member

Andorra
51 Posts

Posted - 11 August 2001 :  21:59:21  Show Profile
quote:

I'm currently using 3.1 sr4, as I am waiting for 3.3 to have more of the bugs worked out of it before attempting to upgrade.

thanks!

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *



Me too,hmmm,wait :)I think the speed of it will be more faster ,it is a little
slow .If it is like ideelbb^,hmm,just a thought..

______________________

Fly me to the Moon
Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 12 August 2001 :  00:24:08  Show Profile
UPDATE!!!
I have made a minor tweak to the Nav_Links_Builder() sub procedure. If you've already implemented this mod, to update your copy, just replace the sub code for Nav_Links_Builder() with the Nav_Links_Builder() sub procedure code that's inside the zip file.

Here's what the tweaks were for:

1) Null sectionid's. If you're not using the portal code or don't want to use sectionid's, then leave the sectionid blank and the sectionid querystring element will be left off of the link.

2) Null/Blank Array Elements. What you'll notice in the inc_top.asp files is this:

If strAutoLogon = 1 Then
arrayNav(2) = ("Register|policy.asp|Register to post to our forum...|||0|0")
End If

Well, if strAutoLogon is not equal to 1, you don't have to worry 'bout it. No placeholders or redimension the array is required.

INC_TOP.ASP
In the download file, you'll now find modified inc_top.asp files for versions 3.1sr4 and 3.3sr2 of Snitz. The modifications to these files can be found by looking for: '#### NAV CODE MOD ####

Both files also have an include statement added for inc_navigation.asp.

The difference between the two versions is that for the new version, I put the code for the top navigation link array within the sForumNavigation() sub instead of in the inc_navigation.asp file.

MEMBER LEVELS
The min and max mLev values. If you have an array element for your member's page it'll look like this:

arrayNav(4) = ("Members|members.asp|Current members of these forums...|||0|4")

Well, the min/max mlev values are 0 and 4 respectively. Now if you want to restrict displaying it to member's only, then change the min mlev value to 1.

arrayNav(4) = ("Members|members.asp|Current members of these forums...|||1|4")

If you noticed the Register link above, it had both min and max set to 0. This link will only be shown to users with a member level set to 0. Once they login and they're member level is set, they won't see the Register link because they're mlev should be greater than 0.

Please keep in mind that this only controls the display of the link and doesn't control access to pages.



The Work Mule Forums
The Writer Community


Edited by - work mule on 12 August 2001 00:27:49
Go to Top of Page

fader
Starting Member

2 Posts

Posted - 16 August 2001 :  17:51:30  Show Profile
Active Server Pages error 'ASP 0126'

Include file not found

/forum/login.asp, line 53

The include file 'inc_forum_variables.asp' was not found.
----------------------------------------------------------

Is that included in the sr versions or have i missed something from this mod. I used the files

inc_top.asp
logins.asp
logour.asp

from the navcodesnippets.zip

Can anyone help me get a nice clean login that i can easilly place in a table. What is the trick with these MOdD's and Tr's.

Go to Top of Page

work mule
Senior Member

USA
1358 Posts

Posted - 16 August 2001 :  20:05:55  Show Profile
quote:

Active Server Pages error 'ASP 0126'

Include file not found

/forum/login.asp, line 53

The include file 'inc_forum_variables.asp' was not found.
----------------------------------------------------------

Is that included in the sr versions or have i missed something from this mod. I used the files

inc_top.asp
logins.asp
logour.asp

from the navcodesnippets.zip

Can anyone help me get a nice clean login that i can easilly place in a table. What is the trick with these MOdD's and Tr's.



Oh, that was from another mod (not this one). You can remove the reference to that include and it might work for you.



The Work Mule Forums
The Writer Community
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07