News Modul

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
stopsatgreen
Power Poster
Power Poster
Posts: 322
Joined: Sat Feb 04, 2006 1:24 am

Re: News Modul

Post by stopsatgreen »

The problem with this solution is that when I add that line to the file then reinstall the module, it overwrites my existing stories. Then when I restore the existing stories with MySQL Dump, the permission disappears again!

Is there any way to add that permission without reinstalling the module?
JohKa

Re: News Modul

Post by JohKa »

Hi,

yes it's possible to add these permissions with an upgrade but I don't know how to do that.
You have to ask calguy1000. He knows how to do that.
But I know that in a few days an upgrade for the news module should be published.
So if you have time to wait a solution will be bublished.

So long.
cyberman

Re: News Modul

Post by cyberman »

JohKa wrote: yes it's possible to add these permissions with an upgrade
Open file news.module.php with your favourite editor and go to line 43. You will found

Code: Select all

	function GetVersion()
	{
		return '2.2';
	}
Change it to

Code: Select all

	function GetVersion()
	{
		return '2.2.0.1';
	}
Then open file method.upgrade.php and go to line 99. Add after there

Code: Select all

	case '2.2':
		$this->CreatePermission('Approve News', 'Approve News For Frontend Display');
		$current_version = '2.2.0.1';
stopsatgreen
Power Poster
Power Poster
Posts: 322
Joined: Sat Feb 04, 2006 1:24 am

Re: News Modul

Post by stopsatgreen »

No, can't get this to work.

I uninstalled the News module, changed the pages you showed and reinstalled; the permission appeared, but all my News stories were gone. Then I restored my database backup and the permission went again. The backup must be over-writing the permission. Can I install the permission manually, in PHPMyAdmin?
Last edited by stopsatgreen on Thu Jun 21, 2007 11:27 am, edited 1 time in total.
JohKa

Re: News Modul

Post by JohKa »

Don't uninstall the news module.
Only change the files and upload them.
That is all what you've to do.

You needn't to reinstall the module.
cyberman

Re: News Modul

Post by cyberman »

Yes, you had only to go to extension > modules (after changes I suggest). There you will see that News module needs an update - do it and you will be happy
stopsatgreen
Power Poster
Power Poster
Posts: 322
Joined: Sat Feb 04, 2006 1:24 am

Re: News Modul

Post by stopsatgreen »

OK, got it now; that worked, thanks. Should that cause any problems with future upgrades?
cyberman

Re: News Modul

Post by cyberman »

As calguy said this solution will be inside next release.

If so there will be not problems cause I've choosed a very small version update number :) ...
cyberman

Re: News Modul

Post by cyberman »

Lexus wrote: I changed the 2 files like told in this topic,
To the first you have to go to extensions > module in admin panel. There you will found on news modules line an info message for upgrading - do it.

After that you can go to users & groups > group permission in admin panel. Choose the group for news posters. In the following you will see the permission like suggested and you have only to mark (and save) it ;).
Locked

Return to “CMSMS Core”