PROBLEM WITH CMS

PROBLEM WITH CMS

by Bhupinder Singh -
Number of replies: 0

I am stuck while installing CMS.

The actions taken by me were as posted on the forum posts.

REPRODUCING ACTIONS DONE BY ME :

Installation:

Installation is not completely automatic, so you'll have to
fork your Moodle a little bit. Not much.

So lets start with that manual stuff:

1. You have to add new CONSTANT in your /course/lib.php file:
define("FRONTPAGENEWS", 0);
define("FRONTPAGECOURSELIST", 1);
define("FRONTPAGECATEGORYNAMES", 2);
define("FRONTPAGETOPICONLY", 3);
define("FRONTPAGECMS", 4); <-- this one.


2. You have to add that value also in /admin/site.html (aprox. in line 33-37).

$options = array(FRONTPAGENEWS => get_string("frontpagenews"),
FRONTPAGECOURSELIST => get_string("frontpagecourselist"),
FRONTPAGECATEGORYNAMES => get_string("frontpagecategorynames"),
FRONTPAGETOPICONLY => get_string("frontpagetopiconly"),
FRONTPAGECMS => get_string("frontpagecms","cms")); <-- here


3. You have to make changes to your index.php (same place where your config.php is):

At the start of the page (somewhere around line 49)

if (empty($CFG->langmenu)) {
$langmenu = '';
} else {
.... code stuff here ....
}

$pid = optional_param('pid', 0, PARAM_INT); <-- add this one


and then find the last "case" clause at the bottom of the page and add a new one:

case FRONTPAGETOPICONLY: // Do nothing!! smile
break;

// frontpage cms hack
case FRONTPAGECMS:

include_once($CFG->dirroot .'/cms/cmslib.php');

if ($editing) {
cms_print_page ($pid, $editing);
} else {
cms_print_page($pid);
}

break;


4. Now unpack cms.zip under your $CFG->dirroot (means same level for example blocks and message directories are).

5. Point your browser to http://<yoursystem>/cms/
(something like http://www.domain.tld/cms or http://www.domain.tld/moodle/cms/)
This installs all necessary database tables for you.

6. Unpack block_cmsnavi.zip under your $CFG->dirroot and visit your administration page so that the
cmsnavigation block gets installed correctly.

7. Go back to the cms directory and first add new menu then you can start create pages.
- menu names in cms admin are only for internal usage. You can add whole different name
to menus at cmsnavigation block config.

8. Go to your main page and turn editing on and add "site navigation" block to your frontpage.

9. You should be done if I didn't forget anything out of this big grin
XXXXXXXXXXXXXXXX

The CMS navigation block did not appear although When I am logged in as Admin I can go to the  CMS Page using path

C: .../moodle/cms/

When I go to the Configuration / setting/  page I am getting the following error:

Parse error: parse error, unexpected '<', expecting T_STRING or T_VARIABLE or '{' or '$' in c:\program files\easyphp1-7\www\moodle\admin\site.html on line 144

Have been trying to resolve this issue but I am overlooking something.

Can anyone help please.

Thanks

Garry

Average of ratings: -