Author |
Topic |
GauravBhabu
Advanced Member
4288 Posts |
Posted - 11 August 2001 : 12:29:32
|
RDoGG, That is an entirely different concept.
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE! |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 11 August 2001 : 13:51:20
|
I'd have to agree that they are different concepts (to some degree).
Yes, they both use arrays to store information.
GauravBhabu's mod uses arrays for The Who's online mod and also for building navigation. However the navigation is still hardcoded.
In my mod, I used arrays for building the navigation links. It allows people to quickly add/edit/delete items in their navigation (or any menus for that matter).
I've noticed more and more sites using similiar navigation menus like I had used for The Writer. With the need to change the links, I knew there had to be an easier way to make these changes without having to trudge through all the HTML code for the top and subnav.
Here's an example how inc_subnav could be modified to work with both you're pagecollection array and my navbuilder code.
Sub Nav_TopNavLevel2() '1) Assemble Array dim arrayNav() 'Because there are different sub levels, we'll only load in the array we need by looking at the sectionid. 'NOTE: In this case, have the array redim to the correct number of elements for that section. Select Case sectionid Case 1 ' Who's Online redim arrayNav(3) arrayNav(0) = ("Who is Online|" & arrPageName(PgeActiveUsers) & "|View who is browsing the site...|||0|4") arrayNav(1) = ("Active Topics|" & arrPageName(PgeActiveTopics) & "|View active topics...|||0|4") arrayNav(2) = ("New Members|" & arrPageName(PgeNewMembers) & "|View new members today...|||0|4") arrayNav(3) = ("Help|" & arrPageName(PgeFaq) & "|Frequently asked questions...|||0|4") Case 2 ' Members Area redim arrayNav(5) 'Check for Extended Profile if strUseExtendedProfile then arrayNav(0) = ("Edit Profile|pop_profile.asp?mode=Edit|Edit your personal profile...|||1|4") else arrayNav(0) = ("Edit Profile|javascript:openWindow3('pop_profile.asp?mode=Edit')|Edit your personal profile...|||1|4") end if arrayNav(1) = ("Private Messages|" & arrPageName(PgePM) & "|View private messages...members only|||1|4") arrayNav(2) = ("Buddy List|" & arrPageName(PgeBuddy) & "|View your buddy list...members only|||1|4") arrayNav(3) = ("New Members|" & arrPageName(PgeNewMembers) & "|View new members today...|||1|4") arrayNav(4) = ("Who is Online|" & arrPageName(PgeActiveUsers) & "|View who is browsing the site...|||1|4") arrayNav(5) = ("Book Marks|" & arrPageName(PgeBookmark) & "|View your bookmarks...members only|||1|4") arrayNav(6) = ("User Pager|Javascript:openWindowPager('pm_pop_pager.asp')|Open pager window...|||1|4") arrayNav(7) = ("Help|" & arrPageName(PgeFaq) & "|Frequently asked questions...|||1|4") End Select '2) Settings dim UseTD : UseTD = 0 dim Code_TD : Code_TD = "" dim Code_TXT1 : Code_TXT1 = "" dim Code_TXT2 : Code_TXT2 = "" dim Code_HREF : Code_HREF = "" dim Code_SPACER : Code_SPACER = " | " '3) Build Navigation HTML Call Nav_Links_Builder(arrayNav,UseTD,Code_TD,Code_TXT1,Code_TXT2,Code_HREF,Code_SPACER) End Sub
Now I'm using sectionid and you're using intPageID, so sectionid would probably have to be set or changed to intPageID and the Select Case's would have to have additional sections. Also, you combine both the Link Name and the acronym text into your array, so I couldn't use that in the example.
With putting the navigation elements into an array like the example, if you need to rearrange the order, all you have to do is change the number of the array element. You don't have to worry 'bout the HTML code and making sure the spacers (" | ") are in the right spot, etc.
The Work Mule Forums The Writer Community
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 11 August 2001 : 17:15:34
|
Thanks WorkMule! That really looks interesting. It is not at all difficult to make use of Nav_Links_Builder. There are several ways:
One way is to split arrPageDesc as below:
arrLinkName(n) for Link Name arrPageDesc(n)for Acronym Text
The second will be to combine the above and other elements in one array and name it as below:
arrLinkDetails(n)
arrayNav(x) = ("name|link|acronymn|icon|sectionid|mlev_min|mlev_max")
WorkMule, I have not looked into the Nav_Links_Builder. What is sectionID element?
arrLinkDetails(0) = ("Active Users|" & arrPageName(PgeActiveUsers) & "|View Who is Online...|somename.gif|??|0|4") arrLinkDetails(1) = ("Active Topics|" & arrPageName(PgeActiveTopics) & "|View what topics have been active...|somename.gif|??|0|4")
and then refer it like
'1) Assemble Array dim arrayNav()
Select case intPageID
Case PgeHome Redim arrayNav(n) arrayNav(0) = arrLinkDetails(PgeActiveUsers) arrayNav(1) = arrLinkDetails(PgeActiveTopics) ... ... arrayNav(n) = arrLinkDetails(PgeX)
case PgeDefault ...
Case PgeMembers ... End select
'2) Settings dim UseTD : UseTD = 0 dim Code_TD : Code_TD = "" dim Code_TXT1 : Code_TXT1 = "" dim Code_TXT2 : Code_TXT2 = "" dim Code_HREF : Code_HREF = "" dim Code_SPACER : Code_SPACER = " | "
'3) Build Navigation HTML Call Nav_Links_Builder(arrayNav,UseTD,Code_TD,Code_TXT1,Code_TXT2,Code_HREF,Code_SPACER)
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE!
Edited by - GauravBhabu on 11 August 2001 17:23:24
Edited by - GauravBhabu on 11 August 2001 17:37:04 |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 11 August 2001 : 18:59:41
|
sectionid was used to identify the section of a site.
For exammple, an id of 3 might be the Help/FAQ section. So links that were in that section would be assigned an id of 3. The sectionid determines which group of links to display in the second tier of the main navigation box.
The Work Mule Forums The Writer Community
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 12 August 2001 : 00:25:44
|
Thanks! WorkMule.
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE! |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 12 August 2001 : 01:02:24
|
BTW, I updated the download file for my mod. I included the inc_top.asp files for both v3.1sr4 and v3.3sr2. If you take a look at those, it might help too. I've made the sectionid optional and if it's null, it's not passed along.
The Work Mule Forums The Writer Community
|
|
|
SalmanKhana
Average Member
USA
961 Posts |
Posted - 12 August 2001 : 05:25:46
|
*Confused*. Which one to use? GB or workmule ?
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 12 August 2001 : 10:23:31
|
Made some changes to inc_pagecollection.asp and inc_mainnav.asp. Those who I have already downloaded the may download these files. A link to download these files is added to the first post. Adding, Moving and removing the pages to array is simplified further. Previously when a new page was to be added in between the array sequence, the number sequence had to be changed to the end. This is no more required now. Only values need to be changed will be for the const. See below to have an idea:
iPageNum = 0 arrPageName(iPageNum) = "mainpage.asp" const PgeHome = 0
iPageNum = iPageNum + 1 arrPageName(iPageNum) = "default.asp" const PgeForums = 1
iPageNum = iPageNum + 1 arrPageName(iPageNum) = "members.asp" const PgeMembers = 2
iPageNum = iPageNum + 1 arrPageName(iPageNum) = "events.asp" const PgeEvents = 3
...
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE! |
|
|
work mule
Senior Member
USA
1358 Posts |
Posted - 12 August 2001 : 15:17:58
|
quote:
*Confused*. Which one to use? GB or workmule ?
If you're using the "Who is online" mod, then use GB's. It looks like he's making it easier to manage. If all you need is an easier method for building navigation menus, then you may want to look at mine.
The Work Mule Forums The Writer Community
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 13 August 2001 : 18:55:45
|
There is a good number of downloads for the Mod. I would really like to know views of those who have downloaded and implemented the Mod at their forums.
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE! |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 16 August 2001 : 00:37:13
|
I installed this Mod today on version 3.3 without any changes. See here forumSquare. Since all the Mods are not installed, all links are not working. But all navigation links are build dynamically.
Note: This Mod requires that you also install the Mod Active_Users.
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE! |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 28 August 2001 : 16:41:58
|
I repackaged the Active Users Mod with Navigation Builder and this includes following
Fixes to the WhoisOnline Script
- Fix for same users showing multiple times
- Fix for same user showing multiple times when IP address changes during the same session
- Fix for same user showing multiple times when logging in from another computer with different IP address
- Removal of some repeat code
- Some modification in code
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE! |
|
|
tomasalsbro
Average Member
Sweden
818 Posts |
Posted - 28 August 2001 : 18:34:12
|
Hi GauravBhabu,
Wonderful work you done! Does this mod work with v40bxx? Cheers / Tomas
!-Keep distance in traffic-! www.whiplash.se www.whiplash.pp.se |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 28 August 2001 : 18:45:41
|
It will work with any version and probably anywhere.
Share A Square at forumSquare
GauravBhabu
There is only one miracle...That is LIFE! |
|
|
Deleted
deleted
4116 Posts |
Posted - 28 August 2001 : 21:03:09
|
quote:
It will work with any version and probably anywhere.
GB, yes it will work with v4.0x because v4.0x is v3.3_033 compatible. But this does not mean that a MOD is v4.0 compatible. Without looking to your code, I've a question:
Does the strings in the navigation bar, and the strings in the active users table change if you change the language?
Think Pink Test Site & Guidelines | DL Post v40b02 Files |
|
|
Topic |
|