YUI Menu installation

YUI Menu installation

by Sherry Brown -
Number of replies: 5
I installed the latest version on my test site (1.9+ 20080310) no problem. On the production site (1.9+ 20080326), however, this happens when visiting the notifications link:

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/vhosts/modelingteachers.org/httpdocs/blocks/course_menu/block_course_menu.php on line 34

Looking at line 34, it says:
33 // counter for id with multiple block instances
34 public static $count = 0;
35

Any clues to why this would be a problem? (

Average of ratings: -
In reply to Sherry Brown

Re: YUI Menu installation

by Alan Trick -
First, you're using an old version. Unfortunately their have been a lot of changes in CVS and the downloadable packages haven't been updated is a while. If you know how to use CVS you'd be best off updating from there.

Otherwise it's easy to fix this problem. It's a PHP 4 thing. If you change line 34 to "var $count = 0;" that'll fix it.

I really should be making downloadable releases from the code in CVS but I don't have the time to do it regularly sad
In reply to Alan Trick

Re: YUI Menu installation

by Sherry Brown -
Fixed line 34, now line 82 has a problem. I'm off to learn CVS... I'll let you know how it goes.

In reply to Sherry Brown

Re: YUI Menu installation

by Alan Trick -
I just made up a new download that should fix this. You can get it from the demo site https://courses.mytwu.ca/demo/moodle/course/view.php?id=2

Let me know if it doesn't work.
In reply to Alan Trick

Re: YUI Menu installation

by Shashi kanth -

Alan, i tried to download the block, but it is in .tar format and i just got a file after downloading.

I don't know how to use it and include in the blocks.

Please help me.

In reply to Shashi kanth

Re: YUI Menu installation

by Alan Trick -
The files are in a compressed archive format (.tar.bz2). It's like ZIP, only better. Linux and OS X should have native support for it (just right click and select "Extract Here" or something like that).

If your using Microsoft Windows, you might need some software. I've found 7-zip the nicest to use. It's also small, quick, and completely free.

When you extract it, there's one folder in there called "yui_menu" drop that in the blocks directory.

One last note. Make sure you have version 0.3. Chris Bandy just informed me that I accidentally linked to and old version in Moodle's plugin database.