Author |
Message |
ravenworks
Hangin' Around
![](modules/Forums/images/avatars/3fe6ea884d143f922e085.jpg)
Joined: Sep 22, 2010
Posts: 33
Location: Arizona
|
Posted:
Tue Dec 14, 2010 5:35 pm |
|
I've been searching for a while now and although I'm sure it must be here... I cannot find how to add the "Content/Modules" menu to the top (horizontal) navigation menu. It seems that some of the members of the site I'm working on would like to have the "drop-down" menu available on the top navigation.
My eyes are blurred at this point so... if someone would be so kind as to point me in the right direction, I would be most appreciative.
All the best,
Noel |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/3234de284ee21bd39eecd.jpg)
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Tue Dec 14, 2010 6:08 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
ravenworks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 14, 2010 7:12 pm |
|
nuken,
Thanks for the quick reply!
That looks like it may work... however, I'm confused as to what file I find that in!
Would it be nukeNAV.php?
Noel |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
nuken
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Dec 15, 2010 11:19 am |
|
Oh. You are wanting it in the top nav. I'm sorry the link I posted is for the nukeNav block. The file that controls the top nav is located in includes/jquery/nukeNAV.php. I am not sure what changes would be needed for that. I probably would not be able to even look for a few days. Maybe someone else may have the time to look. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
ravenworks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Dec 15, 2010 12:19 pm |
|
No problem...
I've looked into /includes/jquery/nukeNAV.php and now I just have to figure out the proper code.
Thanks for clearing that up.
The site is functioning so there is no rush, but any further help you can provide (when you have the time) is appreciated.
Merry Christmas,
Noel |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
PHrEEkie
Subject Matter Expert
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Feb 23, 2004
Posts: 358
|
Posted:
Wed Dec 15, 2010 1:52 pm |
|
Hi Noel,
Can you be more specific as to what you want added to that top nav?
- Keith |
_________________ PHP - Breaking your legacy scripts one build at a time. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/48fb116845dfecf66294c.gif)
Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA
|
Posted:
Wed Dec 15, 2010 2:25 pm |
|
I think I might have something for you. This assumes you have categories setup and all your content pages nested within those categories... (it will not display un-categorized content)
/includes/jquery/nukeNAV.php
ADD Content to the $menuModules array
Code:$menuModules = array('Content', 'Credits', 'Feedback', 'Forums', 'Legal', 'Member_List', 'News', 'nukeNAV', 'Private_Messages', 'Recommend_Us', 'rwsMetAuthors', 'Search', 'Sitemap', 'Statistics', 'Stories_Archive', 'Submit_News', 'Topics', 'Your_Account');
|
FIND
Code:$nukeNAV .= '
<li><a>'._NUKEMENUMODULES.'</a><ul>'.$activeModules.'</ul></li>
';
|
BEFORE ADD
Code:if (is_active('Content')) {
$nukeNAV .= '
<li><a href="modules.php?name=Content" title="">Content</a>';
$NAVresult = $db->sql_query('SELECT * FROM '.$prefix.'_pages_categories');
$NAVnumrows = $db->sql_numrows($NAVresult);
if ($NAVnumrows > 0) {
$nukeNAV .= '
<ul>';
while ($XXrow = $db->sql_fetchrow($NAVresult)) {
$XXcid = $XXrow['cid'];
$XXtitle = $XXrow['title'];
// display cat
$nukeNAV .= '
<li><a href="modules.php?name=Content&pa=list_pages_categories&cid='.$XXcid.'" title="">'.$XXtitle.'</a>';
// content for cat
$NAVresult2 = $db->sql_query('SELECT * FROM '.$prefix.'_pages WHERE active=\'1\' AND cid=\''.$XXcid.'\'');
$NAVnumrows2 = $db->sql_numrows($NAVresult2);
if ($NAVnumrows2 > 0) {
$nukeNAV .= '
<ul>';
while ($XXrow2 = $db->sql_fetchrow($NAVresult2)) {
$XXpid = $XXrow2['pid'];
$XXtitle2 = $XXrow2['title'];
$nukeNAV .= '
<li><a href="modules.php?name=Content&pa=showpage&pid='.$XXpid.'" title="">'.$XXtitle2.'</a></li>';
}
$nukeNAV .= '
</ul>
</li>';
}else{
$nukeNAV .= '</li>';
}
}
if (is_user($user)) $nukeNAV .= '
<li><a href="modules.php?name=Content&pa=add_page" title="">Add Page</a></li>';
$nukeNAV .= '
</ul>
</li>';
}else{
$nukeNAV .= '</li>';
}
}
|
just a heads up the menu may become too wide when logged in as admin, and I also had to adjust the menu width for my setup
includes/jquery/nukeNAV.js
changed maxWidth:15 to maxWidth:23
but yours may vary depending on theme and font size. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
ravenworks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 27, 2010 4:41 pm |
|
spasticdonkey,
Many thanks for the reply.
The holiday prevented me from getting back sooner.
I am using the theme "Sand Journey" and I just tried the modifications you suggested.
The result was a blank page. (Needless to say I set everything back as before and it all worked again).
Might there be something additional that needs to be done?
Your help is appreciated. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
ravenworks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 27, 2010 4:48 pm |
|
PHrEEkie wrote: | Hi Noel,
Can you be more specific as to what you want added to that top nav?
- Keith |
Keith,
Thanks for the reply.
My client is hoping to have the contents of the "Content" module appear as a drop-down menu in the top navigation.
A suggestion was provided in this thread but it has not worked for me (yet!).
The site i am working on is here:
http://www.gcpba.org/
if that helps.
Your help is appreciated.
Noel |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 27, 2010 5:04 pm |
|
ravenworks wrote: | spasticdonkey,
Many thanks for the reply.
The holiday prevented me from getting back sooner.
I am using the theme "Sand Journey" and I just tried the modifications you suggested.
The result was a blank page. (Needless to say I set everything back as before and it all worked again).
Might there be something additional that needs to be done?
Your help is appreciated. |
When I get a white page I set $display_errors = true; in config.php and it will usually show me the error of my ways
It's likely you missed a ; or deleted a } by accident. No biggie Just try again with $display_errors = true OR Try this version:
http://www.rtsforce.com/files/nukeNAV.zip
you can see it working on my testing site http://www.rtsforce.com/ |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
ravenworks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 27, 2010 5:14 pm |
|
Your file worked!
Many thanks.
Now I notice that some of the "Content" categories and article titles are much longer than the width of the drop-down menu.
The site is located here:
http://www.gcpba.org/
Would you know if that is a function of the nukeNAV.css or is it controlled elsewhere?
Again... "Thank you!" for providing that mod.
Noel |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 27, 2010 5:39 pm |
|
spasticdonkey wrote: | .... and I also had to adjust the menu width for my setup
includes/jquery/nukeNAV.js
changed maxWidth:15 to maxWidth:23
but yours may vary depending on theme and font size. |
or you can try this version of the JS file
http://www.rtsforce.com/files/nukeNAVjs.zip |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
ravenworks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 27, 2010 6:02 pm |
|
AHA! I misunderstood your original meaning.
I thought you were referring to the overall width of the menu itself.
I just uploaded your file (Thank you very much!)... adjusted maxWidth:30 and it all works just fine.
I've said it before and I'll say it again... this forum ROCKS!
The forum members communicate so well and are so patient (as well as educated) that it just amazes me.
I'm tempted to go out and find other clients that require a CMS platform just so I can do two things:
1. Introduce them to RavenNuke
2. Keep coming back to this forum
RavenNuke is a very good platform but it would not be the same for a relative newbie with PHP like me if it were not for all the great help I have received here.
Thanks again.
Noel |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
spasticdonkey
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Dec 27, 2010 6:29 pm |
|
cool, glad you got it working.
it was kinda a quicky and I realized I didn't sort the results
you may want to try this version, which sorts categories A-Z and pages by most recent, and after 10 pages offers a more link instead of a menu that is too tall to read in some cases. You can adjust $navLimit = 10; to your needs...
http://www.rtsforce.com/files/nukeNAV3.zip
I don't have enough content pages on my test site to test effectively but it should work ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jestrella
Moderator
![](modules/Forums/images/avatars/bea6a62d4db43637aa29d.jpg)
Joined: Dec 01, 2005
Posts: 593
Location: Santiago, Dominican Republic
|
Posted:
Mon Dec 27, 2010 8:37 pm |
|
d***... Late to the party, but algo glad everything's working.
spasticdonkey, keep amazing us!!!! ![worship](modules/Forums/images/smiles/icon_worship.gif) |
_________________ "For those whom have not reach the sky... Every mountain seems high"
Best Regards
Jonathan Estrella
http://about.me/jestrella04 |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
rrclansite
Regular
![Regular Regular](modules/Forums/images/ranks/2stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jan 18, 2011
Posts: 86
|
Posted:
Mon Nov 14, 2011 11:01 am |
|
This post is quite old, but I found myself in need of something similar. I'm trying to add a custom module, designed by www.udesigns.be, to the top navigation bar, which doesn't seem to work. I managed to add module = forums.php to the top navigation by editing the theme.php in the theme in question, simply by adding this line of text:
<a href="./modules.php?name=Forums">Forums</a>
However when I try the same with the custom module it won't work... Any ideas for a quicky solve ?
Best regards,
rrclansite |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Tue Nov 15, 2011 1:11 pm |
|
I'm not sure I fully understand you.
This thread relates to nukeNav and I suspect you are referring to links in a menu within a theme?
In any event, that link doesn't look right, you need to remove the ="./modules.php to ="modules.php |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|