b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: admin ] [ index: admin ] [ all elements ]

Source for file b2browse.php

Documentation is available at b2browse.php

  1. <?php
  2. /**
  3.  * Browsing posts for editing
  4.  *
  5.  * b2evolution - {@link http://b2evolution.net/}
  6.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  7.  * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  8.  *
  9.  * @package admin
  10.  */
  11.  
  12. /**
  13.  * Includes:
  14.  */
  15. require_once (dirname(__FILE__)'/_header.php');
  16. $admin_tab 'edit';
  17. $admin_pagetitle T_('Browse blog:');
  18. param'blog''integer');
  19.  
  20. if( ($blog == 0&& $current_User->check_perm'blog_ismember'1false$default_to_blog ) )
  21. {    // Default blog is a valid choice
  22.     $blog $default_to_blog;
  23. }
  24. require (dirname(__FILE__)'/_menutop.php');
  25.  
  26. // ---------------------------------- START OF BLOG LIST ----------------------------------
  27. for$curr_blog_ID blog_list_start();
  28.             $curr_blog_ID != false;
  29.             $curr_blog_ID blog_list_next() )
  30.     {
  31.         if$current_User->check_perm'blog_ismember'1false$curr_blog_ID ) )
  32.         {    // Current user is not a member of this blog...
  33.             continue;
  34.         }
  35.         if$blog == )
  36.         {    // If no selected blog yet, select this one:
  37.             $blog $curr_blog_ID;
  38.         }
  39.         if$curr_blog_ID == $blog )
  40.         // This is the blog being displayed on this page ?>
  41.         <a href="<?php echo $pagenow ?>?blog=<?php echo $curr_blog_ID ?>" class="CurrentBlog"><?php blog_list_iteminfo('shortname'?></a>
  42.         <?php
  43.         }
  44.         else
  45.         // This is another blog ?>
  46.         <a href="<?php echo $pagenow ?>?blog=<?php echo $curr_blog_ID ?>" class="OtherBlog"><?php blog_list_iteminfo('shortname'?></a>
  47.         <?php
  48.         }
  49.     // --------------------------------- END OF BLOG LIST ---------------------------------
  50.  
  51.     require (dirname(__FILE__)'/_menutop_end.php');
  52.  
  53.     if$blog == )
  54.     {    // No blog could be selected
  55.         ?>
  56.         <div class="panelblock">
  57.         <?php printfT_('Since you\'re a newcomer, you\'ll have to wait for an admin to authorize you to post. You can also <a %s>e-mail the admin</a> to ask for a promotion. When you\'re promoted, just reload this page and you\'ll be able to blog. :)')'href="mailto:'$admin_email'?subject=b2-promotion"' )?>
  58.         </div>
  59.         <?php
  60.     }
  61.     else
  62.     {    // We could select a blog:
  63.         $Blog Blog_get_by_ID$blog )/* TMP: */ $blogparams get_blogparams_by_ID$blog );
  64.  
  65.         // Check permission:
  66.         $current_User->check_perm'blog_ismember'1true$blog );
  67.  
  68.         // Show the posts:
  69.         require dirname(__FILE__)'/_edit_showposts.php';
  70.     }
  71.  
  72.     requiredirname(__FILE__)'/_footer.php' );
  73.  
  74. ?>

Documentation generated on Tue, 20 May 2008 01:51:17 +0200 by phpDocumentor 1.4.2