The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
New found pages as private pages - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: New found pages as private pages (/showthread.php?tid=741)

Pages: 1 2


New found pages as private pages - c.l.f.wittmann@gmail.com - 09-13-2017

When adding new pages they are public by default. Is it possible to make them private by default?




New found pages as private pages - Brandin - 09-13-2017

Run this query

ALTER TABLE
Code:
pages
CHANGE
Code:
private
Code:
private
INT(11) NOT NULL DEFAULT '1';


New found pages as private pages - c.l.f.wittmann@gmail.com - 09-13-2017

That solved it. Thank you!


New found pages as private pages - Brandin - 09-15-2017

@Mudmin - I'd like to deploy this as an option on admin_pages.php - thoughts?


New found pages as private pages - mudmin - 09-15-2017

Yeah. We had that before. I think that's the way to go. My thought is to put it in the securePage function so the first time ANYONE notices the page, it becomes private...this way you never have to even visit the admin_pages thing to fire off that query.


New found pages as private pages - Brandin - 09-15-2017

So offer an option, from the settings table, and whatever the value is in this settings table is the value we use in the securePage function? (1 = private, 0 = public - we can copy this for the setting)


New found pages as private pages - mudmin - 09-15-2017

Yeah. That's a great idea. And then it will be a both/and thing, where that will fire off whether it is hit from the securePage function or the admin_pages.


New found pages as private pages - Brandin - 09-15-2017

I will deploy this when we get Status 15 pushed.


New found pages as private pages - mudmin - 09-15-2017

OK! I remember the discussion on this...

The annoyance is there on purpose. I think it makes a ton of sense to just mark a page private by default (although I would be down with the option in the admin panel).

But, I took the private page when securePage hit the page the first time, because I kept forgetting to go into the admin panel and set permissions on pages because they were all admin only by default.

I probably didn't explain that properly. There isn't a technical reason why someone needs to go into admin_pages to add a page. The reason that message is there is to force the developer to think through permissions a page at a time when they create them. Although, it definitely happens where I add a permission level so I forget to click the private button.

I went ahead and made it 1 by default and then you can feel free to add it as an option to the admin panel. I'll push soon.


New found pages as private pages - Brandin - 09-15-2017

1 by default is fine with me - because truly who wants a page they're developing public by default??

However - you run into issues of when you are pushing new pages during maintenance. I think a developer option for this should be put into place - just for this reason: we try to give US developers as many options as possible, with as little confusion, so if the option is there, they don't have run the query themselves, or change the DB themselves type stuff.