Welcome to Geeklog, Anonymous Monday, December 30 2024 @ 11:14 am EST

Geeklog Forums

Multiple Staticpage Centerblocks?


Status: offline

EKwant

Forum User
Junior
Registered: 09/29/02
Posts: 19
Hi all,

I'm wanting to create two individual static pages and set them as center blocks on the entire page. One would be set to be shown to anonymous visitors, while the other would be shown to registered users when they log on.

The way my installation is working, it looks like I can only set ONE static page as a center block at a time. If I check off the other page as a centerblock, the centerblock setting for the previous page gets un-set.

Has anyone else tried or wanted to do this? Any suggestions?

-EKwant
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You could try commenting out this piece of code in admin/plugins/staticpages/index.php:
Text Formatted Code
    // make sure there's only one "entire page" static page per topic
    if (($sp_centerblock == 1) && ($sp_where == 0)) {
        DB_query ("UPDATE {$_TABLES['staticpage']} SET sp_centerblock = 0 WHERE sp_centerblock = 1 AND sp_where = 0 AND sp_tid = '$sp_tid'");
    }
 

bye, Dirk
 Quote

Status: offline

EKwant

Forum User
Junior
Registered: 09/29/02
Posts: 19
Dirk,

Thanks for that! Now there's only one problem. The owner of the staticpages is forced READ permissions on all pages.

With 2 centerblock pages, this causes a "doubling" effect of the website when logged in as the admin (or owner of both centerblock pages).

Is there some way to force owner READ permissions off if you unset it while editing the staticpage? When I save the page, the READ permissions get turned back on for the owner after I have un-checked them.

Thanks for your help.
-EKwant
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Well, you can change the settings such that it isn't visible even for the owner of the page. However, as soon as someone is in the Root group (e.g. the default admin account), they will always see the page, as Root permissions override everything else.

I don't have a solution for that. You would need a function that checks for all the usual permissions but does explicitly not check for Root permissions. Cloning one of the functions in lib-security.php and removing the check for Root permissions, then using a call to that function in the static pages plugin should do the trick (just thinking out loud ...).

bye, Dirk
 Quote

All times are EST. The time is now 11:14 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content