Changeset 3146
- Timestamp:
- 07/31/13 20:41:02 (10 years ago)
- Location:
- plugins/authorMode
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/authorMode/_admin.php
r1154 r3146 27 27 class authorModeBehaviors 28 28 { 29 public static function adminBeforeUserUpdate( &$cur,&$user_id = '')29 public static function adminBeforeUserUpdate($cur,$user_id = '') 30 30 { 31 31 $cur->user_desc = $_POST['user_desc']; … … 39 39 } 40 40 41 public static function adminAuthorForm( &$rs)41 public static function adminAuthorForm($rs) 42 42 { 43 43 if ($rs instanceof dcCore) { -
plugins/authorMode/_define.php
r1154 r3146 16 16 /* Description*/ "post entries per author + author desc handling", 17 17 /* Author */ "xave", 18 /* Version */ '1. 3',18 /* Version */ '1.4', 19 19 /* Permissions */ 'admin,contentadmin' 20 20 ); -
plugins/authorMode/_install.php
r1154 r3146 18 18 } 19 19 20 $core->blog->settings-> setNameSpace('authormode');20 $core->blog->settings->addNameSpace('authormode'); 21 21 if ($cur_version === null) 22 22 { 23 $core->blog->settings-> put('authormode_active',false,'boolean');24 $core->blog->settings-> put('authormode_url_author','author','string');25 $core->blog->settings-> put('authormode_url_authors','authors','string');26 $core->blog->settings-> put('authormode_default_alpha_order',true,'boolean');27 $core->blog->settings-> put('authormode_default_posts_only',true,'boolean');23 $core->blog->settings->authormode->put('authormode_active',false,'boolean'); 24 $core->blog->settings->authormode->put('authormode_url_author','author','string'); 25 $core->blog->settings->authormode->put('authormode_url_authors','authors','string'); 26 $core->blog->settings->authormode->put('authormode_default_alpha_order',true,'boolean'); 27 $core->blog->settings->authormode->put('authormode_default_posts_only',true,'boolean'); 28 28 } 29 29 elseif (version_compare($cur_version,'1.1','<=')) 30 30 { 31 $core->blog->settings-> put('authormode_default_alpha_order',true,'boolean');32 $core->blog->settings-> put('authormode_default_posts_only',true,'boolean');31 $core->blog->settings->authormode->put('authormode_default_alpha_order',true,'boolean'); 32 $core->blog->settings->authormode->put('authormode_default_posts_only',true,'boolean'); 33 33 } 34 34 $core->setVersion('authorMode',$new_version); -
plugins/authorMode/_prepend.php
r1154 r3146 16 16 class rsAuthor 17 17 { 18 public static function getAuthorCN( &$rs)18 public static function getAuthorCN($rs) 19 19 { 20 20 return dcUtils::getUserCN($rs->user_id, $rs->user_name, … … 22 22 } 23 23 24 public static function getAuthorLink( &$rs)24 public static function getAuthorLink($rs) 25 25 { 26 26 $res = '%1$s'; … … 33 33 } 34 34 35 public static function getAuthorEmail( &$rs,$encoded=true)35 public static function getAuthorEmail($rs,$encoded=true) 36 36 { 37 37 if ($encoded) { … … 42 42 } 43 43 44 if ($core->blog->settings->authormode _active)44 if ($core->blog->settings->authormode->authormode_active) 45 45 { 46 if ($core->blog->settings->authormode _url_author !== null) {47 $url_prefix = $core->blog->settings->authormode _url_author;46 if ($core->blog->settings->authormode->authormode_url_author !== null) { 47 $url_prefix = $core->blog->settings->authormode->authormode_url_author; 48 48 if (empty($url_prefix)) { 49 49 $url_prefix = 'author'; … … 55 55 } 56 56 57 if ($core->blog->settings->authormode _url_authors !== null) {58 $url_prefix = $core->blog->settings->authormode _url_authors;57 if ($core->blog->settings->authormode->authormode_url_authors !== null) { 58 $url_prefix = $core->blog->settings->authormode->authormode_url_authors; 59 59 if (empty($url_prefix)) { 60 60 $url_prefix = 'authors'; -
plugins/authorMode/_public.php
r1154 r3146 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 if (!defined('DC_RC_PATH')) { return; } 13 if (!$core->blog->settings->authormode _active) { return; }13 if (!$core->blog->settings->authormode->authormode_active) { return; } 14 14 15 15 require_once dirname(__FILE__).'/_widgets.php'; … … 52 52 } 53 53 54 public static function addTplPath( &$core)54 public static function addTplPath($core) 55 55 { 56 56 $core->tpl->setPath($core->tpl->getPath(),dirname(__FILE__).'/default-templates'); … … 302 302 " AND P.post_type = '".$core->con->escape($params['post_type'])."' "; 303 303 } 304 elseif ($core->blog->settings->authormode _default_posts_only)304 elseif ($core->blog->settings->authormode->authormode_default_posts_only) 305 305 { 306 306 $strReq .= … … 315 315 'ORDER BY '.$core->con->escape($params['order']).' '; 316 316 } 317 elseif ($core->blog->settings->authormode _default_alpha_order)317 elseif ($core->blog->settings->authormode->authormode_default_alpha_order) 318 318 { 319 319 $strReq .= -
plugins/authorMode/_widgets.php
r1154 r3146 16 16 class widgetsAuthorMode 17 17 { 18 public static function authors( &$w)18 public static function authors($w) 19 19 { 20 20 global $core; 21 21 22 if (!$core->blog->settings->authormode _active) return;22 if (!$core->blog->settings->authormode->authormode_active) return; 23 23 24 24 $rs = authormodeUtils::getPostsUsers(); … … 60 60 } 61 61 62 public static function init( &$w)62 public static function init($w) 63 63 { 64 64 $w->create('authors',__('Authors'),array('widgetsAuthorMode','authors')); -
plugins/authorMode/default-templates/author.html
r1600 r3146 4 4 <head> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <meta name="MSSmartTagsPreventParsing" content="TRUE" /> 6 7 7 <meta name="ROBOTS" content="{{tpl:BlogMetaRobots robots="NOINDEX"}}" /> 8 8 -
plugins/authorMode/default-templates/authors.html
r250 r3146 4 4 <head> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <meta name="MSSmartTagsPreventParsing" content="TRUE" /> 6 7 7 <meta name="ROBOTS" content="{{tpl:BlogMetaRobots}}" /> 8 8 -
plugins/authorMode/index.php
r1154 r3146 12 12 if (!defined('DC_CONTEXT_ADMIN')) { exit; } 13 13 14 $active = $core->blog->settings->authormode _active;15 $url_author = $core->blog->settings->authormode _url_author;16 $url_authors = $core->blog->settings->authormode _url_authors;17 $posts_only = $core->blog->settings->authormode _default_posts_only;18 $alpha_order = $core->blog->settings->authormode _default_alpha_order;14 $active = $core->blog->settings->authormode->authormode_active; 15 $url_author = $core->blog->settings->authormode->authormode_url_author; 16 $url_authors = $core->blog->settings->authormode->authormode_url_authors; 17 $posts_only = $core->blog->settings->authormode->authormode_default_posts_only; 18 $alpha_order = $core->blog->settings->authormode->authormode_default_alpha_order; 19 19 20 20 if (!empty($_POST['saveconfig'])) { 21 21 try 22 22 { 23 $core->blog->settings-> setNameSpace('authormode');23 $core->blog->settings->addNameSpace('authormode'); 24 24 25 25 $active = (empty($_POST['active']))?false:true; … … 37 37 $alpha_order = (empty($_POST['alpha_order']))?false:true; 38 38 39 $core->blog->settings-> put('authormode_active',$active,'boolean');40 $core->blog->settings-> put('authormode_url_author',$url_author,'string');41 $core->blog->settings-> put('authormode_url_authors',$url_authors,'string');42 $core->blog->settings-> put('authormode_default_posts_only',$posts_only,'boolean');43 $core->blog->settings-> put('authormode_default_alpha_order',$alpha_order,'boolean');39 $core->blog->settings->authormode->put('authormode_active',$active,'boolean'); 40 $core->blog->settings->authormode->put('authormode_url_author',$url_author,'string'); 41 $core->blog->settings->authormode->put('authormode_url_authors',$url_authors,'string'); 42 $core->blog->settings->authormode->put('authormode_default_posts_only',$posts_only,'boolean'); 43 $core->blog->settings->authormode->put('authormode_default_alpha_order',$alpha_order,'boolean'); 44 44 $core->blog->triggerBlog(); 45 45
Note: See TracChangeset
for help on using the changeset viewer.