Show
Ignore:
Timestamp:
04/11/06 22:44:51 (3 years ago)
Author:
michiel
Message:

remove the plugin stuff that's for 2.0
Update readme and changelog

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/mvblog-1_6/common/functions_blog.php

    r118 r120  
    4343ob_start(); 
    4444$db = db_init(); 
    45 $version = "SVN"; 
    46 $plugins = array(); 
    47 /* populate the $plugins array */ 
    48 load_plugins(); 
     45$version = "1.6"; 
    4946//}}}-------------------------------------------------------- 
    5047//{{{ check_admin_logged_in: are we logged in as admin user ? 
     
    157154                <div class="log_body"> 
    158155                        <div class="log_contents"> 
    159                                 <?=run_plugins(strip_invalid_xml(stripslashes(str_replace("##BREAKPOINT##", "", $row["body"]))), "text_output")?> 
     156                                <?=strip_invalid_xml(stripslashes(str_replace("##BREAKPOINT##", "", $row["body"])))?> 
    160157                        </div> 
    161158                </div> 
     
    193190                                                echo "[Comment deleted by admin on ".date("d-m-Y H:i", $row["deleted"])."]"; 
    194191                                        } else { 
    195                                                 echo nl2br(stripslashes(htmlspecialchars(strip_invalid_xml(run_plugins($row["comment"], "text_output"))))); 
     192                                                echo nl2br(stripslashes(htmlspecialchars(strip_invalid_xml($row["comment"])))); 
    196193                                        } 
    197194                                        ?> 
     
    614611                                        <? } ?> 
    615612                                                <? 
    616                                                 if (limit_text(run_plugins(strip_invalid_xml(stripslashes($row["body"])), "text_output"), 4000)) { 
     613                                                if (limit_text(strip_invalid_xml(stripslashes($row["body"])), 4000)) { 
    617614                                                        ?><br /><br /><a href="index.php?action=view&amp;id=<?=$row["id"]?>" class="link_readmore">read more</a><? 
    618615                                                } 
     
    719716        return $data; 
    720717} 
    721 //}}}------------------------------------- 
    722 //{{{ load_plugins(): load all the plugins 
    723 //---------------------------------------- 
    724 function load_plugins() { 
    725         /* this should become a setting */ 
    726         $plugins = array(); 
    727         $plugin_dir = "plugins/"; 
    728         if (is_dir($plugin_dir)) { 
    729                 $plug_fd = opendir($plugin_dir); 
    730                 while (false !== ($fp = readdir($plug_fd))) { 
    731                         if (!preg_match("/^\./", $fp)) { 
    732                                 require_once($plugin_dir.$fp); 
    733                         } 
    734                 } 
    735         } 
    736 } 
    737          
    738 function register_plugin($name, $type) { 
    739         $GLOBALS["plugins"][$type][] = $name; 
    740 } 
    741  
    742 function getPluginsByType($type) { 
    743         if (is_array($GLOBALS["plugins"][$type])) { 
    744                 foreach ($GLOBALS["plugins"][$type] as $p) { 
    745                         $plugs[] = $p; 
    746                 } 
    747         } else { 
    748                 $plugs[] = ""; 
    749         } 
    750         return $plugs; 
    751 } 
    752 //}}}-------------------------------------------------- 
    753 //{{{ run_plugins($data, $types): run specified plugins 
    754 //----------------------------------------------------- 
    755 function run_plugins($data, $types) { 
    756         if (!is_array($types)) { 
    757                 $plugintypes[0] = $types; 
    758         } else { 
    759                 $plugintypes = $types; 
    760         } 
    761         unset($types); 
    762         foreach($plugintypes as $type) { 
    763                 $plugins = getPluginsByType($type); 
    764         } 
    765         foreach ($plugins as $plugin) { 
    766                 if (function_exists("plugin_$plugin")) { 
    767                         $data = eval("return plugin_$plugin(\$data);"); 
    768                 } 
    769         } 
    770         return $data; 
    771 } 
    772718 
    773719//}}}---------------------------------------