Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
ravenworks
Hangin' Around



Joined: Sep 22, 2010
Posts: 33
Location: Arizona

PostPosted: Tue Dec 14, 2010 5:35 pm Reply with quote

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
 
View user's profile Send private message Visit poster's website
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Tue Dec 14, 2010 6:08 pm Reply with quote

See is this helps
http://nukeseo.com/modules.php?name=Forums&file=viewtopic&p=2786#2786

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
ravenworks







PostPosted: Tue Dec 14, 2010 7:12 pm Reply with quote

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
 
nuken







PostPosted: Wed Dec 15, 2010 11:19 am Reply with quote

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.
 
ravenworks







PostPosted: Wed Dec 15, 2010 12:19 pm Reply with quote

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
 
PHrEEkie
Subject Matter Expert



Joined: Feb 23, 2004
Posts: 358

PostPosted: Wed Dec 15, 2010 1:52 pm Reply with quote

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. 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Wed Dec 15, 2010 2:25 pm Reply with quote

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&amp;pa=list_pages_categories&amp;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&amp;pa=showpage&amp;pid='.$XXpid.'" title="">'.$XXtitle2.'</a></li>';
      }
      $nukeNAV .= '
     </ul>
   </li>';
      }else{
      $nukeNAV .= '</li>';
      }
   }
   if (is_user($user)) $nukeNAV .= '
  <li><a href="modules.php?name=Content&amp;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.
 
View user's profile Send private message Visit poster's website
ravenworks







PostPosted: Mon Dec 27, 2010 4:41 pm Reply with quote

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.
 
ravenworks







PostPosted: Mon Dec 27, 2010 4:48 pm Reply with quote

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
 
spasticdonkey







PostPosted: Mon Dec 27, 2010 5:04 pm Reply with quote

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 Shocked

It's likely you missed a ; or deleted a } by accident. No biggie Smile 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/
 
ravenworks







PostPosted: Mon Dec 27, 2010 5:14 pm Reply with quote

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
 
spasticdonkey







PostPosted: Mon Dec 27, 2010 5:39 pm Reply with quote

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 Wink
http://www.rtsforce.com/files/nukeNAVjs.zip
 
ravenworks







PostPosted: Mon Dec 27, 2010 6:02 pm Reply with quote

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
 
spasticdonkey







PostPosted: Mon Dec 27, 2010 6:29 pm Reply with quote

cool, glad you got it working. Wink

it was kinda a quicky and I realized I didn't sort the results Rolling Eyes

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
 
jestrella
Moderator



Joined: Dec 01, 2005
Posts: 593
Location: Santiago, Dominican Republic

PostPosted: Mon Dec 27, 2010 8:37 pm Reply with quote

d***... Late to the party, but algo glad everything's working.

spasticdonkey, keep amazing us!!!! Wave worship

_________________
"For those whom have not reach the sky... Every mountain seems high"

Best Regards
Jonathan Estrella
http://about.me/jestrella04 
View user's profile Send private message Visit poster's website
rrclansite
Regular
Regular



Joined: Jan 18, 2011
Posts: 86

PostPosted: Mon Nov 14, 2011 11:01 am Reply with quote

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
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Tue Nov 15, 2011 1:11 pm Reply with quote

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
 
View user's profile Send private message Send e-mail
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©