Page 3 of 3

Re: News Modul

Posted: Thu Jun 21, 2007 9:44 am
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?

Re: News Modul

Posted: Thu Jun 21, 2007 9:54 am
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.

Re: News Modul

Posted: Thu Jun 21, 2007 10:13 am
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';

Re: News Modul

Posted: Thu Jun 21, 2007 11:14 am
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?

Re: News Modul

Posted: Thu Jun 21, 2007 11:34 am
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.

Re: News Modul

Posted: Thu Jun 21, 2007 11:42 am
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

Re: News Modul

Posted: Thu Jun 21, 2007 11:50 am
by stopsatgreen
OK, got it now; that worked, thanks. Should that cause any problems with future upgrades?

Re: News Modul

Posted: Thu Jun 21, 2007 11:54 am
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 :) ...

Re: News Modul

Posted: Sat Jun 23, 2007 3:11 pm
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 ;).