Changeset 3335
- Timestamp:
- 01/22/15 12:34:24 (8 years ago)
- Location:
- plugins/tagflash
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/tagflash/CHANGELOG
r3307 r3335 1 Tag Flash 1.2.2 - 2015-01-22 2 ================================= 3 * Add default values for width, height, colors at first installation. 4 * Update widget options 5 * Fix CR for some files 6 Thanks to brol <contact@brol.info> for all theses points. 7 1 8 Tag Flash 1.2.1 - 2014-04-13 2 9 ================================= … … 27 34 * Add help 28 35 * Option to add code for search engine 29 * Remove swfobject dependency 36 * Remove swfobject dependency 30 37 31 38 Tag Flash 1.0.3 - 2010-11-24 -
plugins/tagflash/_admin.php
r3306 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ … … 23 23 if (!defined('DC_CONTEXT_ADMIN')) { return; } 24 24 25 $_menu['Blog']->addItem(__('Tag Flash'), 25 $_menu['Blog']->addItem(__('Tag Flash'), 26 26 'plugin.php?p=tagflash', 27 27 'index.php?pf=tagflash/img/icon.png', … … 30 30 ); 31 31 32 33 32 require dirname(__FILE__).'/_widgets.php'; -
plugins/tagflash/_define.php
r3307 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ … … 27 27 /* Description*/ "Flash based Tag Cloud for Dotclear", 28 28 /* Author */ "Gwénaël Després (based on WordPress plugin by Roy Tanck)", 29 /* Version */ "1.2. 1",29 /* Version */ "1.2.2", 30 30 /* Permissions */ "usage,contentadmin", 31 31 /* Properties */ array('type' => 'plugin', … … 33 33 'support' => 'http://forum.dotclear.net/viewtopic.php?id=34559', 34 34 'details' => 'http://plugins.dotaddict.org/dc2/details/tagflash' 35 36 35 ) 36 ); -
plugins/tagflash/_install.php
r3306 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ … … 24 24 25 25 $version = $core->plugins->moduleInfo('tagflash','version'); 26 if (version_compare($core->getVersion('tagflash'),$version,'>=')) { 26 if (version_compare($core->getVersion('tagflash'),$version,'>=')) { 27 27 return; 28 28 } … … 32 32 33 33 $settings->tagflash->put('active', false, 'boolean', 'Tag Flash plugin activated', false); 34 $settings->tagflash->put('bgcolor', ' ', 'string', 'Animation background color', false);35 $settings->tagflash->put('color1', ' ', 'string', 'Color 1 for animation', false);36 $settings->tagflash->put('color2', ' ', 'string', 'Color 2 for animation', false);37 $settings->tagflash->put('hicolor', ' ', 'string', 'Highlight color for animation', false);38 $settings->tagflash->put('width', ' ', 'string', 'Animation width', false);39 $settings->tagflash->put('height', ' ', 'string', 'Animation height', false);34 $settings->tagflash->put('bgcolor', 'FFFFFF', 'string', 'Animation background color', false); 35 $settings->tagflash->put('color1', '333333', 'string', 'Color 1 for animation', false); 36 $settings->tagflash->put('color2', 'FF3363', 'string', 'Color 2 for animation', false); 37 $settings->tagflash->put('hicolor', '00CC00', 'string', 'Highlight color for animation', false); 38 $settings->tagflash->put('width', '600', 'string', 'Animation width', false); 39 $settings->tagflash->put('height', '400', 'string', 'Animation height', false); 40 40 $settings->tagflash->put('speed', '', 'string', 'Animation roation speed', false); 41 41 -
plugins/tagflash/_prepend.php
r3306 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ -
plugins/tagflash/_public.php
r3306 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ -
plugins/tagflash/_widgets.php
r3306 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ … … 23 23 if (!defined('DC_RC_PATH')) { return; } 24 24 25 $self_ns = $core->blog->settings->addNamespace('tagflash'); 26 if (!$self_ns->active) { 27 return; 28 } 29 25 30 $core->addBehavior('initWidgets',array('tagFlashWidgetBehaviors','initWidgets')); 26 31 $core->addBehavior('initDefaultWidgets',array('tagFlashWidgetBehaviors','initDefaultWidgets')); 27 32 28 class tagFlashWidgetBehaviors 33 class tagFlashWidgetBehaviors 29 34 { 30 35 public static function initDefaultWidgets($w, $d) { … … 34 39 public static function initWidgets($w) { 35 40 $w->create('tagFlash',__('Tags Flash'), array('tplTagFlash','widget')); 36 41 37 42 $w->tagFlash->setting('title',__('Title:'),'Tags','text'); 38 43 $w->tagFlash->setting('seo_content',__('Add tags for SEO'),1,'check'); 39 44 $w->tagFlash->setting('transparent_mode',__('Transparent mode'),1,'check'); 40 45 $w->tagFlash->setting('limit',__('Maximun displayed tags (empty=no limit):'),0,'text'); 41 46 42 47 $w->tagFlash->setting('homeonly', 43 48 __('Display on:'), 0, 'combo', … … 50 55 $w->tagFlash->setting('content_only', __('Content only'), 0, 'check'); 51 56 $w->tagFlash->setting('class', __('CSS class:'), ''); 57 $w->tagFlash->setting('offline',__('Offline'),0,'check'); 52 58 } 53 59 } -
plugins/tagflash/inc/class.tpl.tag.flash.php
r3307 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ … … 21 21 // +-----------------------------------------------------------------------+ 22 22 23 if (!defined('DC_RC_PATH')) { return; } 24 23 25 class tplTagFlash 24 26 { … … 30 32 public static function widget($w) { 31 33 global $core, $_ctx; 32 34 33 35 if (!$core->blog->settings->tagflash->active) { 34 36 return; 35 37 } 38 39 if ($w->offline) 40 return; 36 41 37 42 if (($w->homeonly == 1 && $core->url->type != 'default') || … … 45 50 46 51 $res = ''; 47 48 if ($w->title) {49 $res .= '<h2>'.$w->title.'</h2>';50 }51 52 52 53 $res .= sprintf('<object data="%s" width="%s" height="%s" type="application/x-shockwave-flash">'."\n", … … 55 56 $settings->height 56 57 ); 57 58 58 59 $res .= sprintf('<param name="movie" value="%s"/>', $flash_url); 59 60 $res .= '<param name="allowScriptAccess" value="sameDomain"/>'."\n"; … … 69 70 } 70 71 71 $res .= '<div id="tagFlashContent">'.self::getTags($w, false).'</div>'."\n"; 72 $res .= '<div id="tagFlashContent">'.self::getTags($w, false).'</div>'."\n"; 72 73 $res .= '</object>'."\n"; 73 74 $res .= '<p><strong><a href="'.$core->blog->url.$core->url->getBase('tags').'">'.__('All tags').'</a></strong></p>'; 74 75 75 return 76 ($w->content_only ? '' : '<div class="tagFlash'.($w->class ? ' '.html::escapeHTML($w->class) : '').'">'). 77 $res. 78 ($w->content_only ? '' : '</div>'); 76 $res = 77 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 78 $res; 79 80 return $w->renderDiv($w->content_only,'tagFlash '.$w->class,'',$res); 79 81 } 80 82 … … 96 98 public static function getTags($w, $for_flash=true) { 97 99 global $core; 98 100 99 101 $limit = null; 100 102 if ($w->limit && is_numeric($w->limit)) { 101 103 $limit = $w->limit; 102 104 } 103 105 104 106 $rs = $core->meta->computeMetaStats( 105 107 $core->meta->getMetadata(array('meta_type'=> 'tag', 106 108 'limit'=> $limit) 107 109 ) 108 ); 110 ); 109 111 $res = ''; 110 112 if ($for_flash) { … … 113 115 $fmt_tag = '<li><a href="%s" class="tag%s" rel="tag">%s</a></li>'; 114 116 } 115 117 116 118 if (!$rs->isEmpty()) { 117 119 while ($rs->fetch()) { 118 $res .= sprintf($fmt_tag, 120 $res .= sprintf($fmt_tag, 119 121 $core->blog->url.$core->url->getBase('tag').'/'.urlencode(utf8_encode($rs->meta_id)), 120 122 self::$size_translator[$rs->roundpercent], … … 123 125 } 124 126 } 125 127 126 128 if ($for_flash) { 127 129 $res = '<tags>'.$res.'</tags>'; … … 129 131 $res = '<ul>'.$res.'</ul>'; 130 132 } 131 133 132 134 return $res; 133 135 } -
plugins/tagflash/index.php
r3307 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ … … 50 50 $tagflash_active = (empty($_POST['tagflash_active']))?false:true; 51 51 $core->blog->settings->tagflash->put('active', $tagflash_active, 'boolean'); 52 52 53 53 if (!empty($_POST['tagflash_width'])) { 54 54 $tagflash_width = trim($_POST['tagflash_width'], " /\n\t\r\0\x0B"); 55 55 $core->blog->settings->tagflash->put('width', $tagflash_width, 'string'); 56 56 } 57 57 58 58 if (!empty($_POST['tagflash_height'])) { 59 59 $tagflash_height = trim($_POST['tagflash_height'], " /\n\t\r\0\x0B"); 60 60 $core->blog->settings->tagflash->put('height', $tagflash_height, 'string'); 61 61 } 62 62 63 63 if (!empty($_POST['tagflash_bgcolor'])) { 64 64 $tagflash_bgcolor = trim($_POST['tagflash_bgcolor'], " /\n\t\r\0\x0B"); 65 65 $core->blog->settings->tagflash->put('bgcolor', $tagflash_bgcolor, 'string'); 66 66 } 67 67 68 68 if (!empty($_POST['tagflash_color1'])) { 69 69 $tagflash_color1 = trim($_POST['tagflash_color1'], " /\n\t\r\0\x0B"); 70 70 $core->blog->settings->tagflash->put('color1', $tagflash_color1, 'string'); 71 71 } 72 72 73 73 if (!empty($_POST['tagflash_color2'])) { 74 74 $tagflash_color2 = trim($_POST['tagflash_color2'], " /\n\t\r\0\x0B"); 75 75 $core->blog->settings->tagflash->put('color2', $tagflash_color2, 'string'); 76 76 } 77 77 78 78 if (!empty($_POST['tagflash_hicolor'])) { 79 79 $tagflash_hicolor = trim($_POST['tagflash_hicolor'], " /\n\t\r\0\x0B"); 80 80 $core->blog->settings->tagflash->put('hicolor', $tagflash_hicolor, 'string'); 81 81 } 82 82 83 83 if (!empty($_POST['tagflash_speed'])) { 84 84 $tagflash_speed = (int)trim($_POST['tagflash_speed'], " /\n\t\r\0\x0B"); … … 89 89 } 90 90 91 $core->blog->triggerBlog(); 91 $core->blog->triggerBlog(); 92 92 $message = __('Configuration successfully updated.'); 93 93 } catch (Exception $e) { -
plugins/tagflash/locales/en/resources.php
r3306 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+ -
plugins/tagflash/locales/fr/resources.php
r3306 r3335 3 3 // | tagFlash - a plugin for Dotclear | 4 4 // +-----------------------------------------------------------------------+ 5 // | Copyright(C) 2010,201 4Nicolas Roudaire http://www.nikrou.net |5 // | Copyright(C) 2010,2015 Nicolas Roudaire http://www.nikrou.net | 6 6 // | Copyright(C) 2010 Guenaël | 7 7 // +-----------------------------------------------------------------------+
Note: See TracChangeset
for help on using the changeset viewer.