Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 01:23 pm EDT

Geeklog Forums

Slight Mod to External Pages Plugin


Status: offline

TechFan

Forum User
Newbie
Registered: 05/11/03
Posts: 12

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. . .

 Quote

All times are EDT. The time is now 01:23 pm.

  • 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