Jump to content


Photo

[Snippet] CoolMenu


  • Please log in to reply
22 replies to this topic

#1 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 04 January 2008 - 01:19 PM

File Name: CoolMenu
File Submitter: Dean
File Submitted: 4 Jan 2008
File Category: Menus & Navigation

CoolMenu Files

Click here to download this file

#2 rnicolaus

rnicolaus

    Etomite Forum Newbie

  • Member
  • 1 posts

Posted 13 June 2008 - 12:13 AM

File Name: CoolMenu
File Submitter: Dean
File Submitted: 4 Jan 2008
File Category: Menus & Navigation

CoolMenu Files

Click here to download this file


Dean - nicely documented - thank you! and yes it is indeed Cool.

Richard

#3 tecsbrain

tecsbrain

    Etomite Forum Newbie

  • Member
  • 6 posts

Posted 15 July 2008 - 12:31 AM

It may be well documented but...what is it exactly? I'd download it and find out but a one-liner about why it's so cool would help a lot.......not that I don't appreciate the hours of work put into this.

#4 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 15 July 2008 - 12:51 AM

It may be well documented but...what is it exactly? I'd download it and find out but a one-liner about why it's so cool would help a lot.......not that I don't appreciate the hours of work put into this.


Try Googling "CoolMenu" and I'm sure you'll find the original source of this menu, prior to its being integrated into Etomite... This should be the correct page...

#5 vw53a

vw53a

    Likes Etomite Forums!

  • Member
  • PipPip
  • 393 posts

Posted 15 July 2008 - 10:36 AM

Hmm, funny (or not).
On the bottom of that page I find "Sites: Viagra". Therefore I closed that page right away as I'm not certain if it is a hacked, corrupted, viral page or just a joke.

#6 Cris D.

Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts

Posted 15 July 2008 - 11:51 AM

On the bottom of that page I find "Sites: Viagra". Therefore I closed that page right away as I'm not certain if it is a hacked, corrupted, viral page or just a joke.

His site has been spammed via the vBulletin forum self-registration, obviously not a really well maintained site, at least you can see what coolmenu can do though - good for a custom fit if something special is required.

#7 PaulD

PaulD

    Likes Etomite Forums!

  • Developers
  • PipPip
  • 413 posts

Posted 27 February 2009 - 01:12 AM

Hi Dean,

A cool menu indeed. I had a few probs with it though, although these are CoolMenu probs, not the snippet.

One quick question though, when I edited the snippet to change the urls of the menu i tried $etomite->makeURL() but got an error. I noticed in the code that it had been changed slightly so I altered the call as $funcEtomite->makeURL() and it worked fine. Could you explain very briefly what is going on in that snippet so the etomite calls are changed? Thank you.

This is what I was doing around line 78
// added make url for link in altered row below
$url=$funcEtomite->makeURL('22','','?getcatID='.$child['id']);

// orig	$output .= ".makeMenu('".$child['id']."CM','".$parent."CM','".$child['pagetitle']."','[~".$child['id']."~]')\n";
   		$output .= ".makeMenu('".$child['id']."CM','".$parent."CM','".$child['pagetitle']."','".$url."')\n";

Paul.

#8 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 27 February 2009 - 02:16 AM

PaulD, this being an older snippet it is using an outdated method of passing the $etomite object reference into the MakeCoolMenu() function... Since this snippet was written it has become common practice to simply add global $etomite; as the first code line inside a function which eliminates the need to pass it in the function call...

// example of using the global $etomite object within a snippets local function
function someFunc()
{
  global $etomite;
  $url = $etomite->makeURL($etomite->documentIdentifier);
  /* more code here */
}

Hope this helps..

Hmmm... Seems that the snippet appears to have been submitted in 2008 yet the date in the snippet reflects 2004...Migration into the new snippet library, perhaps...

#9 Rodrigo

Rodrigo

    Etomite Forum Newbie

  • Member
  • 21 posts

Posted 12 October 2009 - 09:32 PM

I'm not sure what I am doing wrong, but whenever I call the snippet on my template, the snippet name appears, rather than the actual menu.

I have uploaded the cool_menu folder within the assets/site/ folder, I have added the chunk within the <head> tags, and yet, no menu.

You can see what I mean by looking at a test page I have created here. Notice the bottom of the page, where it actually reads [[CoolMenu]].

Can anyone share any light into this? Any help would be greatly appreciated.

Thanks,
Rodrigo

#10 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 12 October 2009 - 09:39 PM

Did you copy the CoolMenu snippet code into a new snippet called CoolMenu ?

#11 Rodrigo

Rodrigo

    Etomite Forum Newbie

  • Member
  • 21 posts

Posted 14 October 2009 - 05:18 PM

Did you copy the CoolMenu snippet code into a new snippet called CoolMenu ?


Yes, I did, as well as copying the chunk as a new chunk, and called it CoolMenu. So I have a new snippet and a new chunk each called CoolMenu. And yet, the page outputs text, rather than the snippet itself.

Any ideas?

#12 mikef

mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 14 October 2009 - 08:39 PM

my first step with any page that has snippets misbehaving would be to ensure that all caching is turned off. Some snippets require this, for others the released code has serious bugs in caching (yes, I know that there is a patch available, but it has still not made it into the released code, so new people are going to continue to hit known problems).

I've not looked at the Coolmenu snippet, but maybe there is a clash between the snippet and chunk caused by them having the same name? maybe try using a different name for one. (This is just a guess, I wouldn't be surprised to find its irrelevant, but this would be the second thing I'd check in this case)

#13 Rodrigo

Rodrigo

    Etomite Forum Newbie

  • Member
  • 21 posts

Posted 15 October 2009 - 03:15 AM

mikef,

Those are great suggestions. However, I actually made sure to use the snippet without the chunk, i.e., I used the chunk code on the template instead. And this did not work either. Obviously, I also used te chunk with and without the same name, to no avail.

Finally, I cleaned AND turned the cache off, and still nothing.

Here is one more clue: the site is hosted with Network Solutions. The root of the site is /htdocs/home/. However, in the NetSol control panel the domain directs all resources directly to the /htdocs/home/ directory, so in essence, the the root directory is just "/". Anyway, I tried using all combinations of roots, and none worked.

I have no idea if the above has anything to do with my not displaying the snippet, but does anyone have any other suggestions?

Thanks in advance,
Rodrigo

#14 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 15 October 2009 - 12:50 PM

I'm betting that if you remove the [!FixInertTags!] snippet call from your template that [!CoolMenu!] will work... Notice that I said [!CoolMenu!] not [[CoolMenu]]...The [!FixInertTags!] snippet is only used to help display the snippet and chunk calls in the stock documents included in the Etomite Full Install and shouldn't be required on a production site...

#15 Rodrigo

Rodrigo

    Etomite Forum Newbie

  • Member
  • 21 posts

Posted 15 October 2009 - 02:51 PM

I'm betting that if you remove the [!FixInertTags!] snippet call from your template that [!CoolMenu!] will work... Notice that I said [!CoolMenu!] not [[CoolMenu]]...The [!FixInertTags!] snippet is only used to help display the snippet and chunk calls in the stock documents included in the Etomite Full Install and shouldn't be required on a production site...


I tried removing the {{FixInertTags}} from the template, but that did not work either. There was no instance of [!FixInertTags!], just {{FixInertTags}.

Does anyone have a working sample of CoolMenu with Etomite? What version are you using?

Thanks,
Rodrigo

#16 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 15 October 2009 - 05:11 PM

Did you clear the site cache after removing the {{FixInertTags}} chunk call... Forgot it's a chunk, not a snippet... Not sure if clearing cache is the answer, but worth a try...

#17 Rodrigo

Rodrigo

    Etomite Forum Newbie

  • Member
  • 21 posts

Posted 15 October 2009 - 08:47 PM

Yes, I did clear the cache, but it did not work. Man, that's weird!

#18 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 15 October 2009 - 10:38 PM

I started a test install earlier today but had to run out on appointments... I'll try later tonight or tomorrow to see if I can get it working...

#19 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,786 posts

Posted 15 October 2009 - 11:25 PM

This snippet is so old, does it even work any more? I didn't write it btw, I just uploaded it from the old library.

#20 Ralph

Ralph

    Loves Etomite Forums!

  • Admin
  • 6,539 posts

Posted 16 October 2009 - 01:24 PM

I was able to get CoolMenu working in Etomite Prelude v1.1 without any problems...

Here is what I did...

Uploaded the cool_menu subdirectory to asstes/site/cool_menu...
Saved snippet.txt as a snippet named CoolMenu...
Saved chunk.txt as a chunk named CoolMenu...
Added the {{CoolMenu}} chunk call into the head of my site template...
Added the [!CoolMenu!] snippet call into a document even though it would normally be placed in the site template...
Pointed my browser to the document containing the snippet call and the menu displayed...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users