1
Yaas
Permissions in WF-links
  • 2008/12/26 2:56

  • Yaas

  • Just popping in

  • Posts: 7

  • Since: 2008/12/18


Ok so i got a BIG problem here and i can't figure it out.

When i create categories for my links, it automatically sets it so only registered users see em, thing is, when i have plenty of categories, the permissions options stop showing up. And i NEED to make anonymous users to be able to see them, any ideas? please???

PS: Running it in debug mode made the permission page to not load

2
JDLamb
Re: Permissions in WF-links
  • 2008/12/29 12:01

  • JDLamb

  • Just popping in

  • Posts: 40

  • Since: 2008/11/10


I don't know the answer but I second the question. Links should be visible to all as default. If anyone knows how to do it?

3
McDonald
Re: Permissions in WF-links
  • 2008/12/29 12:29

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


Permissions are not set per link but per category.

4
Yaas
Re: Permissions in WF-links
  • 2008/12/30 2:25

  • Yaas

  • Just popping in

  • Posts: 7

  • Since: 2008/12/18


So i guess the question would be, is there a way to make all categories visible by all users by default??

5
McDonald
Re: Permissions in WF-links
  • 2008/12/30 10:49

  • McDonald

  • Home away from home

  • Posts: 1072

  • Since: 2005/8/15


In admin/category.php find the following:
$sql "UPDATE " $xoopsDB -> prefix'wflinks_cat' ) . " SET title ='$title', imgurl='$imgurl', pid =$pid, description='$descriptionb', spotlighthis='$spotlighthis' , spotlighttop='$spotlighttop', nohtml='$nohtml', nosmiley='$nosmiley', noxcodes='$noxcodes', noimages='$noimages', nobreak='$nobreak', weight='$weight', client_id='$client_id', banner_id='$banner_id' WHERE cid=" $cid;
            
$database_mess _AM_WFL_CCATEGORY_MODIFIED;
        } 
        if ( !
$result $xoopsDB -> query$sql ) ) {
            
XoopsErrorHandler_HandleErrorE_USER_WARNING$sql__FILE____LINE__ );
            return 
false;
        }


After this insert this code:
$module_id $xoopsModule -> getVar('mid');
        
$newcatid mysql_insert_id();
        
$sql2 "INSERT INTO " $xoopsDB -> prefix'group_permission' ) . " (gperm_groupid, gperm_itemid, gperm_modid, gperm_name ) VALUES ('3','$newcatid', '$module_id', 'WFLinkCatPerm')";
        if ( !
$result $xoopsDB -> query$sql2 ) ) {
            
XoopsErrorHandler_HandleErrorE_USER_WARNING$sql2__FILE____LINE__ );
            return 
false;
        }

This will set the category view permission for anonymous users (if group-id = 3).

6
Yaas
Re: Permissions in WF-links
  • 2008/12/30 21:34

  • Yaas

  • Just popping in

  • Posts: 7

  • Since: 2008/12/18


ur the man mcdonald, thnx

Login

Who's Online

335 user(s) are online (271 user(s) are browsing Support Forums)


Members: 0


Guests: 335


more...

Donat-O-Meter

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

Latest GitHub Commits