1
trspice
Need hack to allow Annonymous default permission
  • 2007/3/31 22:26

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


I want to allow the annoymous group default access rights to new blocks and modules when they are created without having to manually modify the group. The same way the system does for registered users.

Has anyone done this? Can it be done simply? Thanks
There's nothing but science....
The Reggae Album

2
trspice
Re: Need hack to allow Annonymous default permission
  • 2007/3/31 23:07

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Well I seem to have solved it and no errors yet. I edited install/makedata.php like this
$tables = array();

    
// data for table 'groups_users_link'

    
$dbm->insert('groups_users_link'" VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 1)");
    
$dbm->insert('groups_users_link'" VALUES (0, ".$gruops['XOOPS_GROUP_USERS'].", 1)");
    [
color=990000]$dbm->insert('groups_users_link'" VALUES (0, ".$gruops['XOOPS_GROUP_ANONYMOUS'].", 1)");[/color]


I added the line in red. I had to reinstall to make it work but I suppose it can be done by editing the database which I don't have the skills to do. Maybe someone can post the insert method for the database.

Please advise if this will cause a problem with other modules or just generally.
There's nothing but science....
The Reggae Album

3
trspice
Re: Need hack to allow Annonymous default permission
  • 2007/4/5 3:05

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


While this edit I did works fine for anonymous, now when I create additional groups I have to manually set their permissions and I want to automate that. Is there a file that I can edit to allow permissions for new blocks and modules added by default?
There's nothing but science....
The Reggae Album

4
jdseymour
Re: Need hack to allow Annonymous default permission

Additional (custom) groups should be additive, giving permission not in the registered user group.

If you look, even the webmaster is a member of the registered user group. All groups except anonymous should be a member of the registered users for base permissions, add the member to the new group (but keep in the registered user group) and give permissions to the new group that is not in the registered user group permissions.

It's early. Hope I made sense.

5
trspice
Re: Need hack to allow Annonymous default permission
  • 2007/4/5 16:25

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Thanks jdseymour, it does make sense.
There's nothing but science....
The Reggae Album

6
BeeGirl033
Re: Need hack to allow Annonymous default permission
  • 2007/4/6 10:41

  • BeeGirl033

  • Just popping in

  • Posts: 4

  • Since: 2007/4/6 1


IS there any other way?

Thanks guys.

7
trspice
Re: Need hack to allow Annonymous default permission
  • 2007/4/6 18:03

  • trspice

  • Not too shy to talk

  • Posts: 193

  • Since: 2007/3/24


Yes I am curious about getting this done without having to re-install. For me re-installation was no big deal since my XOOPS installation is new but for someone with a huge database it will certainly be laborious. There must be a proper way but I can't figure it out. I tried deleting the table - groups_users_links and added the changed one from my working test server but it didn't work so I guess something else is done during installation.

However if no optional/proper method is posted and you want to try the re-install method:

- Download your database - Use the phpMyadmin export tool and choose Structure > ADD DROP TABLE and ADD IF NOT EXIST. Then choose Data > Use Ignore inserts. All other selections should be default. (if you are completely new to phpMyadmin don't try this)
- Still in phpMyadmin, Click Check All and then Drop. This will delete all the tables and stored data.
- Delete file cache/adminmenu.php
- Empty templates_c folder
- Delete mainfile.php and replace with original
- Upload the install folder with the changes made to makedata.php
- Proceed with installation. Be sure to use the same table prefix as you previously had.
- Delete table groups_users_links and all it's insets from the downloaded database. (because it will overwrite the changes you made)
- Import the database
- Reset all system preferences including your theme
- Update all modules from System Admin > Modules

Take into consideration that if your site is very active then users may be trying to access and will get the installation screen untill you complete. If your server supports HTML override then place and INDEX.HTML file in the root. If you have this high activity then you should check the templates_c folder again just before starting the installation and delete any new files.

Be sure to backup your database just incase. Not reccommended for large databases on virtual shared hosting as most have limits on upload size and you will get errors. Not reccommended for the faint of heart. Try it on a test server first.

This is quite tedious so I hope an expert can post the better method.
There's nothing but science....
The Reggae Album

Login

Who's Online

188 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 188


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits