Page 2 of 2

Re: how do you disable the site from being seen to work behi

Posted: Wed 4. Jul 2007, 17:15
by parkley
let me try to better explain the situation... there's actually two thoughts going on in this post... which are addressing both issues i'm having... before i get to the "Down for maintence/work-behind part"


I'm trying to understand the part of turning off articles where only the admin can see...

Well, when i log in, i turn off public/visible for the articles

but when i hit preview it doesn't show the article... just like if you were to visit the site as a guest...

but if i change the article to public and hit preview... then i see the article !!!

I was thinking, i could preview the article regardless if i was admin or logged in user with backend access... if that make sense.... **8looking for the frustrated GRRRRRR icon*** LOL!

Posted: Wed 4. Jul 2007, 21:50
by DeXXus
Ahhhh...NOPE
Preview means show me how the content will look WITH THE CURRENT SETTINGS (including visble/public, hidden articles and article start dates, ETC).
In other words...WHAT ARE MY VISITORS GONNA SEE.

Posted: Wed 4. Jul 2007, 21:53
by parkley
DeXXus wrote:Ahhhh...NOPE
Preview means show me how the content will look WITH THE CURRENT SETTINGS (including visble/public, hidden articles and article start dates, ETC).
In other words...WHAT ARE MY VISITORS GONNA SEE.
"ohhhhhhhhhhhhhhhh i see" ding ding there goes the bells... now i follow....lol **slaps forehead**

is there anyway to preview the newly added/updated content without the public being able to see it?

and what's the difference between public & visible??? if either one of these icons are deactivated/red then i can't see the content.. why not just have one "V"

because the only way i can see content period is for both of them is to be green... and i'm thinking admin should be able to see content in the layout regardless..

Posted: Thu 5. Jul 2007, 08:11
by pico
Hi

as long as you're logged in in Backend, you will see all Articles, it doesn't matter what State a Article has public/not Public

To see what a Visitor see, you have to log out or open another Browser

Posted: Thu 5. Jul 2007, 20:03
by parkley
ok i think i understand the flow now... thx guys for all of your help

Re: Down for Maintenance

Posted: Sat 7. Jul 2007, 23:49
by parkley
Goran wrote:Here's a temporary solution, works fine on my test installation...now you can turn off the phpWCMS frontend for non admin users in conf.inc.php, just set $phpwcms['down_for_maintenance'] to 1.
-----------------------------------------------------------

1. Create html file closed.html in phpWCMS root directory
2. Open config/phpwcms/conf.inc.php and enable sessions in frontend:

Code: Select all

$phpwcms['SESSION_FEinit']    = 1; 
3. Same file(config.inc.php), add this code under // other stuff group:

Code: Select all

$phpwcms['down_for_maintenance']    = 1; // set 1 to disable frontend for non admin users
4. Open index.php and find this line: require_once (PHPWCMS_ROOT.'/config/phpwcms/conf.template_default.inc.php');
and add the following code before/above:

Code: Select all

if($phpwcms["down_for_maintenance"] && empty($_SESSION["wcs_user_admin"])) {
	headerRedirect($phpwcms['site'].$phpwcms["root"].'closed.html');
}
this worked perfectly for shutting down the site for maintenance!!! :D :D :D