[geeklog-cvs] Geeklog-1.x/system lib-plugins.php,1.127,1.128
Oliver
ospiess at qs1489.pair.com
Thu Aug 9 02:10:17 EDT 2007
Update of /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/system
In directory qs1489.pair.com:/tmp/cvs-serv33524
Modified Files:
lib-plugins.php
Log Message:
adding new function that redirects to a page after saving depending on the config.php setting
Index: lib-plugins.php
===================================================================
RCS file: /usr/home/geeklog2/cvsroot/geeklog/Geeklog-1.x/system/lib-plugins.php,v
retrieving revision 1.127
retrieving revision 1.128
diff -C2 -d -r1.127 -r1.128
*** lib-plugins.php 22 Apr 2007 14:19:19 -0000 1.127
--- lib-plugins.php 9 Aug 2007 06:10:15 -0000 1.128
***************
*** 59,62 ****
--- 59,93 ----
/**
+ * Forward the user depending on config.php-setting after saving something
+ *
+ * @param string $item_url the url of the item saved
+ * @param string $plugin the name of the plugin that saved the item
+ * @return the url where the user will be forwarded to
+ *
+ */
+ function PLG_afterSaveSwtich($item_url, $plugin) {
+ global $_CONF;
+ switch ($_CONF['aftersave']) {
+ case 'item':
+ $url = $item_url;
+ break;
+ case 'list':
+ $url = $_CONF['site_admin_url'] . "/plugins/$plugin/index.php";
+ break;
+ case 'home':
+ $url = $_CONF['site_url'];
+ break;
+ case 'admin':
+ $url = $_CONF['site_admin_url'] . '/moderation.php';
+ break;
+ case 'plugin':
+ $url = $_CONF['site_url'] . "/$plugin/index.php";
+ break;
+ }
+ return COM_refresh ($url);
+ }
+
+
+ /**
* Calls a function for all enabled plugins
*
***************
*** 486,490 ****
}
}
!
$function = 'custom_commentPreSave';
if (function_exists($function)) {
--- 517,521 ----
}
}
!
$function = 'custom_commentPreSave';
if (function_exists($function)) {
***************
*** 527,531 ****
}
}
!
$function = 'custom_itemPreSave';
if (function_exists ($function)) {
--- 558,562 ----
}
}
!
$function = 'custom_itemPreSave';
if (function_exists ($function)) {
***************
*** 607,611 ****
}
}
!
if ($showsitestats == 3) {
$function = 'custom_statssummary';
--- 638,642 ----
}
}
!
if ($showsitestats == 3) {
$function = 'custom_statssummary';
***************
*** 658,662 ****
} // no else because this is not a required API function
}
!
$function = 'custom_searchtypes';
if (function_exists ($function)) {
--- 689,693 ----
} // no else because this is not a required API function
}
!
$function = 'custom_searchtypes';
if (function_exists ($function)) {
***************
*** 666,670 ****
}
}
!
asort($types);
return $types;
--- 697,701 ----
}
}
!
asort($types);
return $types;
***************
*** 731,735 ****
} // no else because implementation of this API function not required
}
!
$function = 'custom_dopluginsearch';
if (function_exists($function)) {
--- 762,766 ----
} // no else because implementation of this API function not required
}
!
$function = 'custom_dopluginsearch';
if (function_exists($function)) {
***************
*** 1085,1089 ****
}
}
!
$function = 'custom_user_create';
if (function_exists($function)) {
--- 1116,1120 ----
}
}
!
$function = 'custom_user_create';
if (function_exists($function)) {
***************
*** 1108,1112 ****
}
}
!
$function = 'custom_user_delete';
if (function_exists($function)) {
--- 1139,1143 ----
}
}
!
$function = 'custom_user_delete';
if (function_exists($function)) {
***************
*** 1135,1139 ****
}
}
!
$function = 'custom_user_login';
if (function_exists($function)) {
--- 1166,1170 ----
}
}
!
$function = 'custom_user_login';
if (function_exists($function)) {
***************
*** 1160,1164 ****
}
}
!
$function = 'custom_user_logout';
if (function_exists($function)) {
--- 1191,1195 ----
}
}
!
$function = 'custom_user_logout';
if (function_exists($function)) {
***************
*** 1184,1188 ****
}
}
!
$function = 'custom_user_changed';
if (function_exists($function)) {
--- 1215,1219 ----
}
}
!
$function = 'custom_user_changed';
if (function_exists($function)) {
***************
*** 1209,1213 ****
}
}
!
$function = 'custom_group_changed';
if (function_exists($function)) {
--- 1240,1244 ----
}
}
!
$function = 'custom_group_changed';
if (function_exists($function)) {
***************
*** 1234,1238 ****
}
}
!
$function = 'custom_profilevariablesedit';
if (function_exists($function)) {
--- 1265,1269 ----
}
}
!
$function = 'custom_profilevariablesedit';
if (function_exists($function)) {
***************
*** 1261,1270 ****
}
}
!
$function = 'custom_profileblocksedit';
if (function_exists($function)) {
$retval .= $function($uid);
}
!
return $retval;
}
--- 1292,1301 ----
}
}
!
$function = 'custom_profileblocksedit';
if (function_exists($function)) {
$retval .= $function($uid);
}
!
return $retval;
}
***************
*** 1288,1292 ****
}
}
!
$function = 'custom_profilevariablesdisplay';
if (function_exists($function)) {
--- 1319,1323 ----
}
}
!
$function = 'custom_profilevariablesdisplay';
if (function_exists($function)) {
***************
*** 1315,1319 ****
}
}
!
$function = 'custom_profileblocksdisplay';
if (function_exists($function)) {
--- 1346,1350 ----
}
}
!
$function = 'custom_profileblocksdisplay';
if (function_exists($function)) {
***************
*** 1389,1398 ****
}
}
!
$function = 'custom_getheadercode';
if (function_exists($function)) {
$headercode .= $function();
}
!
return $headercode;
}
--- 1420,1429 ----
}
}
!
$function = 'custom_getheadercode';
if (function_exists($function)) {
$headercode .= $function();
}
!
return $headercode;
}
***************
*** 1574,1578 ****
}
}
!
$function = 'custom_getfeednames';
if (function_exists($function)) {
--- 1605,1609 ----
}
}
!
$function = 'custom_getfeednames';
if (function_exists($function)) {
***************
*** 1600,1604 ****
$feeds = array ();
!
if ($plugin == 'custom')
{
--- 1631,1635 ----
$feeds = array ();
!
if ($plugin == 'custom')
{
***************
*** 1612,1619 ****
if (function_exists($function)) {
$feeds = $function();
! }
}
}
!
--- 1643,1650 ----
if (function_exists($function)) {
$feeds = $function();
! }
}
}
!
***************
*** 1685,1689 ****
}
}
!
$function = 'custom_feedElementExtensions';
if (function_exists($function))
--- 1716,1720 ----
}
}
!
$function = 'custom_feedElementExtensions';
if (function_exists($function))
***************
*** 1691,1695 ****
$extensions = array_merge($extensions, $function($contentType, $contentID, $feedType, $feedVersion, $topic, $fid));
}
!
return $extensions;
}
--- 1722,1726 ----
$extensions = array_merge($extensions, $function($contentType, $contentID, $feedType, $feedVersion, $topic, $fid));
}
!
return $extensions;
}
***************
*** 1718,1722 ****
}
}
!
$function = 'custom_feedNSExtensions';
if (function_exists($function))
--- 1749,1753 ----
}
}
!
$function = 'custom_feedNSExtensions';
if (function_exists($function))
***************
*** 1750,1754 ****
}
}
!
$function = 'custom_feedExtensionTags';
if (function_exists($function))
--- 1781,1785 ----
}
}
!
$function = 'custom_feedExtensionTags';
if (function_exists($function))
***************
*** 1835,1839 ****
}
}
!
$fn_head = 'custom_whatsnewsupported';
if (function_exists($fn_head)) {
--- 1866,1870 ----
}
}
!
$fn_head = 'custom_whatsnewsupported';
if (function_exists($fn_head)) {
***************
*** 1897,1901 ****
}
}
!
$function = 'custom_checkforSpam';
if (function_exists($function)) {
--- 1928,1932 ----
}
}
!
$function = 'custom_checkforSpam';
if (function_exists($function)) {
***************
*** 1938,1942 ****
}
}
!
$function = 'custom_spamaction';
if (function_exists($function)) {
--- 1969,1973 ----
}
}
!
$function = 'custom_spamaction';
if (function_exists($function)) {
***************
*** 2114,2118 ****
}
}
!
$function = 'custom_itemdisplay';
if (function_exists ($function)) {
--- 2145,2149 ----
}
}
!
$function = 'custom_itemdisplay';
if (function_exists ($function)) {
More information about the geeklog-cvs
mailing list