Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

enable / disable page from script suggestion

Quote Reply
enable / disable page from script suggestion
Hi,

I didnĀ“t find a way how to do disable / enable the page quickly, so I started using that:

Code:
#disable
$command= `sed "s/'disabled' => '0',/'disabled' => '1',/g" /path/to/admin/Links/Config/Data.pm > /path/to/admin/Links/Config/tmp`;
$command= `mv /path/to/admin/Links/Config/tmp /path/to/admin/Links/Config/Data.pm`;
#enable
$command= `sed "s/'disabled' => '1',/'disabled' => '0',/g" /path/to/admin/Links/Config/Data.pm > /path/to/admin/Links/Config/tmp`;
$command= `mv /path/to/admin/Links/Config/tmp /path/to/admin/Links/Config/Data.pm`;

It would be probably easier to approach this with a code snippet from the Links System itself, but this was quick and dirty and maybe useful for somebody.

Regards

N || I || K || O
Subject Author Views Date
Thread enable / disable page from script suggestion el noe 3421 May 6, 2010, 3:45 PM
Thread Re: [el noe] enable / disable page from script suggestion
Andy 3316 May 6, 2010, 11:59 PM
Thread Re: [Andy] enable / disable page from script suggestion
el noe 3327 May 7, 2010, 12:26 AM
Post Re: [el noe] enable / disable page from script suggestion
Andy 3305 May 7, 2010, 12:49 AM