| | 1095 | //}}}------------- |
| | 1096 | //{{{ plugin stuff |
| | 1097 | //---------------- |
| | 1098 | function load_admin_plugins() { |
| | 1099 | /* this should become a setting */ |
| | 1100 | $plugins = array(); |
| | 1101 | $plugin_dir = "../plugins/"; |
| | 1102 | if (is_dir($plugin_dir)) { |
| | 1103 | $plug_fd = opendir($plugin_dir); |
| | 1104 | while (false !== ($fp = readdir($plug_fd))) { |
| | 1105 | if (!preg_match("/^\./", $fp)) { |
| | 1106 | require_once($plugin_dir.$fp); |
| | 1107 | } |
| | 1108 | } |
| | 1109 | } |
| | 1110 | } |
| | 1111 | |
| | 1112 | function register_admin_plugin($name, $type) { |
| | 1113 | echo "<!-- registering plugin: $name -->\n"; |
| | 1114 | $GLOBALS["admin_plugins"][$type][] = $name; |
| | 1115 | } |
| | 1116 | |
| | 1117 | function getAdminPluginsByType($type) { |
| | 1118 | if (is_array($GLOBALS["admin_plugins"][$type])) { |
| | 1119 | foreach ($GLOBALS["admin_plugins"][$type] as $p) { |
| | 1120 | $plugs[] = $p; |
| | 1121 | } |
| | 1122 | } else { |
| | 1123 | $plugs[] = ""; |
| | 1124 | } |
| | 1125 | return $plugs; |
| | 1126 | } |
| | 1127 | |
| 1104 | | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_cats") { echo "_act"; } ?>" href="./index.php?action=show_cats">categories</a> |
| 1105 | | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_authors") { echo "_act"; } ?>" href="./index.php?action=show_authors">authors</a> |
| 1106 | | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_posts") { echo "_act"; } ?>" href="./index.php?action=show_posts">posts</a> |
| 1107 | | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_comments") { echo "_act"; } ?>" href="./index.php?action=show_comments">comments</a> |
| 1108 | | <!-- this one should move to plugins --><a class="if_menu_item<? if ($_REQUEST["action"] == "show_acro") { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a> |
| 1109 | | <!-- <a class="if_menu_item<? if ($_REQUEST["action"] == "show_pages") { echo "_act"; } ?>" href="./index.php?action=show_pages"> pages</a> |
| 1110 | | --> |
| 1111 | | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_settings") { echo "_act"; } ?>" href="./index.php?action=show_settings">blogsettings</a> |
| | 1138 | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_cats") { echo "_act"; } ?>" href="./index.php?action=show_cats">categories</a> |
| | 1139 | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_authors") { echo "_act"; } ?>" href="./index.php?action=show_authors">authors</a> |
| | 1140 | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_posts") { echo "_act"; } ?>" href="./index.php?action=show_posts">posts</a> |
| | 1141 | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_comments") { echo "_act"; } ?>" href="./index.php?action=show_comments">comments</a> |
| | 1142 | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_acro") { echo "_act"; } ?>" href="./index.php?action=show_acro">acronyms</a> |
| | 1143 | <a class="if_menu_item<? if ($_REQUEST["action"] == "show_settings") { echo "_act"; } ?>" href="./index.php?action=show_settings">blogsettings</a> |