phpDocumentor collections
[ class tree: collections ] [ index: collections ] [ all elements ]

Procedural File: _blog.funcs.php

Source Location: /qp_inc/collections/model/_blog.funcs.php

Page Details

This file implements Blog handling functions.

This file is part of Quam Plures - http://quamplures.net/ See also https://launchpad.net/quam-plures.

Author:  blueyed: Daniel HAHLER.
Author:  fplanque: Francois PLANQUE.
Copyright:  

(c)2003-2009 by Francois PLANQUE - http://fplanque.net/ Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - http://thequod.de/contact.

Copyright:  (c) 2009 - 2011 by the Quam Plures developers - http://quamplures.net/
Filesource:  Source Code for this file
Functions
autoselect_blog  [line 358]

integer autoselect_blog( string $permname, [string $permlevel = 'any']  )

Check permissions on a given blog (by ID) and autoselect an appropriate blog if necessary.

For use in admin

NOTE: we no longer try to set $Blog inside of the function because later global use cannot be safely guaranteed in PHP4.

Parameters:
string   $permname:  Permission name that must be given to the $current_User object.
string   $permlevel:  Permission level that must be given to the $current_User object.

API Tags:
Return:  new selected blog


[ Top ]
blogperms_get_easy2  [line 275]

string blogperms_get_easy2( array $perms, [ $context = 'user']  )

Translates an given array of permissions to an "easy group".

USES OBJECT ROW

  • nomember
  • member
  • editor (member+edit posts+delete+edit comments+all filemanager rights)
  • administrator (editor+edit cats+edit blog)
  • custom

Parameters:
array   $perms:  indexed, as the result row from "SELECT * FROM T_coll_user_perms"
   $context: 

API Tags:
Return:  one of the five groups (nomember, member, editor, admin, custom)


[ Top ]
blog_update_perms  [line 42]

void blog_update_perms( int $blog, [string $context = 'user']  )

Update the advanced user/group permissions for edited blog

Parameters:
int   $blog:  Blog ID
string   $context:  'user' or 'group'


[ Top ]
set_working_blog  [line 422]

boolean set_working_blog( $new_blog_ID  )

Set working blog to a new value and memorize it in user settings if needed.

For use in admin

Parameters:
   $new_blog_ID: 

API Tags:
Return:  changed?


[ Top ]
valid_blog_requested  [line 403]

void valid_blog_requested( )

Check that we have received a valid blog param

For use in admin



[ Top ]