Jump to content


Photo

help with new/old ListSiteMap


  • Please log in to reply
5 replies to this topic

#1 darren

darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 16 July 2009 - 12:33 AM

I've been using a modified version of ListSiteMap (// Version: 0.6h // Date: 2005.07.08 // jaredc@honeydewdesign.com) for a css-dropdown menu on a site. I didn't realize there was a newer version of ListSiteMap - this sites a few years old and this is the one that was in the site's snippets. It works great on site 1.

Now today I did a new install on another server and copied the snippet from site 1 to new site 2, and get this error while using the snippet:
Fatal error: Call to a member function getActiveChildren() on a non-object in /www/.../index.php(508) : eval()'d code on line 71

I poked around on the new site and looked at it's installed version of ListSiteMap, and see that Ralph has made some improvements to Jaredc's version... but the old version should work as well, right? So i copied the unmodified 0.6h version of ListSiteMap and it doesn't work either on this install. The only thing I can think is that site 1 was originally 0.6.1.something and has been upgraded, but not sure what that has to do with anything.

i need to do one of 2 things...

1. find out why this doesnt work on site 2:
if(!isset($MakeMapDefined)){
   function MakeMap($funcEtomite, $listParent, $listLevel, $description, $titleOfLinks,$maxLevels,$su){
     $children = $funcEtomite->getActiveChildren($listParent, 'menuindex', 'ASC', 'id, pagetitle, description, parent, alias, longtitle, published');
but this does:
if(!isset($MakeMapDefined))
 {
   function MakeMap($listParent, $listLevel, $description, $titleOfLinks, $maxLevels, $su, $ie)
   {
     global $etomite;
     $children = $etomite->getAllChildren($listParent, 'menuindex', 'ASC', 'id, pagetitle, description, parent, alias, longtitle, published');

2. finish converting the newer version of LSM for the dropdown menu. I've got it close except for 2 things... setting $selfAsLink = true; doesn not make the current page a link (even in Ralph's version) and a bit of logic from the modified old LSM which added an id and class to the upper most ul does not work.

heres that:
 // was -- $output .= $ie."<ul class=\"LSM_{$listLevel}\">".$ie;
 // but we only want a class on top level ul so...
 if($listLevel == 0) {$output .= '<ul id="nav" class="dropdown dropdown-horizontal">'.$ie;}
 else { $output .= '<ul>'.$ie; }
     foreach($children as $child)
     {
 ...

but using that gives every nested ul the id and class as well. (on site 1 that works fine...)
I've been working at both issues for sometime and have to take a break and ask for help - if anything jumps out at you guys I'd sure appreciate being pointed in the right direction...

#2 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 16 July 2009 - 12:44 PM

Please supply us with additional information so we can better assist you in resolving this issue... The following information, complete with version/release will be of great help... If the issue is browser-specific also include browsers tested and the results of each...

Etomite Version
Server Operating System
Apache Version
PHP Version
MySQL Version

automated response

#3 darren

darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 16 July 2009 - 02:12 PM

etomite 1.1
FreeBSD
Apache/2.2.11 (Unix) PHP/5.2.8
mysql 5.1.31

issues are not browser specific

#4 darren

darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 16 July 2009 - 06:30 PM

Well i've just commented out the lines regarding selfAsLink as I don't need it right now.

ListSiteMap, out of the box, isn't acknowledging the $listLevel which is the real issue for me. every ul is given class="LSM_0" regardless of it is nested or not. I'm looking at NavMenu to see if it will integrate well...

#5 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 18 July 2009 - 10:11 AM

Well i've just commented out the lines regarding selfAsLink as I don't need it right now.

ListSiteMap, out of the box, isn't acknowledging the $listLevel which is the real issue for me. every ul is given class="LSM_0" regardless of it is nested or not. I'm looking at NavMenu to see if it will integrate well...


Call to a member function getActiveChildren() on a non-object in /www/.../index.php(508) : eval()'d code on

means a PHP related version issue and can only be resolved by taking out the offending (depreciated) code for your newer version of PHP.

I don't know if this will suit your needs or not, but I spent a lot of time getting pro-dropdown menu working through multiple levels. It's not as easy as you would imagine, especially when you add children and siblings. If you can utilise the same css by inserting the snippets' classes that are outputted (in the documentation) to your existing css, you shouldn't be far from the mark.

#6 darren

darren

    Likes Etomite Forums!

  • Member
  • PipPip
  • 251 posts

Posted 18 July 2009 - 02:13 PM

NavMenu is working fine with my css...and actually took only a few minutes to convert over to my needs. It doesn't do any authentication like listsitemap but we'll deal with that when the time comes. I looked at pro-dropdown but need to steer clear of any copyright issues and I was already familiar with the css as i'd used it on a previous site.

The css i'm working with was found here and gives a good idea of its potential: http://www.lwis.net/...drop-down-menu/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users