Posted on: 06/07/03 10:34am
By: TechFan
With the aid of dirk, I made a little mod to my copy of the external plugin. . .to change the default owner group and user that has permissions when an external page is added the first time someone visits it. Currently, mine defaults to have anonymous be the default owner. . .
$group_id_temp = DB_getItem($_TABLES['groups'], 'grp_id', "grp_name = 'external Admin'");
$owner_id_temp = DB_getItem($_TABLES['users'], 'uid', "username = 'Admin'");
DB_query("INSERT INTO {$_TABLES['external']} SET url='$page', title='$page', hits=1, group_id='$group_id_temp', owner_id='$owner_id_temp'");
The first two lines are adding two new query lines and the third line is modifying the current DB_query("INSERT statement on line 284 in the functions.inc for the external plugin.
Not sure who made the current external plugin, but it would be nice to add at least the group lookup to the released plugin. And for all plugins that have their own groups. . .if they don't check for this already. . .