Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 07:02 am EDT

Geeklog Forums

Geting a Admin link to work.


Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
What needs to be in the Database to get a link to work in the Admin area.
Reason is, I got everything transfered to my new server.
But some of the Admin links are not working. (plug in links)
Say like the forums.
There is Admin/forum link.
When I try to put the URL in by hand. It said I don't have permission.
But I am a root user.

If I delete a plug in. Thin reinstall it. It works.
But I can't do that with the forums.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by Mikez:
If I delete a plug in. Thin reinstall it. It works.
But I can't do that with the forums.
Why not? just back up the forum tables, reinstall (if that is what seems to work), then restore your table data... either way, nothing comes to mind why that would be happening.
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
Cuz thats what I did.
And my forms takes FOREVER to reinstall.
I have so many post that I had to split it up into 10 pages just to get the database to take it from the move.

I think it has to be something not right in one of the Tables.
But I just don't understand some of them. More cuz I am afraid I am trying to understand a corrupted table. LOL

Like gl_access
or gl_group_assignments

the forums is listed in Groups and Admins in the database.
So what tells the site why can see it.

I keep thinking it has to be 1 of those 2 tables with something set wrong.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
don't think that the admin page is looking for root, but for forum.edit rights. you may want to see that your root group has those rights
...see $_TABLES['group_assignments'] for that.

use the "showrights" block.. I think it is blaine's but not sure...
here it is.. it show the current user what they have access to.
Text Formatted Code
/**
* Sample PHP Block function
*
* this is a sample function used by a PHP block.  This will show the rights that
* a user has in the "What you have access to" block.
*
*/
function phpblock_showrights() {
    global $_RIGHTS, $_CST_VERBOSE;

    if ($_CST_VERBOSE) {
        COM_errorLog('**** Inside phpblock_showrights in lib-custom.php ****', 1);
    }

    $retval .= ' ';

    for ($i = 0; $i < count($_RIGHTS); $i++) {
        $retval .=  '<li>' . $_RIGHTS[$i] . '</li>' . LB;
    }

    if ($_CST_VERBOSE) {
        COM_errorLog('**** Leaving phpblock_showrights in lib-custom.php ****', 1);
    }

    return $retval;
}

 
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
ya but how do you understand $_TABLES['group_assignments']
It's not adding up to me.
And odds are thats because there is the problem.
But I don't know what the 2 numbers mean.
Here they are.
Note that the group ID on my site for the forums is 20.
Text Formatted Code

-- Dumping data for table `gl_access`
--

INSERT INTO `gl_access` VALUES (1, 3);
INSERT INTO `gl_access` VALUES (2, 3);
INSERT INTO `gl_access` VALUES (3, 5);
INSERT INTO `gl_access` VALUES (4, 5);
INSERT INTO `gl_access` VALUES (5, 9);
INSERT INTO `gl_access` VALUES (5, 11);
INSERT INTO `gl_access` VALUES (6, 9);
INSERT INTO `gl_access` VALUES (6, 11);
INSERT INTO `gl_access` VALUES (7, 12);
INSERT INTO `gl_access` VALUES (8, 7);
INSERT INTO `gl_access` VALUES (9, 7);
INSERT INTO `gl_access` VALUES (10, 4);
INSERT INTO `gl_access` VALUES (11, 6);
INSERT INTO `gl_access` VALUES (12, 8);
INSERT INTO `gl_access` VALUES (13, 10);
INSERT INTO `gl_access` VALUES (14, 11);
INSERT INTO `gl_access` VALUES (15, 11);
INSERT INTO `gl_access` VALUES (16, 4);
INSERT INTO `gl_access` VALUES (17, 14);
INSERT INTO `gl_access` VALUES (18, 14);
INSERT INTO `gl_access` VALUES (22, 14);
INSERT INTO `gl_access` VALUES (23, 15);
INSERT INTO `gl_access` VALUES (24, 15);
INSERT INTO `gl_access` VALUES (29, 21);
INSERT INTO `gl_access` VALUES (38, 26);
INSERT INTO `gl_access` VALUES (39, 26);
INSERT INTO `gl_access` VALUES (43, 29);
INSERT INTO `gl_access` VALUES (44, 29);
INSERT INTO `gl_access` VALUES (46, 27);
INSERT INTO `gl_access` VALUES (47, 27);
INSERT INTO `gl_access` VALUES (48, 28);
INSERT INTO `gl_access` VALUES (49, 28);
INSERT INTO `gl_access` VALUES (50, 28);
INSERT INTO `gl_access` VALUES (51, 28);
INSERT INTO `gl_access` VALUES (52, 29);
INSERT INTO `gl_access` VALUES (53, 30);
INSERT INTO `gl_access` VALUES (54, 32);

 

See, I don't know what the first number is at all.
The 2nd I was thinking it was the Group ID.
And if so, some are missing and some are duplicated.
Well there is the problem if this is true.
But with out knowing what the first number is. I am not sure what to put.
Also the duplicated, is there a reason a plug well do that.
Or is that more error from the move to a new server.
Confused
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
It may also help to know what the ug_main_grp_id, ug_uid, ug_grp_id
Mean in gl_group_assignments.
Cuz that don't add up to me also.
 Quote

Status: offline

THEMike

Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
gl_access holds feature -> group id mappings.

So the first row is the gl_feature that the second row gl_group has access to.

So you would expect the second row to have duplicates as many groups will have access to a feature.

So, you need to find out the feature id for the group that your account is in and grant it access. The feature is held in gl_features, so you want the forum.edit feature and the Root group. Root is always 1. But forum.edit will depend on your install. So you want:

INSERT INTO gl_access(edit featureid, 1);

Not 100% sure here, but I think:
ug_main_grp_id is the grp_id of a group.
If ug_uid is set, then it means that the user with the uid specified is in that group. If ug_grp_id is set, then it means the group with the grp_id specified is in that group.

So you can have
big group contains little group, little group 2 and user 1
While little group contains user 2 and user 3
and little group 2 contains user 4 and user 5....

Heiracrchy of groups.

But I'm not 100% sure, I've not spent enough time round the permissions system.
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
ok, If I understand. Thin I need to put in Access 23/20 and 24/20.
And I did but no link.
here is that other table.
Text Formatted Code
--
-- Dumping data for table `gl_features`
--

INSERT INTO `gl_features` VALUES (1, 'story.edit', 'Access to story editor', 1);
INSERT INTO `gl_features` VALUES (2, 'story.moderate', 'Ablility to moderate pending stories', 1);
INSERT INTO `gl_features` VALUES (3, 'link.moderate', 'Ablility to moderate pending links', 1);
INSERT INTO `gl_features` VALUES (4, 'link.edit', 'Access to link editor', 1);
INSERT INTO `gl_features` VALUES (5, 'user.edit', 'Access to user editor', 1);
INSERT INTO `gl_features` VALUES (6, 'user.delete', 'Ablility to delete a user', 1);
INSERT INTO `gl_features` VALUES (7, 'user.mail', 'Ablility to send email to members', 1);
INSERT INTO `gl_features` VALUES (8, 'event.moderate', 'Ablility to moderate pending events', 1);
INSERT INTO `gl_features` VALUES (9, 'event.edit', 'Access to event editor', 1);
INSERT INTO `gl_features` VALUES (10, 'block.edit', 'Access to block editor', 1);
INSERT INTO `gl_features` VALUES (11, 'topic.edit', 'Access to topic editor', 1);
INSERT INTO `gl_features` VALUES (12, 'poll.edit', 'Access to poll editor', 1);
INSERT INTO `gl_features` VALUES (13, 'plugin.edit', 'Access to plugin editor', 1);
INSERT INTO `gl_features` VALUES (14, 'group.edit', 'Ability to edit groups', 1);
INSERT INTO `gl_features` VALUES (15, 'group.delete', 'Ability to delete groups', 1);
INSERT INTO `gl_features` VALUES (16, 'block.delete', 'Ability to delete a block', 1);
INSERT INTO `gl_features` VALUES (17, 'staticpages.edit', 'Ability to edit a static page', 0);
INSERT INTO `gl_features` VALUES (18, 'staticpages.delete', 'Ability to delete static pages', 0);
INSERT INTO `gl_features` VALUES (19, 'story.submit', 'May skip the story submission queue', 1);
INSERT INTO `gl_features` VALUES (20, 'link.submit', 'May skip the link submission queue', 1);
INSERT INTO `gl_features` VALUES (21, 'event.submit', 'May skip the event submission queue', 1);
INSERT INTO `gl_features` VALUES (22, 'staticpages.PHP', 'Ability use PHP in static pages', 0);
INSERT INTO `gl_features` VALUES (23, 'forum.edit', 'Forum Admin', 0);
INSERT INTO `gl_features` VALUES (24, 'forum.user', 'Forum Viewer', 0);
INSERT INTO `gl_features` VALUES (39, 'chatterblock.user', 'Chatterblock User Preferences', 0);
INSERT INTO `gl_features` VALUES (38, 'chatterblock.edit', 'Chatterblock Admin', 0);
INSERT INTO `gl_features` VALUES (44, 'journal.delete', 'Ability to delete Journal', 0);
INSERT INTO `gl_features` VALUES (43, 'journal.edit', 'Access to Journal editor', 0);
INSERT INTO `gl_features` VALUES (29, 'ban.admin', 'Ban Admin', 0);
INSERT INTO `gl_features` VALUES (53, 'spamx.admin', 'spamx Admin', 0);
INSERT INTO `gl_features` VALUES (46, 'journal.edit', 'Access to Journal editor', 0);
INSERT INTO `gl_features` VALUES (47, 'journal.delete', 'Ability to delete Journal', 0);
INSERT INTO `gl_features` VALUES (48, 'messenger.edit', 'Messenger Admin Rights', 0);
INSERT INTO `gl_features` VALUES (49, 'messenger.user', 'Messenger User', 0);
INSERT INTO `gl_features` VALUES (50, 'messenger.broadcast', 'Ability to send Broadcast Messages', 0);
INSERT INTO `gl_features` VALUES (51, 'smilie.edit', 'Ability to admin Smilies', 0);
INSERT INTO `gl_features` VALUES (52, 'ban.admin', 'Ban Admin', 0);
INSERT INTO `gl_features` VALUES (54, 'glmenu.edit', 'Plugin Administration Rights', 0);
       
 
 Quote

Status: offline

THEMike

Forum User
Moderator
Registered: 07/25/03
Posts: 141
Location:Sheffield, UK
Hmm what is grp_id 20 in your groups table? I think you needed to put

23/1 and 24/1
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by Mikez: Cuz thats what I did.
And my forms takes FOREVER to reinstall.
I have so many post that I had to split it up into 10 pages just to get the database to take it from the move.

I still say you should just uninstall and then reinstall--those access, feature, and group settings will all be reset in the db. Just my two cents

If you can export your forum tables then you should have no problem importing them as well once you've reinstalled the plugin.
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
Got it.
I installed and removed a plug that I don't use and found the deferences.
You can see what I learned here
 Quote

All times are EDT. The time is now 07:02 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