The following warnings occurred:
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
contents only visible to admin - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: contents only visible to admin (/showthread.php?tid=5312)



contents only visible to admin - olmy - 2013-10-26

Hi, this is my first post here.
How can I make certain page contents visible to the admin only?
Thanks!


RE: contents only visible to admin - shawn_a - 2013-10-26

Page options, page visibility, Private

Does anyone even read the wiki ?


RE: contents only visible to admin - olmy - 2013-10-26

damn - I guess I should never post before coffee
Thanks!


RE: contents only visible to admin - shawn_a - 2013-10-26

lol, i just looked and its here
http://get-simple.info/wiki/how_to:page_editing
although the images and some info is way outdated.


RE: contents only visible to admin - datiswous - 2013-10-27

(2013-10-26, 23:20:06)shawn_a Wrote: lol, i just looked and its here
http://get-simple.info/wiki/how_to:page_editing
although the images and some info is way outdated.

I made some changes.


RE: contents only visible to admin - wdburgdorf - 2015-09-14

Hi,


I did actually read the wiki, but either there is a piece of information missing, or something does not work right on my site:


Choosing "private", the page gives a 404 when not logged in - fine. But the menu item remains visible. Should it not disappear? I can switch it off, of course, but then the page could not be found anymore at all ...


Thanks!


RE: contents only visible to admin - xxdex - 2015-09-15

(2015-09-14, 05:58:06)wdburgdorf Wrote: Hi,


I did actually read the wiki, but either there is a piece of information missing, or something does not work right on my site:


Choosing "private", the page gives a 404 when not logged in - fine. But the menu item remains visible. Should it not disappear? I can switch it off, of course, but then the page could not be found anymore at all ...


Thanks!

try to get content when you are login into admin area:

PHP Code:
if (isset($_COOKIE['GS_ADMIN_USERNAME'] == 'admin')){
//do something / echo something // 

or try change the navigation (you must have instaled a i18n navigation)

PHP Code:
<?php get_i18n_navigation(return_page_slug(),0,1,I18N_FILTER_MENU I18N_FILTER_LANGUAGE); ?>



RE: contents only visible to admin - shawn_a - 2015-09-15

This is expected, it has always been this way.
You can make your own navigation function and use that instead...

just copy get_navigation
and a private and logged in check, perhaps you also want a author is user check, we don't know what you want therefore we do not filter them.

PHP Code:
            if ($page['menuStatus'] == 'Y') {
                if(!
is_logged_in() && (string)$page['private'] == 'Y') continue;