CMS integrations: CMS like ... sure!

CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Number of replies: 177
Hi to all,

As some of you might remember I did start a thread earlier this year about CMS like features. The reason why I put this hack in distribution is that I don't have much time to work on it, so I hope that some one has some extra time in their back pockets and continues with it. I really would like to see it using Jon's pagelib at some point. It would be very nice to be able to add blocks also inside the pages as well.

You can download needed packages from here: http://julmajanne.com/stuff/cms.zip and http://julmajanne.com/stuff/blocks_cmsnavi.zip

-- Cut 'n' paste from readme.txt --

Ok! With this "plugin" you can create page content to your Moodle's
frontpage, and have multiple menus, so that's why CMS like ...

CAUTION!!! USE AT YOUR OWN RISK.

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

Hopefully you get it work without biggish fuss...

Cheers,
Janne Mikkonen

Edit: forget to mention it's for 1.5 and up ...
Average of ratings: Useful (2)
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Hi Janne,

Could you please explain how this is different than your NetPublish module.  Could you use the two together?

Thx
Chardelle
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Chardelle,

First of all the Netpublish is a module and it's only affective in courses and it is intending to be a activity module (a online magazine).

And this is a tool which can be used only to change Moodle's frontpage view. It actually allows you to have "a site" within your frontpage.

The ideas of these two are quite similar but the purpose differs much.

(Quite vague explanation, little like political statement. Lot of words, no content big grin).

- Janne -

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
You'd get my vote!  Actually that was helpful, I think I'll give both of them a try.

Thanks Janne
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Ger Tielemans -
The Netpublish module is a very nice tool, thanks.  So I will taste this one too smile
In reply to Ger Tielemans

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Thanks Ger,

Hopefully it'll get much better in the future wink

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Janne,

Wow so cool.  Works great.  A couple of very little things:

1.  you need to add $strdatabasesuccess = get_string("databasesuccess"); to cms/index.php. 

2. and maybe... add a final step to your instructions to be sure to set the site settings to CMS content.  Like a dork I forgot to do this, then wondered why it didn't work when I clicked on a link. 

You really are helping to turn Moodle into a real powerhouse of a program!!!
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
shy Yikes!!! I knew I forgot something out of it... I really should sleep more wink
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

I was reading the string. Can you advise where and why this string is top be added.

$strdatabasesuccess = get_string("databasesuccess");

What is the functionality and the advantage.

Sorry if it sound dumb. I am new to moodle and CMS.

Thanks

Bhupinder

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
I made a little updates. Now cmsnavigation is in same zip file as cms (http://julmajanne.com/stuff/cms.zip)

Require login feature added to menus, meaning you can define does that menu show when user is not logged in.

If you already have installed older version: Just unpack this new one over older one (it'll replace both cms and cmsnavigation). Log in as admin and visit your http://<yoursite>/cms/ and it'll update your cms installation.

Trying it first time: Read readme.txt inside the zip file.

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Hi Janne,

I'm adding html pages to my new 1.5 site right now!
I just updated and got this error when updating the block:
Unknown column 'cn.requirelogin' in 'field list'

SELECT n.pageid, n.title, n.isfp, p.publish, cn.requirelogin FROM mdl_cmsnavi_data AS n, mdl_cmspages AS p, mdl_cmsnavi AS cn WHERE n.pageid = p.id AND p.publish = 1 AND n.naviid=1 AND cn.id = 1

And this error for the CMS
Table 'training_mdle1.mdl_cms' doesn't exist

SELECT value FROM mdl_cms WHERE name = 'version'

But everything seems to work. Also, you have all of the block folders in this zip?

Also, the pageupdate icon brings up the A required parameter (sesskey) was missing error-- even though the sesskey is there?
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Thanks Chardelle for all the testing work smile

The query part is expected, since there is whole new table in database and queries changed a little bit.

All of block folders? Should be only cmsnavigation (blocks/cmsnavigation).

the pageupdate icon brings up the A required parameter (sesskey) was missing error-- even though the sesskey is there? Crickey, have to fix that one wink
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Hi Janne,

I just love this feature!

I just wanted to let you know of some odd behavior with pageupdate.php. and the html editor (ironic isn't it?).  If I go back to make changes, the html editor does not "keep" any of the html, for example changes to text styles and inserted images disappear and have to added again.  I also noticed that in Firefox, I can paste into the editor, so something is definitely different about the way it behaves here.

And a question.  If I publish a page it appears in the menu as a link.  Then, if I want to add further pages from that page, I can add a page and not publish it, then just add the link to that page to the "first" page.  The only problem I have with this is that when I click to the non-published page, the highlight on the link in the menu goes away--which you would expect really, since you aren't on that page anymore.  Is there a way to get that highlight to stay?  Or, is there a better way to have second level pages?

Thanks
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Chardelle.

What version of Moodle in 1.5 branch you're using?
At one point there were a $value = clean_text($value); call in print_textarea (weblib.php) function call that stripped most of images and html attributes from the text.

Answer: No, there isn't a way to keep "so called" upper page link highlighted sad, but some point there will be unlimited subpages feature included. When it's done, I can't say.  I'm very tied up with "logi - tutoring tool".

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Oh thanks Janne, I was planning on upgrading to 1.5.2, so that should fix it.  Subpages would be great, but I'm looking forward to seeing the tutoring tool too!!
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
CMS package updated (http://julmajanne.com/stuff/downloads.php)

There's nothing much in this update execpt:
- Support for unlimited subpages (for each page of course).

If you had installed CMS before, just unzip the new version over the old one
and make couple of minor changes in your $CFG->wwwroot/index.php file.

first, change line:
$pid = !empty($_GET['pid']) ? clean_param($_GET['pid'], PARAM_INT) : 0;

to:
$pid = optional_param('pid', '', PARAM_RAW);

And change the case clause to this:
    case FRONTPAGECMS:

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

            if (! empty($pid) ) {
                $pages  = explode(",", $pid);
                foreach ($pages as $key => $value) {
                    $pages[$key] = clean_param($value, PARAM_INT);
                }
                $pid = (int) end($pages);
            } else {
                $pid = 0;
            }

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

        break;


If you're doing a new installation, read "readme.txt" file inside the cms -directory.

- Janne -

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Hi Janne,

This will be cool, but, I'm stuck. First, I don't have a line in my index.php that looks like this: $pid = !empty($_GET['pid']) ? clean_param($_GET['pid'], PARAM_INT) : 0;

just the one you added previously:
$pid = optional_param('pid', 0, PARAM_INT);

Which I changed to what you posted above, and also tried switching the two I see the new options dropdown to add, edit, delete, but I don't see any way to make a page a subpage.

Help.
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Chardelle

The line you've changed is correct smile (it depends on what version is used).

To make a subpage: Check (checkbox) one of the existing pages and choose from dropdown menu addnew. And if you wish to add new page at the toplevel, don't check any existing pages.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Oh, okay, I've got it now. In case anyone else is wondering, this will add the second page as a link below and indented to the first page.

I highly recommend this, its an absolutely fantastic way to add content/info to your front page. Thanks Jannekiss


In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Hopefully this is the last time I'll bother you Janne, I know you're busywink.  There's no rush on this, I just noticed it was a problem.

I can't embed a swf file into a page. The html editor in update.php strips the object tags if I tried to embed flash. Is there an easy fix for this?

E.g. code:

<object width="151" height="68" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="http://trainingandcoachingcenter.com/file.php/1/lw2.swf" name="movie" />
<param value="high" name="quality" />
<embed width="151" height="68" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="http://trainingandcoachingcenter.com/file.php/1/lw2.swf" />
</object>

Gets stripped to:

<param name="movie" value="http://trainingandcoachingcenter.com/file.php/1/lw2.swf" />
<param name="quality" value="high" />

Thanks
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Chardelle.

The object and embed tags are "prohibited" in version 1.5.x(2, can't remember in which subversion it came affective) and there is a new variable in settings called "allowobjectembed". This is set to false by default and you should enable it to prevent <embed> and <object> tags to be stripped.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Well so there is. Okay, that worked, and it really was easy! 
Thanks Janne, you're the best.
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Hi again Janne,

I think I said I wasn't going to bother you anymore, but...

I'm having some strange behavior that I believe may be caused by the latest CMS code since it started when I upgraded. Whenever I turn on or off editing in a course, it also turns editing on/off for the front page and vice versa. Any ideas?
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by L. Vandijck -
I had noticed this before but I don't think it is related to any specific add on. It looks as if it the normal behaviour in Moodle itself.
A few tests gave the following results:
  • logged in as a regular teacher: whenever I turn editing on (or off) in one of my courses, it is automatically switched to the same status in all my other courses;
  • when logging in as administrator, this includes the front page.
My provisional conclusion: the editing switch seems to be user related rather than course related.
Regards,
Leo
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Anil Sharma -

Janne

This block is brilliant and i love it. Its a necessary block for everyone and it should be made a part of the standrard moodle.

Just a few suggestions :

1.  When a page is clicked upon, there should be a way of changing the font colour on the left to highlight it. Presently, the font only becomes bold

2.  If we could get a way of changing the background colour or add a picture in the "Menu Name" option, the complete looks of a moodle installtion could be changed..it would be brilliant !

In reply to Anil Sharma

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Anil

Suggestions taken in to consideration smile. I'll try to squeeze the first one into next update. Second one I'm not so sure, because it's not up to cmsnavigation block but the whole block system...

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Ger Tielemans -

 and choose from dropdown menu addnew...

Janne, did you upload the right version? I see nowhere this option in the menu (or the code) clown

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by kathy hooper -
Hi
I am keen to see what this addition can do an have just added cms to my 1.52 version. All goes well until I try to add a new page and I get the following error message
Parse error: syntax error, unexpected ';' in C:\apachefriends\xampp\htdocs\moodle\cms\html\pagesindex.php on line 14

which refers to this line
<?php echo /* cms_print_addnewpage($menuid); */ ?>
removing the semicolon makes no difference.
Also when the tables were installed there was an error message about a missing sesskey. Any ideas?
kathy
In reply to kathy hooper

Re: CMS integrations: CMS like ... sure!

by Anil Sharma -

I also got the missing sesskey during the table installtion but it seems to work fine despite that error.  To see what this block can do, click here.

I got that unexpected ';' error but due to change in site.html page.  If you see the readme.txt which is part of the cms.zip file, point no 2 says for the files site.html:

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

While it askes you to add that last line, you must be careful to remove the ';' from the line above. Best is to replace the entire part in the readme.txt file to the site.html file, the error gets corrected.

In reply to Anil Sharma

Re: CMS integrations: CMS like ... sure!

by Ger Tielemans -
I see on your website that you have it all working, nice: I get empty blocks... Which version of cmsnavigation block are you using? could you attach your block as a zip?
In reply to Anil Sharma

Re: CMS integrations: CMS like ... sure!

by James Robertson -
Nice work, thanks so much for the example.  Now if I can just get a few hours to set it up and play with it...
In reply to kathy hooper

Re: CMS integrations: CMS like ... sure!

by Ger Tielemans -
IF I remove /* AND */ it works for me, I can create menu's and pages.
In reply to kathy hooper

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Kathy

You can just remove that whole line from the file.

I didn't get missing sesskey, but I'll check into it. I'll try to get new updated version out at sunday (finnish) evening.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Anil Sharma -

Janne

Before you release a new updated version, just a few small suggestions :

   1.  This discusion post has become too long and complicated, lets start a new one introducing your brilliant new block and post it both in the "Developer Forum" and the forum for "Blocks"

   2.  Your readme.txt files needs to be updated with a few more details. If you have the time to do it, great otherwise I can help with that by trying out your new updated version and sending a revised readme.txt to you.

Please mention in your new post what changes are there in the new version.

Good luck !

In reply to Anil Sharma

Re: CMS integrations: CMS like ... sure!

by Anil Sharma -

One more thing, the session key error does come up...i've tried it on three installation of 1.5.2.   Another strange thing : One advantage of the site navigation block is you can add many of them and add lots of pages under each block.  However, suppose i add 10 pages to the first block, then try to add a second block, its fine. The moment i try to add a third block, instead of this new block being blank, the entire list of the first block's pages comes into this one.

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by kathy hooper -
Thanks so much for the help, it is working now. I am using Moodle to set up a school intranet and lms. This feature will be very useful.
kathy
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

I have attempted completeting all the steps for CMS installation.

After completing the actions I did not get the block of CMS under Blocks.

I can on pointing to the http://localhost/moodle/cms

reach the CMS administration page which shows the menu and page creation text.

When I try to go to the settings I am getting an error message.

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

I shall greatly appreciate your help as I am stuck and unable to correct the mistakes if any made by me.

Thanks In Advance

Garry

In reply to Bhupinder Singh

Re: CMS integrations: CMS like ... sure!

by Jan Dierckx -

Look up the following lines around line 36 ...

                        FRONTPAGETOPICONLY      =>  get_string("frontpagetopiconly"),
                        FRONTPAGECMS            =>  get_string("frontpagecms","cms"));

Do they look like this? Make sure there is only one close parenthesis and no semicolon on the first of these two lines.

There should be two parentheses and a semicolon on the last of these two lines.

In reply to Jan Dierckx

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

Thanks for the reply.

The code is reproduced :

get_string("frontpagenews"), FRONTPAGECOURSELIST => get_string("frontpagecourselist"), FRONTPAGECATEGORYNAMES => get_string("frontpagecategorynames"), FRONTPAGETOPICONLY => get_string("frontpagetopiconly"), FRONTPAGECMS => get_string ("frontpagecms","cms"));

The second parenthesis was missing .

Even after adding the same the error is not going.

Any further guidance???

Garry

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

A clarification required.

I am trying to install CMS and have an error coming on going through the readme text file i find that the code to be added is

 $pid = optional_param('pid', '', PARAM_RAW);

Where as in the directions above

$pid = optional_param('pid', '', PARAM_INT);

Can you advise what is to be done.

Thanks for the help.

PS I am unable to get the block of CMS in the front page.

Any suggestions to resolve this shall be welcome.

Thanks

Garry

In reply to Bhupinder Singh

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
$pid = optional_param('pid', '', PARAM_RAW);

is the right line. The directions above is very old wink.

Have you added menus and pages into them? You need atleast one menu to be able to add cmsnavigation block.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

Hi Janne,

The installation is working and it looks great. A very good addon which should I believe add a lot to Moodle.

There were a number of patches uploaded up by you .

I used your latest version of CMS.

Does this  take care of the functionality cms_navi, outpublish and netpublish zips too.

If it does not then can you advise what these are meant for and how they can be add to moodle.

If they need to be added can you provide some instructions.

Great Functionality congrats  once again.

Garry

In reply to Bhupinder Singh

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Outpublish is a plugin for netpublish and these packages don't have anything to do with CMS features. If you wish to install only cms features you only need cms.zip from (http://julmajanne.com/stuff/cms.zip it also include necessary cmsnavigation block), and thats it.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

Hi Janne,

Thanks for your help and clarification.

Can you be kind enough to advise how to install netpublish and outpublish. If the information is alrady available can you guide me to the source.

This will be I am sure as great as your CMS Block.

I can hardly wait to install both.

Tahanks and waiting you help.

Garry

In reply to Bhupinder Singh

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Module installation is quite straigth-forward in Moodle. Just unzip netpublish.zip into your Moodle installations /mod/ -directory and visit your sites administration page. And in most cases that's it.

If you'd like to use Outpublish (which is a plugin for netpublish, allowing to publish netpublishes to outside of Moodle) you unzip that package at the same directory level where you can find directories: admin, lib, theme, etc.

But I strongly recommend that you should start just with Netpublish module and add Outpublish later on, if you choose to continue using netpublish.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -
Hi Janne,
Thanks for the help.
The installation was smooth.
The netpublish module was great I shall be trying the outpublish module too.01.gif
Can you suggest some sites where I can see the various uses of the module.
My creativity elements are loww today.02.gif
 
Garry

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

Sorry for the bother again.

I have placed OUTPUBLISH folders as suggested.

I have not been able to get any confirmation / sign to its availability.

Sorry to sound dumb. But your instructions shall be helpful as to how to invoke feature of this module.sad

Garry

In reply to Bhupinder Singh

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
If your outpublish plugin is installed correctly, you should see new link in your netpublish "tool" links saying "Publish outside".

The list of published publications outside of moodle should be seen at http://yoursite/moodleinstalldir/netpublish.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

Hi Janne,

A small problem that requires your guidance.

Placing OUTPUBLISH FOLDER I get the following ERROR.

Warning: file(c:\program files\easyphp1-7\www\moodle/blocks/outpublish/block_outpublish.php): failed to open stream: No such file or directory in c:\program files\easyphp1-7\www\moodle\lib\blocklib.php on line 21

Any Advise.

Garry


In reply to Bhupinder Singh

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Garry,

You've unpacked the outpublish (the directory inside of this zip file is "netpublish") plugin into wrong folder. It should not be under /blocks -folder, but in same level as blocks -folder.

In your case this means c:\program files\easyphp1-7\www\moodle\netpublish

Outpublish is not a block or a module. It's a plugin for netpublish module.

I hope this helps.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

Hi Janne,

It was an error on my part.

The outpublish now works well. big grin A great feature.

Thanks once again.

 Garry

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Skip Marshall -
Does anyone have any suggestions regarding reinstalling this module?  I successfully installed in on one installation without a problem.  I installed the module on another and the installation was unsuccessful.  Apparently the block didn't install.  I am able to use the cms features, just not add the cms block.  I've tried removing the cms files from the mySQL database and then reinstalling.  No luck.  Any suggestions?
In reply to Skip Marshall

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Skip

If the cmsnavigation block is your problem. You don't have to uninstall or remove cms tables from database.

Did you do both istallations from same cms package? Did you verify that cmsnavigation (site navigation) block did not install from admin -> blocks page?

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Skip Marshall -
Thanks, Janne.

I did use the same CMS package.  The cms block is not listed in the block administration menu.  It is also not listed as an option when I try to add a block.  I can however administer the CMS menus and pages.  I don't recall seeing the normal block installation process.  Is there a way to force it to reinstall the block?
In reply to Skip Marshall

Re: CMS integrations: CMS like ... sure!

by Ger Tielemans -
Is this the only block you did try to install? (if one block does not install all the others after that one will also not work)
In reply to Skip Marshall

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Yes you can do every page and menu administration task whether the cmsnavigation block is present or not.

Is the cmsnavigation directory in your block directory (/blocks/cmsnavigation)? If it isn't unzip cmsnavigation folder (and related pages) from cms.zip package into block directory and visit admin -> blocks again.

- Janne -
In reply to Skip Marshall

Re: CMS integrations: CMS like ... sure!

by Bhupinder Singh -

Try logging off and logging in again and that to through the admin side and see if the problem gets solved.

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Anil Sharma -

I've tested this with 1.6dev and it works fine for me !

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Don Farion -
I just upgraded to the new activity locking module that can be found in the Conditional Activities forum.

It caused me some problems with this great modification in that I got a fatal error message if I attempted to open the first page in editing mode.

I just posted my fix here:

I hope this helps other users of both mods.


In reply to Don Farion

Can we have a screen shot?

by aggelos panagiotakis -
I just want to see what you maaaaadlers ( moodlers!) are up to.Maybe it would be cool to have a screenshot here of these features prior to installing anything!So Please add a screen dump for the rest of us!You are just too excited for not giving us something handy to vote for!
Anyway Thank you!
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Jeffery Watkins -
I followed all of the directions.... I can add the cmsnavigation block... I get an editor to add pages.... I set a page to default, I change site settings to display cms content.... My front page as a block which says "No Content yet"

Why will it not display what I put into it?

Jeff
In reply to Jeffery Watkins

Re: CMS integrations: CMS like ... sure!

by Josep M. Fontana -
Actually, I'm experiencing exactly the same problem.

Josep M.
In reply to Jeffery Watkins

Re: CMS integrations: CMS like ... sure!

by Ger Tielemans -
You also published the individual pages?
In reply to Ger Tielemans

Re: CMS integrations: CMS like ... sure!

by Jeffery Watkins -
Yes, I published the pages, set one as default... and so on.

Jeff
In reply to Jeffery Watkins

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Do you see page links at your cmsnavigation block? And If you follow one of them does it display page or "No content yet" -text?.

Did you do fresh install or did you update older version?

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Jeffery Watkins -
Fresh Install.

No links in blocks.
In reply to Jeffery Watkins

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Did you choose menu for your block?

Turn editing on -> edit.gif (on cmsnavigation blocks' title)
Choose menu and name it and save changes.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Jeffery Watkins -
Yes.  I did that.  No links appear in menu.  No content shows anywhere.

Jeff
In reply to Jeffery Watkins

Re: CMS integrations: CMS like ... sure!

by Josep M. Fontana -
Same here.
I published the pages, set one as default... and so on, did a fresh install and had setup a menu before I published any pages.

I don't think this  information is relevant, but just in case. I'm doing this on a PC where Moodle is installed over XAMPP.

Josep M.
In reply to Josep M. Fontana

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Ok! If you really, really pressed "save changes" in CMS navigation block config page, add this line into your /blocks/cmsnavigation/config_instance.html:

$menus = get_records("cmsnavi", "course", $courseid);
print_r($this->config); // <-- this one here


Turn editing mode on and visit block's config page and you should see something like this: stdClass Object ( [menu] => 1 [title] => Navigation ) printed on block's config page.

If you both (Jeff and Joseph) see something like above, I'll scratch my head for a while...

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Jeffery Watkins -
Start scratching....

stdClass Object ( [menu] => 1 [title] => Navigation )


Jeff
In reply to Jeffery Watkins

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Can you send me your block_cmsnavigation.php file?
In reply to Jeffery Watkins

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Found the problem! A major careless mistake of creating database tables. One column missing in both postgres7.sql and mysql.sql

So update to latest version http://julmajanne.com/stuff/downloads.php

- Janne -

ps. You need to visit cms admin page once to make this fix to apply.
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Josep M. Fontana -
Thanks Janne,

Is there an easy way to reinstall the new version? I mean, if it is only one line of code that has changed in one particular file (in my case mysql.sql), can you tell us where we copy the modified file (in case this is what has to be done). I prefer doing that than undergoing the whole process of installation again.

I see that there are a gazilion mysql.sql files. I imagine that the one I have to replace is the one in ...\moodle\cms\db but I wanted to double check. Am I very far from the mark?

Josep M.
In reply to Josep M. Fontana

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
You just unzip the new files over the older ones and visit CMS's main (admin aka index.php) page. And that should do it. The fixing code is in index.php

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Josep M. Fontana -
Thanks Janne. It seems to be working now. Although I can only get to see one of the pages I have published. Only the default page is visible. Shouldn't I be able to see a succession of the pages that I keep on adding?

Also, sorry about my ignorant question, but what is the function of the menus? I've created some menus, but I don't see them appearing anywhere.

Josep M.
In reply to Josep M. Fontana

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Turn edit mode on on your frontpage and add new block "CMS navigation".
Edit the block instance to contain one of the menus you've created (click edit image in blocks' title bar).
Choose menu from dropdown list that you wish to use in this block and save changes.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Josep M. Fontana -
OK, got it. Thanks. Now the menu makes sense. I had created it but I had not made it visible.

Now the question I have is how to make that all the pages become visible appearing one after the other. The way I have it now, each page is made visible once you click on the menu, but once you click another item in the menue the page disappears to be replaced by the next. I seem to have seen sites using your CMS where the pages created via CMS appear consecutively on the main site page.

Josep M.
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Julian Ridden -

Just tried to upgrade from one version to another and am now getting this error on the homepage

"Warning: Missing argument 2 for cms_print_page() in /home/authlowc/public_html/lms/cms/cmslib.php on line 142"

It also says "No contenet yet!!"

Funny thing is, turn edit mode on and then I can see the content on the homepage.

Before you ask:

  • Yes I have been to the admin screen to upgrade
  • I downloaded it today. Te old one was about4 weeks old.
  • I can still edit/manage pages inthe admin side.

Any ideas??

In reply to Julian Ridden

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Sorry for my late response to your message! I'm currently in South Africa (Pretoria) and didn't had a change to take a look at my e-mail last night.

Did you make proper changes to your index.php file as discribed in readme.txt?

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Julian Ridden -

Worked a charm. One of these days I will actually read a readme file smile

I had assumed the extra moodle code had not changed and that only your CMS. And you not what they say about assumptions wink

Any chance of adding a preview button at some point. Especially with the HTMLeditor not being true WYSIWYG (ie not showing my header styles), a preview function would help immensly.

In reply to Julian Ridden

Re: CMS integrations: CMS like ... sure!

by Anil Sharma -

I'm using the first version of CMS on our production site www.dpsfaridabad.org

The home page content comes from CMS.  I would also like to add an activity like news forum on the center column of the home page, just below the default CMS page...however the default page from CMS always remains where it is and activities get added only above it, not below.

Any way to change that ?

TIA

In reply to Julian Ridden

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Well preview function has been tightly in my todo list, but I haven't found any time to do it yet. But It'll get there at some point.
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by r robbie -

Janne,

A preview would be a great addition to an already great module!

Also, to get the CMS to show in a courses is there a different set of instructions than on the front page? I can't seem to get the pages to show. It always goes back to the course topics page.

Thanks,

Robbie

In reply to r robbie

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Just downloaded and installed....

why do you get two brackets?

Site Navigation tables have been set up correctly

any ideas..

It also apears in the Add Block as two brackets

Thanks


In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Copy language file into lang/en directory.
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Mark Little -
I have tried this and re-activated the block and I still get the same problem..

any ideas?
In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Found the fix for this... you need to enter an extra line to the cms.php in the Lang directory

$string['Site Navigation'] = 'CMS navigation';

In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Its still now working correctly...

I have created Menus and Pages and set it as Default and also published it...

I have turned on the block and named it, but it does not display any of the menus..

Any ideas why this not working?
In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Michael Winter -

Don't know if this is the problem as I had a similar one. On the actual block click the edit icon (one that looks like a person holding a pen) and you must put a name in the Menu name box. I didn't have this and when I did and did a page refresh all the pages appeared.

Hope this helps.

In reply to Michael Winter

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
I strongly think that "default" menu is needed here, how to add it is a different thing thoughtful thoughtful thoughtful
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Still can't get our CMS to work, nothing shows up on the front page..
In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Did you make necessary changes to you index.php (site level) file?
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Hi,

Silly me found out why it was not working... Had not changed my Site Settings to show CMS content...

Woops

Is there anyway to have Site News and CMS Content?
In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
big grin

You could add "News items" block on your front page...
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Hi,

Thanks for that....

Is there anyway to remove the date from the frontpage?
In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Not without poking the code... But I'll add it to "feature request" list and maybe it'll get into next release...
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Mark Little -
cool thanks...

I did have a look at the coding but i could not find where it was getting the date from then again my PHP is not that good...


In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Christoph Scheb -

Hello,

i read about your CMS extension for moodle.

You have done fine work! The CMS is easy to use and has a good installation file.

I have translated the cms.php file (placed in the lang/de directory) to german (-> de). Perhaps you'll add it to your cms.zip archiv for other german users.

I have one suggestion, is it possible for you to implement a page structure with pages and subpages in a future Version of your CMS?

Thanks for your work

Greetings from germany

In reply to Christoph Scheb

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Thanks Cristoph! cool

I've added your german translation into distribution package.

Could you specify what you mean with "page structure"?
At the moment you can create subpages for every page ( so the level hierarchy is somewhat unlimited, although it's not documented very well (at all to be precise). You just have to choose the parent page first, then select "Add new page".).

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Chardelle Busch -
Picture of Core developers
Mark,

To get rid of the date-- in html/frontpage.php comment out lines 53 and 54 like this:

//             print '<p>&nbsp;</p>' . "\n";
   //             print '<p style="font-size: x-small;">('. $modified .')</p>';
In reply to Chardelle Busch

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Thanks for that...

This addin is very useful and an excellent addition to Moodle...
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Christoph Scheb -

Hello Janne,

thanks for the tip "to choose the parent page and select Add new page".

The problem is solved lächelnd

I think a little Help Icon with a tip like these will be helpful for user.

Eventually you can add these icons in a future Version of cms?

I can translate the new help text files to german if you want.

Christoph

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by sina salehi -
Hi
I installed CMS addon in my unicode enable moodle site.
When I added menu in CMS with farsi (utf-8) name system inform that the menu created but menu was not created and I should create menu with english name and then edit it with farsi language.
In reply to sina salehi

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Well, I'd better do something about that asap. I'll be back...
In reply to sina salehi

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi,

This should be fixed now (among other things I found while cruising through the code). Just download the latest version.

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Ger Tielemans -
If I update a page, the menu of that page becomesthe top-menu (with the latest news.) Nice, but how can I switch this off for a static menu in some cases?
In reply to Ger Tielemans

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
If you mean that when page is updated the sort order of pages changes, then that's fixed in latest version. If this isn't the case then tell me more...
In reply to Janne Mikkonen

OK, new CMS Question

by Ger Tielemans -
After upgrading it is OK, thanks.
Other questionIt is possible to create a menu that only shows up when you did login: now I wonder, is it possible to show a block only to a special group of persons? (for example this block is only for teachers (or participants) of course B?) 
In reply to Ger Tielemans

Re: OK, new CMS Question

by Janne Mikkonen -
Actually that's a very good question Ger approve and your question touching the side of support of "roles" that I've been thinking about.

But the answer is within a course: easier and within the frontpage: harder

But it's on me todo list now approve
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Dean Ang -
Hi,

This forum has a long thread and I really do not have the time to read thru them. I hope I am posting this message in the right place.

Firstly, I am aware there is this AJAX technology which allows a portion of a web page to refresh without doing so for the rest of the page. It would be good if any cms module in moodle can take advantage of such technology.

Secondly, in order for a cms module to work, the navigation, i.e. the menu system, must be sophiscated enough to provide customisation and eyecandies for the reader.

Just my 2 cents worth.

regards.
In reply to Janne Mikkonen

Error: Your not allowed to view content of this page! - Guest Login

by Christoph Scheb -
Hello Janne,

i am happily using your CMS. It works fine. But if a guest is going on my Site he can't see the CMS Navigation Block and the CMS text I have crated on my moodle Homepage.

Instead the text "Your not allowed to view content of this page!". If I login as admin or a normal user (teacher or learner) the CMS text ist showed correctly.

Is there an option where I can activate CMS text?

Thanks a lot

Christoph
In reply to Christoph Scheb

Re: Error: Your not allowed to view content of this page! - Guest Login

by Janne Mikkonen -
You get "Your not allowed to view content of this page!" when you're trying to view a page that is in a menu that requires users to login.

So you should not request login for site frontpage, meaning the menu that contains default page of the site ( at cms manage menus, edit menu and uncheck "require login" checkbox).

- Janne -

edit: Let's add new choice where you can choose to allow or disallow guests to view such pages.
In reply to Janne Mikkonen

CMS not working

by Jirayr V. Arzoumanian -
Hi,

I installed cms addon but it didn't work as expected. I did a fresh insall on Moodle 1.5.3, with latest cms.zip, then did as it's said in readme.txt the result is

  • when Edit mode is on, i see an empty cmsnav block with a text link "admin", the administration of menus works fine.
  • when Edit mode is off no sign of cmsnav block
  • in block setting page, is there a settings link for cmsnavigation?, cuz i don't have one.
  • default page is working fine.
bottom line, i've done everythings as supposed to, yet navblock is not working, what should i do.

BTW, i tried the
print_r($this->config); // <-- this one here
modification, but it didn't give anything, i'm suspectiong that navblock is not working fine.

TIA
JVA
In reply to Jirayr V. Arzoumanian

Re: CMS not working

by Jirayr V. Arzoumanian -
BTW, i stronglly suggest that cms release files are dated. cms-20051109.zip for example. cuz i got confused between cms.zip and cms_rc01.zip
I believe that cms_rc01.zip is the last release, am i right?

First i i used cms.zip, then cms_rc01.zip, now i can see empty navblocks.
In reply to Jirayr V. Arzoumanian

Re: CMS not working

by Janne Mikkonen -
Did you assing any menu to this block?

- Janne -

Attachment sc.jpg
In reply to Janne Mikkonen

Re: CMS not working

by Jirayr V. Arzoumanian -
Yo man, i've assed nothing!!!!wink, but i did add a menu, anyway i've lots of tries and it worked on my local installation, but now i'm trying to do it online, i'm stuck again, the whole nav block is not visible while not in editing mod and in editing mode it's empty.
In reply to Janne Mikkonen

Re: CMS not working

by Jirayr V. Arzoumanian -
I guess i found out what up, on the new online installation, i havn't set the "Front Page Format" to "CMS Content", so the nav block didn't show anything.
The thing is that i don't what the front page to be CMS content, i want the nav links and the cms pages, but not the front page, i want to put the news on the front page. Is there a wayto put the news on the cms Front page?

You can see it here at FSEO.org.

BTW, i'd like to help in the evelopement of this module, are you using any kind of version management system so i can get a dev. version and patch my changes or what?
In reply to Jirayr V. Arzoumanian

Re: CMS not working

by Janne Mikkonen -
Glad you got it working wink

"i don't what the front page to be CMS content, i want..." Moodle 1.6 has this option ( actually both of them are seen), but 1.5 do not have it, so you'll have to hack /blocks/cmsnavigation/block_cmsnavigation.php file.

Just comment out lines:
if ( $CFG->frontpage != FRONTPAGECMS ) {
    return $this->content;
}

to

//if ( $CFG->frontpage != FRONTPAGECMS ) {
//    return $this->content;
//}


At this moment you'll have to use plain "diff" to make patches (also available for windows at gnuwin32.sourceforge.net ).
In reply to Janne Mikkonen

Re: CMS not working

by Janne Mikkonen -
D'oh!

I forgot that you have to change also your index.php file to:

$pid = optional_param('pid', '', PARAM_RAW);
if ( !empty($pid) && $CFG->frontpage != FRONTPAGECMS ) {
    $CFG->frontpage = FRONTPAGECMS;
}


This way you'll actually see the page content when following links.
In reply to Jirayr V. Arzoumanian

Re: CMS not working

by Phuong Pham -
Hi Jirayv and all
I am sorry to bother you. I have the same problem of yours. I down load the lasted verson of moodle, than the lastest cms. I follow exactly the guide of readme.txt. The only step I am wondering is copy lang file to .../lang/en directory.  I am not sure whether I am supposed to copy every file of lang en of  the cms folder to..lang/en of the moodle, the same with fi and de.  When I logged in as admin page for installation of  cms data, then I went to the front page of the moodle. I sar nothing. I could not see the front page of moodle. Everything has gone. I tried some alternatives but I got the same result. Could you please help me or give me any suggestion. my email phuongphamsu@yahoo.com or @gmail.com
Thank a lot
phuong
In reply to Phuong Pham

Please help site setting disappear CMS not working

by Phuong Pham -
Hi Janne Mikkonen and all
My site sitting "http://www.thegioitre.com/admin/site.php" disapperar. I do not see any thing, could you please suggest me how can I fix that. In addtion, I am not able to see the site navigation bar , please give an advice.
Thank you so much,
Regards
Phuong

In reply to Phuong Pham

Re: Please help site setting disappear CMS not working

by Janne Mikkonen -
Restore original files. If you didn't backup your files before you did the changes described in readme.txt, just unpack the moodle installation package again.

- Janne -
In reply to Phuong Pham

Re: CMS not working

by Janne Mikkonen -
The latest cms package is constructed so that you don't have to copy anything after unzipping the package at the moodle installation directory.

- Janne -
In reply to Janne Mikkonen

Re: CMS not working

by Phuong Pham -
Dear Janne Mikkonen
Thank you so much for your help. I am able to figure out how to do it now. thank for your great module
Regards
Phuong
In reply to Janne Mikkonen

Re: Only works as Admin with editting on

by John Watson -
Hi,

All seems to be working when logged in as Admin with editting turned on.
When editting is turned off I'm getting the 'No content yet!!' message.
Also the subpages aren't displayed when clicked on in the menu.

Any ideas?

Thanks and regards,
John
In reply to John Watson

Re: Only works as Admin with editting on

by Janne Mikkonen -
"No content yet!" usually means that there's no default page. There must be one default page on site level.

- Janne -
In reply to Janne Mikkonen

Re: Only works as Admin with editting on

by Ger Tielemans -

I try CMS in course mode (CMS format instead of weeks) under a testversion of 1.6

Everything seems to work with exception of:

  • I can add blocks in edit mode but they become invisible in view mode
  • I can add titles to the blocks
  • I cannot edit menu entries to the blocks

(I took it from a working 1.5.3 version)

In reply to Ger Tielemans

Re: Only works as Admin with editting on

by Ger Tielemans -
I commented out in 1.6 (beta) this block, like you advised earlier in this thread for 1.5.3 and see now the blocks in course view mode of a cms course format...
//if ( $CFG->frontpage != FRONTPAGECMS ) {
//    return $this->content;
//}
In reply to Janne Mikkonen

Re: Only works as Admin with editting on

by Daniel Costa -
Hi Janne, thank's for the good job.

I'm having a similar problem, I can see and edit the menu and if I click on a menu link I see the page, but in the front page I get "No content yet". I had set as default different pages and it says, "default page changed..." but I still get "No content yet" at frontpage. As I would like to have pages before login acess, can you , and anyone who have an idea, help me to solve this?

thank's in advance,

Daniel
In reply to Janne Mikkonen

Re: CMS like ... sure! - no Login possible anymore

by Chris Weikl -
Hi Janne,

thanks for your enthusiam in developing such a cms-tool.

Having done the installation procedure als indicated in your readme.txt on a 1.5.x (editing files and copying the directories) system I have to face the problem of not being able to login into moodle as admin or any other user. As I try to login I do not see any error messages or something like that.

I googled a bit to find some hints to solve the problem. I made use of those hints indicating to reset admin password and to check the MySQL table entries. All the entries are as suggested but I still cannot login.

Do you have any idea why this happened ? Are there any files which "block" the login procedure ?!

Thanks in advance for any quick hints.

Chris
In reply to Chris Weikl

Re: CMS like ... sure! - no Login possible anymore

by Chris Weikl -
Now I managed to login, which seemed to be a browser problem.
Having installed the mysql tables via directory http://domain.tld/cms/ I receive the following error messages:

Warning: file(/home/www/web345/html/moodle/blocks/loancalc/block_loancalc.php): failed to open stream: No such file or directory in /home/www/web345/html/moodle/lib/blocklib.php on line 21

Warning: file(/home/www/web345/html/moodle/blocks/shared_files/block_shared_files.php): failed to open stream: No such file or directory in /home/www/web345/html/moodle/lib/blocklib.php on line 21

Any idea ?

Chris
In reply to Chris Weikl

Re: CMS like ... sure! - no Login possible anymore

by Janne Mikkonen -
Those errors indicate that loancalc/block_loancalc.php and shared_files/block_shared_files.php files are no longer present but can be found in your database.

Solution 1. Copy blocks loancalc and shared_files again into blocks directory.
Solustion 2. Goto your admin >> blocks and delete loancalc and shared_files from your database.

- Janne -
In reply to Janne Mikkonen

Re: CMS like ... sure! - no Login possible anymore

by Thao Van -

Hi Janne Mikkonen

Please hepl me! I have some problems when installation cms:

http://localhost/moodle/cms/

I receive the following error messages:

Error: Database connection failed.

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php


In reply to Thao Van

Re: CMS like ... sure! - no Login possible anymore

by Janne Mikkonen -
Hi Thao

Since the CMS addon doesn't initialize anykind of database connection ( this is done by Moodle it self ), you really should check that your database is running properly.

What database you use ( mysql or postgresql )?

- Janne -
In reply to Janne Mikkonen

Re: CMS like ... sure! - no Login possible anymore

by Thao Van -
It's good when I restart Moodle. Thank you for your regards!
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Julian Ridden -
Just grabbed the latest version and installed it in 1.6v5

The following error is now appearing above the cms content (yes the content still displays)

Second parameter of cms_print_page has changed from integer to object!
To get rid of this message make appropriate changes to your index.php file!


What is it I am meant to change in the index.php?
In reply to Julian Ridden

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Julian,

in your index.php file change cms_print_page function's second parameter $SITE->id to $SITE ( there are two lines ). This change came along with section support within cms pages ( the whole object is needed for that ).

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Julian Ridden -
That did the trick, many thanks. smile
In reply to Julian Ridden

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Hi,

I have just upload the new version into our site we are running v1.54...

I get this message -

Second parameter of cms_print_page has changed from integer to object!
To get rid of this message make appropriate changes to your index.php file!

What do i Change?
In reply to Mark Little

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
To your /index.php file change second parameter ( $SITE->id to $SITE, there are two lines where this change must be added). The index.php file is moodle's index.php file.

- Janne -

Like described above ( Julian's question ) wink
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Mark Little -
Hi,

Sorry I don't understand... I have this at the moment

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

Sorry...

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Michael Penney -
Hi Janne, I'm trying to run this theme modification:

http://moodle.org/mod/forum/discuss.php?d=31835#148702

To show blocks on mod pages. It works great for Admin block and Main Menu, but the CMS block just shows up empty, and I can't add items to it.

Without the theme hack, CMS is functioning normally, any idea why theme code would break the CMS Navigation block but not the others?

Code:

HEADER.HTML (at the Begin of the file)

//Must include the libs of blokcs  

require_once($CFG->dirroot .'/lib/blocklib.php'); 

HEADER.HTML (at the end of the file)

<?php

$CFG->showblock=0;
$inme=me();

//this is the list of files or directories where i want to sho my Blocks

//if you put a directory all the files inside it will show the blocks

$fblocks = array("/calendar/","/mod/","grades.php");

//Here I use a flag to know if I'm in a page or directory of the list

foreach ($fblocks as $fblock){
    if(ereg($fblock, me())){
        $CFG->showblock=1;
    }
}

if($CFG->showblock==1){

//Now I create a table for the main part of the page with two colums, one for the Block

//and other for the really content of the mod

  echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" width=\"100%\">";

  echo "<tr><td width=\"120\" valign=\"top\">";

//This is the first colum

//I Include my left Blocks

    $PAGE       = page_create_object(PAGE_COURSE_VIEW, SITEID);
    $pageblocks = blocks_setup($PAGE);
   
    if (blocks_have_content($pageblocks, BLOCK_POS_LEFT) || $editing) {
        blocks_print_group($PAGE, $pageblocks, BLOCK_POS_LEFT);
    }

//This is the second colum for the content of the mod
echo "</td><td valign=\"top\">";   

}

?>   
<!-- END OF HEADER -->

FOOTER.HTML (at the begin of the file)

<!-- START OF FOOTER -->
<?php

//If I put the Block in this page now I must close the table

if($CFG->showblock==1){
    echo "
</td></tr></table>";
}
$CFG->showblock=0;
?>


In reply to Michael Penney

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Most likely it's because of this ( in block_cmsnavigation.php line: 133 can't be sure):

if ( $CFG->frontpage != FRONTPAGECMS && $SITE->id == $courseid ) {
    return $this->content;
}

But really it doesn't do any good if you'd get it showing something 'cause it most likely won't work anyway from other pages ( without hacking it).

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Anil Sharma -

Janne

I just installed a fresh copy of Moodle 1.6 and downloaded the CMS block from the contrib CVS.

It got installed fine, and the default page i set shows up, but when i click on any other page link, the default page only shows up. 

I've made all changes as per the readme file, and even tried commenting out

if ( $CFG->frontpage != FRONTPAGECMS && $SITE->id == $courseid ) {
            return $this->content;
         }

lines in the block_cmsnavigation.php.  I changed the index.php file from $site->id to $site -  no effect.   It doesnt work either on the SITE page or inside the courses

The site under cosntruction is www.selflrn.com . Would appreciate any ideas.  

TIA

Anil

 

 

In reply to Anil Sharma

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Double check that you have line:
$pid = optional_param('pid', '', PARAM_RAW);
in your index.php file.

If that doesn't help, turn on debug mode ( administration >> configuration >> variables in section miscellaneous) and check if you get any sql statement errors.

- Janne -

please, start a new thread this is getting really long.
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Charlene Barina -
When I add in this block, I can add menus and subpages just fine, but when I turn it on in Configuration->Site settings (as first, second, etc.) I get the following errors:


Notice: Undefined property: frontpageloggedin in /home/bonlth/public_html/moodle/admin/site.php on line 40

Warning: array_flip() [function.array-flip]: The argument should be an array in /home/bonlth/public_html/moodle/admin/site.php on line 40

Warning: array_flip() [function.array-flip]: The argument should be an array in /home/bonlth/public_html/moodle/admin/site.php on line 42

Warning: asort() expects parameter 1 to be array, boolean given in /home/bonlth/public_html/moodle/admin/site.php on line 43

Warning: array_flip() [function.array-flip]: The argument should be an array in /home/bonlth/public_html/moodle/admin/site.php on line 44

Warning: implode() [function.implode]: Bad arguments. in /home/bonlth/public_html/moodle/admin/site.php on line 44


Any idea what I'm doing wrong?  When I click on links (as the block does show up), I don't see any content I've made.
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Wayne Campbell -

Janne,

Is this compatable with version 1.6.2?  I don't see a index file available for this version so was wondering what would happen if I used the 1.6.1 index?

Also, just so that I understand everything OK.  I can insert or embed an existing web site in Moodle using this plugin, right?

Thanks,

Wayne Campbell

In reply to Wayne Campbell

Re: CMS integrations: CMS like ... sure!

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Just wanted to second this question and say that I have installed the CMS Plugin into my version of 1.6.3 (successfully I think but I'm not sure with my limited skill).  I can access the CMS admin page, make menus, pages, and add a CMS Navigation block but.....after creating a menu, adding a page, and making it the default, I cannot access that page by clicking on the link that appears in the CMS navigation block.  When I click on the block the page refreshes to my front Moodle page and the contents of the page I made with the CMS Plugin do not appear.  I used the latest version of the index.php, lib.php, and site.html files but maybe they have not been updated for 1.6.3??

Thanks in advance for any help you can provide.  I'm excited to use this plugin and amazed that I was able to get it installed without breaking something smile

Jason
In reply to Jason Hollowell

Απάντηση: Re: CMS like ... sure!

by aggelos panagiotakis -
that's true I also used the latest version (1.6.3+) witch fixes an issue i have of the index.php, lib.php, and site.html files but they have not been updated for 1.6.3+
i am trying to do something about it i will let you know.
In reply to aggelos panagiotakis

odd "error": title missing

by daniel ginerman -
Shalom 2U there!
I like very much the descriptions I read about this module, that can fill a lot of needs.
I just installed it (files 1.6.1) on my new 1.6.2+ installation at galeinai.net.
I opened a CMS menu in one course without problems. then, I passed to create a page related to that menu. everything looks right, but when I submit I receive all the time the same odd error "title missing", and the page to edit again. and have no field named "title" (btw, I don't know what to input in the "parent..." field).
Therefore, I can't make any page there.

any good idea?
thanx in advance,

daniEl
In reply to daniel ginerman

SOME MORE INFO Re: odd "error": title missing

by daniel ginerman -
strangely, while in firefox this error is permanent, in IE it happens just "sometimes" (and then, a second trial usually works).
nevertheless, I realized that the "missing title" is also an issue by itself. I look at the pages I created and I see that really a title is missing.

so, I have 2 problems now:

1. how I bypass the "missing title" error I receive permanently in firefox while adding a new page?
2. how I can get the ability of giving some title visible upon the body of every page?

thanx again,

daniEl
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Simon Rowney -
Has anyone succesfully used this module in 1.7 yet ?

Simon
In reply to Simon Rowney

Re: CMS integrations: CMS like ... sure!

by lasse utti -
Yep.

I do ... with small modification.

..lasse..
In reply to lasse utti

Re: CMS integrations: CMS like ... sure!

by Evan ODonnell -
I'm trying to set this up for 1.7.1 as well and running into some trouble.  What tweaks do you have to make to get it to work?
In reply to lasse utti

Re: CMS integrations: CMS like ... sure!

by Verdon Vaillancourt -
Hi lasse,

Could you please share that with us? I got it set up (I think) but am unable to save a menu, just getting a pretty generic error sad

salut,
verdon
In reply to Verdon Vaillancourt

Vast: Re: CMS like ... sure!

by lasse utti -
Cheers ...

You can read my solution from: http://moodle.org/mod/forum/discuss.php?d=62456

First read ALL what Janne is written in cms-installation text. Then you have the knowledge and then you see "what" and "where" you must do my modifications.

I've upgradet Moodle to 1.7.1+ and I can say, that solution works in that version.


...Lasse...


In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Phil Waud -
Hi Janne

Well after discovering Moodle, your module was an absolute gift! I even uninstalled 1.7 and went back to 1.5 so I wouldnt have to do loads of poking around in the PHp code.

Can I just ask, is it possible to set sections so that only a particular user can modify it? I run a school site with about 1000 pages on, most of which I update myself with a couple of very trusted friends doing the rest. I no how easy it is for them to make a small change that wrecks the whole site. Allowing each submenu item to have an "author" would prevent any such calamities.

Another quick question - are you planning on a version for 1.7 and how long will it be? smile

Thanks again

Phil Waud
In reply to Phil Waud

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Phil,

First question - no as far as I know!?!

Second question - you're not the only one who has asked me that wink, and honestly I don't know the answer. I really don't know sad

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Phil Waud -

Janne

Do you think you could add a "creator" edit only feature? You would need an extra column in the database, and check that the person logged in is allowed to edit the page. I could probably tweak the code myself, but it would then be incompatible with any future upgrades.

I know the pressure your under re. a new version, I just hope you get the time to do it soon!

Thanks

Phil

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Bob Eadie -

Hi Janne,

We (here at Bedford School in UK) have been looking at your CMS module with interest, and think it is just what we need to integrate our present intranet with Moodle . . . but we don't have the expertise (nor the nerve!) to do all the necessary tweaks to get it working with the latest version (we need to upgrade to 1.8 for other reasons).

So we just HOPE that you might find time to develop it for V1.8 . . pleeeeease?

thanks,

Bob

In reply to Bob Eadie

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Bob,

I can't make any solid promises at this point, sorry sad. But I do know that my summer holiday starts at July and I might have some extra time on my hands...

- Janne -
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Dirk Koudstaal -
Hi Janne,

We are in the same situation at Hobart College (Australia, Tasmania http://www.hobart.tased.edu.au) as Bob. I don't have the courage to play with the coding but we would love to integrate our moodle site with our intranet a bit better and your module seems to be the answer. We would be grateful if you can see your way clear to make it less daunting for the uninitiated.
In reply to Dirk Koudstaal

Re: CMS integrations: CMS like ... sure!

by Janne Mikkonen -
Hi Dirk

My summer vacation is just one week a way and this is on my todo list, indeed. And I'm going to make it much more easier to install and maintain.

- Janne -
In reply to Janne Mikkonen

Netpublish

by Sergio Alfaro -

Hello, Janne

I need your help when clic on Publish outside say :

Parse error: syntax error, unexpected ';' in /usr/home/site.com/htdocs/mod/netpublish/outpublish.php on line 37

and exist installed outpublish on root,

any idea ????

Thanks

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Daniele Cordella -
Picture of Core developers Picture of Plugin developers
Janne
as a Moodle developer you can access the document in
Ticket ID: YGI-989017
of Moodle.com Helpdesk
in order to read it during your summer vacation. wink
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Richard Williamson -

Hi Janne,

I just wondered how things were going with the improvements to the CMS module. Like other posters, I think that this would be just the thing for integrating our internet and intranet sites. Also, like other posters, I'm not keen on the manual hacking in case I mess something up.

Considering how useful this is, is it being considered as a standard module for 2.0?

Keep up the good work smile
RW

In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Philippe Verdenal -
Good afternoon Janne,
I am looking forward to the next CMS release.
Many thanks for your active moodle community's support.
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Shane Holness -
Hi

I have been looking at thi CMS module with a lot of interest and (for a dummy) managed to install and seem to have operational. I have two points of clarification though:

I seem to be getting an error message above the CMS Block which reads: "Notice: Undefined variable: COURSE in /htdocs/moodle15/blocks/cmsnavigation/block_cmsnavigation.php on line 239"

and..

I cant seem to work how how to display the menu ?

Can anyone assist please:
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by Valery Fremaux -

Hi Janne,

we are actually making a review of CMS side app to check security concerns in our world wide integration (worked with Catalyst).

In my urgent needs I need finish the complete translation for the French Pilot we have to launch in December 2008.

We are disposed to help in code and have some action on it during a while, unless you have some little time to share with us on this enchancements.

First aspect is improving internal navigation, so it becomes easier to switch between the two major editing aspects (menus, and pages). Also fixing the return point when finishing editing, which do not returns always return to edited page.

More deeper, I would like to lower the footprint of the CMS installation on core. One example of this is the capability naming, that were set in the "moodle/cms" scope. Moodle scope should not be used for non core components. Although it works fine, as the correspondancy of capability name and capability code is sufficiant, the localization of the capability names fails because of the get_capability_string() implementation. There is no direct provision for a "cms" subcomponent in core, and this routes the subsequent get_string() call to the 'moodle.php' string file in core, that should be not. In order to properly route capability strings to an "in-module" lang string, wich is much more convenient for install and modularity, capability names could be assigned to the 'blocks/cmsnavigation:' domain. It is consistant as cmsnavigation is the "entry point" of the CMS side app (I call it "side app" because the block is an artefact to access this feature, that runs quasi autonomously from the core Moodle features). The effet of this is that we would have capability names strings to be set in blocks/cmsnavigation/lang/... which is more accessible and has no core footprint.

An alternative would be using a "mod/cms:" scope, but seems routing to a "fake" moodle mod. Call for strings would be routed to a "cms.php" that in that case, can only be the /lang/... (or alternative moodledata/lang/...) locations, as there is no real module entry for this.

Thanks for letting me know about how to handle all those small requirements, if any possibility.

Cheers.  

In reply to Valery Fremaux

Re: CMS integrations: CMS like ... sure!

by Dan Marsden -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Well, it's a Course format, so IMO the upgrade/access stuff should be stored in course/format/cms

and the capabilities should be named using
'format/cms'

(I'm working on this today and should have a patch later this week that cleans it up a bit)

Dan
In reply to Dan Marsden

Re: CMS integrations: CMS like ... sure!

by Oluwatosin Akanle -
Hello,
I installed moodle about a week ago on my online server, and since then I have been playing around with it trying to get it running for my training outfit. However, I installed the cms plugin, and since I did so, I get a blank page when I click on add/edit courses.
Please what do I do?
In reply to Janne Mikkonen

Re: CMS integrations: CMS like ... sure!

by António Vilela -
Picture of Plugin developers Picture of Translators

After installing this very usefull module on a brand new Moodle 1.9.5 I got a blank page on the home page. This happens because Moodle main index.php has changed and the CMS patched index.php has not.

I compared the two files and changed 3-4 lines in the CMS patched index.php to reflect the changes in the original index.php and now it is working. 

If someone gets the same error try the attached index.php to see if it helps.

Cheers

In reply to António Vilela

Trả lời: Re: CMS like ... sure!

by dung quach -

Hi, I have the same problem, I've tried your index.php but it still not work, could you give me some advice? what line need to be change?

Thks!