Fork me on GitHub




« 1 (2)


Re: probleme de permission tinyeditor/smartsection
Régulier
Inscrit: 28/02/2006 19:55
Messages: 103
So again my question: Is gzip-compression turned on in tinyeditor?

Hmmmm, let's try another thing. Open tinyeditor / include / initcode.php in an editor and change this:

if (is_object($xoopsUser)) {
        
$uid $xoopsUser->getVar('uid');
        
$thegroupid array_shift(getCurrentUsersGroups($uid));
    } else {
        
$thegroupid 3;
    }


to this:
if (is_object($xoopsUser)) {
        
$uid $xoopsUser->getVar('uid');
        
$thegroupid array_slice($xoopsUser->getGroups($uid), 01);
        
$thegroupid implode(" "$thegroupid);
        
$thegroupid trim($thegroupid);
    } else {
        
$thegroupid 3;
    }


Save and upload the file and try again.

Posté le : 06/12/2006 23:27
Partager Twitter Partagez cette article sur GG+
Re: probleme de permission tinyeditor/smartsection
Supporter Xoops
Inscrit: 07/06/2003 14:31
Messages: 572
sorry.... i have activated and desactivated gzip on tinyeditor but this changes nothing

so i have added your code and updated the module,but evrytime nothing has changed on the member side.

Posté le : 06/12/2006 23:56
Partager Twitter Partagez cette article sur GG+
Re: probleme de permission tinyeditor/smartsection
Régulier
Inscrit: 28/02/2006 19:55
Messages: 103
You have to DELETE the files starting with tiny_mce... in the directory yourxoopsroot / cache

If this is not working I would like to ask you to give me admin rights to your site so that I can look myself.

Posté le : 07/12/2006 00:01
Partager Twitter Partagez cette article sur GG+
Re: probleme de permission tinyeditor/smartsection
Supporter Xoops
Inscrit: 07/06/2003 14:31
Messages: 572
ok i have delete the tiny_mce files (mce=mediacenter? )but this change nothing.

I don't ca give you the acces for my website while this is a intranet,but i can you send te full intranet for my tests if you want.

Posté le : 07/12/2006 00:10
Partager Twitter Partagez cette article sur GG+
Re: probleme de permission tinyeditor/smartsection
Supporter Xoops
Inscrit: 07/06/2003 14:31
Messages: 572
je c plus quoi faire pour résoudre ce probleme,qq1 peux me dire par quelle diable mon xoops est ensorcelée.Il faut que je trouve une soluce maintenant assez rapidement pour mes membres(profs).

Car le vac approche et il vont me filer autrement tout leur doc pour mettre sur l'intranet .Svp aider moi,pour une fois je suis vraiment désespérée.

Posté le : 14/12/2006 18:37
Partager Twitter Partagez cette article sur GG+
Re: probleme de permission tinyeditor/smartsection
Régulier
Inscrit: 28/02/2006 19:55
Messages: 103
Sigh, what a mess!

OK, try this and report me:

a) Are you using tinyeditor 1 RC1? Or another version?
b) For which group do you want to create toolsets? A new group or the ones that came with the installation (webmaster, registered, guests)?
c) Have a look into the database if there is something happening after you changed the toolbar
d) Try to echo some things. First we take initcode.php to experiment with.

Insert this:
echo "thegroupid: ".$thegroupid;
  die();

right before:
$sqlgetbuts "SELECT tinyed_id, tinyed_gid, tinyed_row1, tinyed_row2, tinyed_row3, activeplugs, validelements, extvalidelements, invalidelements FROM ".$xoopsDB->prefix('tinyeditor_toolset')." WHERE tinyed_gid = ".intval($thegroupid)."";


Login as a user within the group for which the toolbars are not working and compare if the groupid you will see is the groupid of the user's group. Report. If this is the correct group delete the above code.

Edit toolsets.php and change the following line:
redirect_header('toolsets.php'2_AM_TINYED_DBUPDATED);

to:
redirect_header('toolsets.php'200_AM_TINYED_DBUPDATED);


Activate mysql/block-debug (as popup). Visit toolsets and make some changes to the toolbar and submit the form. Take a look at the debug-pop to see if there are mysql-errors displayed. If none, revert the changes.

That's it for the moment. If this experiments do not give any hints I reached the end of my (short) wisdom.

atb
frankblack

Posté le : 14/12/2006 22:06
Partager Twitter Partagez cette article sur GG+
Re: probleme de permission tinyeditor/smartsection
Supporter Xoops
Inscrit: 07/06/2003 14:31
Messages: 572
hello frank,

a)i use your last version of tinyeditor(rc1)

b)its a new groupe (id6)i have created one groupe for evry teachergroup (english,french,history....)all techer in one biggroup (teacher)and after there are also in here group.So teacher "smith" are in the groupe of teachers and in the group history

c)sorry i dont no where il will look for this



i have echo the group and xoops says i'ts the groupid6(teachers).Thats right but this teacher are also in the group history groupid12.But the echo tells me only the group id 6.

Also i have changed the file toolsets.php and activated the mode debug,but nothing have changed.

The probleme its always the same,only if i take to a member the admin rights the toolbar apears.If the member are not with the adminrights so the toolbar doesn't existe.

Is this possible to give alle members the adminrights onliy for the tinyeditor?

Posté le : 15/12/2006 10:11
Partager Twitter Partagez cette article sur GG+
Re: probleme de permission tinyeditor/smartsection
Guest_
Hi,

I found a solution for this problem. The problem this in archive XOOPS_ROOT_PATH/modules/tinyeditor/include/initcode.php and occurs in the hour to define the group of the user to show the buttons of the editor.

If the user to belong to the Webmaster group this problem does not occur, but if the user to belong to the Users group and other new groups, the code always defines the Users group as the group of the user.

To solve this problem I created a routine to detect optimum group for the user case it was part of more than 1 group.

Understands as better group for the user the group that has the biggest amount of allowed and active buttons and plugins.

Ok, let's go to the solution of the problem.

Open the cited file above in a text editor and change this:

if (is_object($xoopsUser)) {
        
$uid $xoopsUser->getVar('uid');
        
$thegroupid array_shift(getCurrentUsersGroups($uid));
    } else {
        
$thegroupid 3;
    }


to this:

$thegroupid $ctbuttons $oldctbtn 0;
    if (
is_object($xoopsUser)) {
      
$uid $xoopsUser->getVar('uid');
      
$groups $xoopsUser->getGroups($uid);
      if (
count($groups) > 1){
        if (
in_array(1,$groups)){
          
$thegroupid 1;
        }else{
          foreach (
$groups as $i=>$group){
              
$oldctbtn $ctbuttons;
            
$resultgetbuts $xoopsDB->query("SELECT tinyed_row1, tinyed_row2, tinyed_row3, activeplugs FROM ".$xoopsDB->prefix('tinyeditor_toolset')." WHERE tinyed_gid = ".intval($group)."");
            list(
$tinyed_row1$tinyed_row2$tinyed_row3$activeplugs) = $xoopsDB->fetchRow($resultgetbuts);
            
$ctbuttons strlen($tinyed_row1)+strlen($tinyed_row2)+strlen($tinyed_row3)+strlen($activeplugs);
            if (
$oldctbtn $ctbuttons){
              
$maior $i-1;
            }elseif (
$oldctbtn $ctbuttons){
              
$maior $i;
            }
          }
          
$thegroupid $groups[$maior];
        }
      }else{
        
$thegroupid $groups[0];
      }
    }else{
      
$thegroupid 3;
    }


With this alteration the editor detects the optimum group for the user and now enough to define the permissions desired for the groups that the buttons will go to appear.


I don't know to say if this is the best solution for the problem, probably not but... If somebody find a better solution please sends me the code, lol

Cheers

TheRplima

Posté le : 17/05/2007 15:40
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant
« 1 (2)



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

60 Personne(s) en ligne (49 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 60 | Plus ...