implement PLG_itemDisplay for articles HEAD
authorospiess
Tue Jan 09 09:49:44 2007 +0000 (3 years ago)
branchHEAD
changeset 49673d49aa6f192d
parent 4966c632456a8bba
child 4968d78de4608001
implement PLG_itemDisplay for articles
system/lib-story.php
     1.1 --- a/system/lib-story.php	Tue Jan 09 09:24:25 2007 +0000
     1.2 +++ b/system/lib-story.php	Tue Jan 09 09:49:44 2007 +0000
     1.3 @@ -33,7 +33,7 @@
     1.4  // |                                                                           |
     1.5  // +---------------------------------------------------------------------------+
     1.6  //
     1.7 -// $Id: lib-story.php,v 1.73 2006/11/09 09:57:28 dhaun Exp $
     1.8 +// $Id: lib-story.php,v 1.74 2007/01/09 09:49:44 ospiess Exp $
     1.9  
    1.10  if (strpos ($_SERVER['PHP_SELF'], 'lib-story.php') !== false) {
    1.11      die ('This file can not be used on its own!');
    1.12 @@ -454,6 +454,20 @@
    1.13      $article->set_var( 'article_url', $articleUrl );
    1.14      $article->set_var( 'recent_post_anchortag', $recent_post_anchortag );
    1.15  
    1.16 +    // PLG_itemDisplay additions
    1.17 +    $plg_additions = PLG_itemDisplay ($A['sid'], 'article'); // call the array
    1.18 +    $add_string = "";
    1.19 +    for ($adds = 0; $adds<count($plg_additions); $adds++) // loop through elements
    1.20 +    {
    1.21 +        $add_string .= "<br>" . $plg_additions[$adds];
    1.22 +    }
    1.23 +    if ($adds > 0)
    1.24 +    {
    1.25 +        $add_string .= "<br>";
    1.26 +    }
    1.27 +    $article->set_var( 'plugin_itemdisplay', $add_string );
    1.28 +
    1.29 +    // Edit Link
    1.30      if( SEC_hasAccess( $A['owner_id'], $A['group_id'], $A['perm_owner'], $A['perm_group'], $A['perm_members'], $A['perm_anon'] ) == 3 AND SEC_hasrights( 'story.edit' ) AND ( $index != 'p' ) AND SEC_hasTopicAccess( $A['tid'] ) == 3 )
    1.31      {
    1.32          $article->set_var( 'edit_link', '<a href="' . $_CONF['site_admin_url']