Log in | Register | Lost password

Bottom
permissions for xinha
  • Posted: 30.08.2005, 18:03
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    if you want to change your htmlarea or xinha, depending on permissions you can
    replace in pnuser.php:

    Code

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/editorsetup.js';


    with

    Code

    //////////////////////////



    if (pnSecAuthAction(0, 'pagesetter::', "$tid::", ACCESS_ADMIN) and file_exists('modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/admin/editorsetup.js'))

    {

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/admin/editorsetup.js';

    }

    else if (pnSecAuthAction(0, 'pagesetter::', "$tid::", ACCESS_DELETE) and file_exists('modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/delete/editorsetup.js'))

    {

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/delete/editorsetup.js';

    }

    else if (pnSecAuthAction(0, 'pagesetter::', "$tid::", ACCESS_ADD) and file_exists('modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/add/editorsetup.js'))

    {

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/add/editorsetup.js';

    }

    else if (pnSecAuthAction(0, 'pagesetter::', "$tid::", ACCESS_EDIT) and file_exists('modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/edit/editorsetup.js'))

    {

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/edit/editorsetup.js';

    }

    else if (pnSecAuthAction(0, 'pagesetter::', "$tid::", ACCESS_MODERATE) and file_exists('modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/moderate/editorsetup.js'))

    {

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/moderate/editorsetup.js';

    }

    else if (pnSecAuthAction(0, 'pagesetter::', "$tid::", ACCESS_COMMENT) and file_exists('modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/comment/editorsetup.js'))

    {

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/comment/editorsetup.js';

    }

    else

    {

    $extraJavaScriptFilename = 'modules/pagesetter/publications/' . $pubInfo['publication']['formname'] . '/editorsetup.js';

    }



    /////////////////////////////////////////////


    then, if you want, you can create subfolders to your publications/NAME_OF_YOUR_PUBTYPE folder(s)
    name this folder (or these folders)
    admin,delete, add, edit, moderate or comment

    copy the editorsetup.js in the appropriate folder to define the configuration of your wiswyg editor for the different permission levels

    the default editorsetup.js file is in the publications/NAME_OF_YOUR_PUBTYPE (just as it is now)
  • Posted: 13.09.2005, 13:06
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    This looks quite like what I'm looking for. Unfortunately I still don't understand how my editorsetup.js would have to look like if I wanted to cut out the font/texttype buttons for example and put the buttons in rows of 7 buttons or so.

    Could you give me a hint on that?

    The problem is that with a tablefree layout pagesetter will need too much place in the middle and all my blocks will then appear beneath the pagesetter content (just in administration/edit in IE) or the htmlarea is displayed over the right blocks but unfortunately with a transparent background (all other browsers I tested)...
  • Posted: 14.09.2005, 17:47
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    I do not know if you can solve that problem with an editorsetup.js (maybe someone else is knows more about that), but I am also not sure if need this hack for your purposes as it seems to me that is is more a theming problem. I am nut sure if I understood your problem correctly, but if you just need to change the Xinha config you can do this also without the hack. The hack is just needed if you need different configurations for different users.
  • Posted: 15.09.2005, 00:51
     
    Converted
    rank:
    12
    registered:
     March 2009
    Status:
    offline
    last visit:
    Posts:
    0
    Thanks for the tip

Template courtesy of Designs By Darren.