Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Move components page to pages section
#1
Hi =)

I was already able to
- add the components link to the sidebar of the pages section
- show the pages sidebar on the components page instead of the theme sidebar

But I can't figure out, how to associated the components page with the pages section in terms of tab navigation (it still highlights "theme" here) and, more importantly, permissions. Huh

I need this to work, because some users are not allowed to use the themes section, but should be able to edit components.

Help would really be appreciated! Wink

Best,
Kida
Reply
#2
I think there is a plugin which I think is called Slogans. iirc it allows users to edit text strings like components but keeps them out of the Theme Tab.
Reply
#3
Thank you Smile
But unfortunately that's not enough in my case. Slogan seems to be for single phrases only, not for whole paragraphs, let alone html-content. Sad
Reply
#4
Figured it out!!
I was just looking for an answer in the admin-folder before... but of course, the permission check it's located in the plugin user-management! Big Grin

PHP Code:
//components.php permissions
if ($current_file == "components.php") {
  if (
$this->mmUserFile('PAGES') == "no") {
      die(
'You Do Not Have Permissions To Access This Page');
  }
        else {

           }


Now I only have to figure out, how to show highlight the pages tab... but that's not that important! Smile

Best,
Kida
Reply
#5
DONE! =)

For everyone interested... this is what you have to do, if you want to add "components" to pages instead of theme:

1. install this PlugIn
to add a components link to pages:
http://www.cyberiada.org/cnb/log/add-lin...le-plugin/

2. edit admin/components.php
search for <? php include('template/sidebar-theme.php'); ?>
and replace it with <? php include('template/sidebar-pages.php'); ?>

3. edit admin/templates/css.php
search for #components .wrapper .nav li a.theme,
and replace it with #components .wrapper .nav li a.pages,

4. update cache file stylesheet.txt
open admin/templates/style.php and comment the lines:
PHP Code:
if (file_exists($cachefile) && time() - 600 filemtime($cachefile) && $cacheme) {
    echo 
file_get_contents($cachefile);
    echo 
"/* Cached copy, generated ".date('H:i'filemtime($cachefile))." '".$cachefile."' */\n";
    exit;

then load the components page in backend. Now "pages" shoud be highlighted instead of "theme". A new stylesheet.txt is written.
If that is working, uncomment the lines above.

5. plugins/user-managment.php
only necessary if you use the plug-in "user-management" and want to deny some users access to the theme section
search for
PHP Code:
// components.php permissions
if ($current_file == "components.php") {
    if (
$this->mmUserFile 'THEME' ) == "no") {
        die ( 
'You Do Not Have Permissions To Access This Page' );
    } else {
    }

and replace THEME with PAGES
Reply




Users browsing this thread: 1 Guest(s)