插件目录

变更集1296625


忽略:
时间戳:
2015年11月29日上午09:58:37(9年(之前)
作者:
AeonOfTime公司
消息:

准备了v1.9版本。

位置:
eve-shipinfo/干线
文件夹:
新增44个
2已删除
10编辑
2个已移动

图例:

未修改
补充
远离的
  • eve-shipinfo/trunk/classes/EVEShipInfo.php

    1237087元 1296625兰特  
    348348公共函数getThemeID()
    349349    {
    350 return$this->getOption('theme','Light');
     350$themeID=strtollower($this->getOption('theme','light'));
     351if(isset($this->themes[$themeID])){
     352返回$themeID;
     353        }
     354       
     355重置($this->主题);
     356       
     357返回键($this->themes);
    351358    }
    352359   
     
    354361    {
    355362$this->setOption('theme',$id);
     363    }
     364   
     365公共函数themeIDExists($id)
     366    {
     367返回isset($this->themes[$id]);
     368    }
     369   
     370公共函数themeSubstyleExists($id,$substyle)
     371    {
     372if(!isset($this->themes[$id]){
     373返回false;
     374        }
     375       
     376foreach($this->themes[$id]['substyles']作为$def){
     377if($def['name']==$substyle){
     378返回true;
     379            }
     380        }
     381       
     382返回false;
     383    }
     384   
     385公共函数setThemeSubstyle($substyle)
     386    {
     387$this->setOption('tee-substyle',$substyle);
     388    }
     389   
     390公共函数getThemeSubstyle()
     391    {
     392$themeID=$this->getThemeID();
     393if(空($this->themes[$themeID]['substyles']){
     394返回null;
     395        }
     396       
     397$substyle=$this->getOption('theme-substyle','');
     398if($this->themeSubstyleExists($themeID,$substyle)){
     399返回$substyle;
     400        }
     401       
     402return$this->themes[$themeID]['substyles'][0]['name'];
    356403    }
    357404   
     
    363410   
    364411   /**
    365 *初始化插件的主题。主题只是一个CSS文件,
    366     *(例如ThemeLight.css),它扩展了基本css文件,
    367     *EVEShipInfo.css,它处理基本元素结构。
     412*初始化插件的主题。这些存储在主题中
     413    *子文件夹,并具有自己的css文件和图像,并且可以具有
     414    *任意数量的子样式,例如用于不同颜色。
    368415    */
    369416受保护函数handle_initThemes()
    370417    {
    371418$this->注册表主题(
    372             'L(左)右侧',
     419            '右侧',
    373420__('Light','EVEShipInfo'),
    374 __(A)轻松主题博客的主题s.’,‘EVEShipInfo’)
     421__(A)光主题布局的极简主题s.','EVEShipInfo')
    375422        );
    376423
    377424$this->注册表主题(
    378             'D类方舟',
     425            'd日方舟',
    379426__(“深色”,“EVEShipInfo”),
    380 __(“黑暗主题博客的主题。”,“EVEShipInfo”)
     427__(“暗主题布局的极简主题。”,“EVEShipInfo”)
     428        );
     429       
     430$this->注册表主题(
     431“sytek”,
     432“Sytek”,
     433__(“带有颜色子样式的时尚深色主题”,“EVEShipInfo”),
     434阵列(
     435阵列(
     436“name”=>“外星人”,
     437“label”=>“Alien green”
     438                ),
     439阵列(
     440“name”=>“star-trek”,
     441“label”=>“Star Trek蓝色”
     442                ),
     443阵列(
     444“name”=>“火星攻击”,
     445'label'=>'火星攻击橙色'
     446                ),
     447阵列(
     448“name”=>“shaun-of-the-red”,
     449“label”=>“红色肖恩”
     450                ),
     451阵列(
     452“name”=>“power-rangers”,
     453'label'=>'Power Rangers粉色'
     454                ),
     455            )
    381456        );
    382457    }
     
    390465*@param字符串$label
    391466*@param字符串$description
    392     */
    393 受保护的函数注册表主题($id、$label、$description)
     467*@param数组$substyles
     468    */
     469受保护的函数registerTheme($id、$label、$description、$substyles=array())
    394470    {
    395471$this->themes[$id]=数组(
    396472'label'=>$label,
    397 “description”=>$description
     473“description”=>$description,
     474“子样式”=>$substyles
    398475        );
    399476    }
     
    514591wp_register_script('eveshipinfo_admin_fittingslist',$this->getScriptURL('admin/fittingslist.js'),数组('jquery'));
    515592wp_enqueue_script('eveshipinfo_admin_fittingslist');
     593wp_register_script('eveshipinfo_admin_themes',$this->getScriptURL('admin/themes.js'),数组('jquery'));
     594wp_enqueue_script('eveshipinfo_admin_themes');
    516595wp_register_style('eveshipinfo_admin',$this->getScriptURL('admin.css'));
    517596wp_enque_style('veshipinfo_admin');
     
    534613wp_enqueue_style('eveshipinfo');
    535614       
    536 wp_register_style('eveshipinfo_theme',$this->getScriptURL('theme'.$this->getThemeID().')。css’),数组('eveshipinfo');
     615$themeID=$this->getThemeID();
     616wp_register_style('eveshipinfo_theme',$this->getURL()。'/主题/'$主题ID为'/'$他们自己。”。css’,数组('eveshipinfo');
    537617wp_enqueue_style('eveshipinfo_theme');
     618       
     619$substyle=$this->getThemeSubstyle();
     620if(!空($substyle)){
     621$url=$this->getURL()。'/主题/'$主题我。“/”$子样式。“/”$子样式。css’;
     622wp_register_style('eveshipinfo_substyle',$url,数组('evesipinfo'));
     623wp_enqueue_style('eveshipinfo_substyle');
     624        }
    538625    }
    539626   
  • eve-shipinfo/trunk/classes/EVEShipInfo/Admin/Page/Main/Themes.php

    1237087元 1296625兰特  
    1515受保护函数_render()
    1616    {
    17 $此->c创建主题表单();
     17$此->c检查请求();
    1818       
    19 if($this->form->isSubmitted()&&$this->form->validate()){
    20 $values=$this->form->getValues();
    21 $this->plugin->setThemeID($values['themeID']);
     19$box=$this->ui->createStuffBox(__(“前端主题”,“EVEShipInfo”))
     20->setIcon($this->ui->icon()->theme())
     21->设置摘要(
     22__(“这让您可以在船弹出窗口和EFT配件的捆绑前端主题中进行选择。”,“EVEShipInfo”)。”。
     23“<b>”__(“提示:”,“EVEShipInfo”)。”</b> '。
     24__('单击主题预览缩略图以将其最大化。','EVEShipInfo')
     25        )
     26->设置内容($this->renderThemeSelect());
     27       
     28return$box->render();
     29    }
     30   
     31受保护的函数checkRequest()
     32    {
     33if(isset($_REQUEST[“主题ID”])&&$this->plugin->themeIDExists($_REQUEST[“主题ID”]))
     34        {
     35$themeID=$_REQUEST['themeID'];
     36$this->plugin->setThemeID($themeID);
     37               
     38if(isset($_REQUEST['substyle'])&&$this->plugin->themeSubstyleExists($themeID,$_REQUEST['subtyle'])){
     39$this->plugin->setThemeSubstyle($_REQUEST['substyle']);
     40            }
     41               
    2242$this->addSuccessMessage(sprintf(
    2343__(“前端主题已在%2$s成功设置为%1$s”,“EVEShipInfo”),
     
    2646            ));
    2747        }
    28        
    29 $box=$this->ui->createStuffBox(__(“前端主题”,“EVEShipInfo”))
    30 ->设置图标($this->ui->icon()->theme())
    31 ->setAbstract(__('这让您可以从船弹出窗口和EFT配件的捆绑前端主题中选择一个。','EVEShipInfo'))
    32 ->setContent($this->form->render());
    33        
    34 return$box->render();
    3548    }
    3649   
    37 受保护的函数createThemeForm()
     50受保护的$主题;
     51   
     52受保护的$activeThemeID;
     53   
     54受保护的$activeSubstyle;
     55   
     56受保护函数renderThemeSelection()
    3857    {
    39 $themes=$this->plugin->getThemes();
    40 $theme=$this->plugin->getThemeID();
     58$this->themes=$this->插件->getThemes();
     59$this->activeThemeID=$this->插件->获取主题ID();
     60$this->activeSubstyle=$this->插件->获取主题Substyle();
    4161       
    42 $form=$this->createForm(“主题”,数组(“主题ID”=>$theme));
    43 $form->setSubmitLabel(__(“选择主题”,“EVEShipInfo”));
    44 $form->setSubmitIcon($this->ui->icon()->theme());
     62$html(美元)=
     63冲刺(
     64'<script>EVEShipInfo_Themes。BaseURL=%s;EVEShipInfo_主题。PageURL=%s</script>',
     65json_encode($this->plugin->getURL()。'/主题),
     66json_encode($this->getURL())
     67        ).
     68'<div class=“themes-list”>'。
     69$this->renderThemeEntry($this->activeThemeID,true);
    4570       
    46 $group=$form->addRadioGroup('themeID',__('前端主题','EVEShipInfo'));
    47 foreach($themes作为$themeID=>$def){
    48 $组->addItem(
    49 $他们自己,
    50 “<b>”$定义['label']。'</b> <br/><br/>“。
    51 “<i>”$def〔'描述'〕。'</i> <br/>”。
    52 '<img src=“'.$this->plugin->getURL().'/assets/theme-'.$themeID.'.jpg”/>'
    53             );
     71$ids=array_keys($this->themes);
     72foreach($ids作为$themeID){
     73if($themeID!=$this->activeThemeID){
     74$html.=$this->renderThemeEntry($themeID);
     75                }
     76            }
     77$html=
     78“</div>”;
     79       
     80返回$html;
     81    }
     82   
     83受保护函数renderThemeEntry($themeID,$isActive=false)
     84    {
     85$def=$this->主题[$themeID];
     86$jsID=$this->plugin->nextJSID();
     87$clientName=“主题”$jsID;
     88       
     89$label=$def['label'];
     90       
     91$active=“”;
     92if($isActive){
     93$active=“active”;
     94$label.='<span class=“theme-currentname”>'__(“当前主题”,“EVEShipInfo”)。”</span>';
    5495        }
    5596       
    56 $this->form=$form;
     97$thumbURL='preview.jpg';
     98if(!空($def['substyles']){
     99$activeSubstyle=$def['substyles'][0];
     100if($themeID==$this->activeThemeID){
     101foreach($def['substyles']作为$subDef){
     102if($subDef['name']==$this->activeSubstyle){
     103$activeSubstyle=$subDef;
     104断裂;
     105                    }
     106                }
     107            }
     108
     109$thumbURL=$activeSubstyle['name']。'/preview.jpg';
     110        }
     111       
     112$html=冲刺(
     113'<script>%s=EVEShipInfo_Themes。注册(%s,%s,%s)</script>',
     114$clientName,
     115json_encode($jsID),
     116json_encode($themeID),
     117json_encode($def['label'])
     118        ).
     119'<div class=“theme-entry'.$active.'”>'。
     120'<a class=“button button-primary theme-button”href=“javascript:void(0);”onclick=“'.$clientName.'.Apply(\''.$themeID.'\');”>'__(“应用”,“EVEShipInfo”)。”</a> '。
     121'<h3 class=“theme-name”>'$标签。'</h3>’。
     122'<p class=“theme-description”>'$定义['description']。'</p> '。
     123'<img src=“'.$this->plugin->getURL().'/themes/'.$themeID.'/'.$thumbURL.'”class=“theme-tumb”id=“'.$jsID.'-tumb“onclick=”'.$clientName.'.ToggleThumbnail();“/><br/>';
     124       
     125if(!空($def['substyles']){
     126foreach($def['substyles']作为$substyle){
     127$activeS=假;
     128if($substyle['name']==$activeSubstyle['name']){
     129$activeS=真;
     130                    }
     131                   
     132$html=
     133冲刺(
     134“<script>%s.RegisterSubstyle(%s,%s,%s)</script>”,
     135$clientName,
     136json_encode($substyle['name']),
     137json_encode($substyle['label']),
     138json_encode($activeS)
     139                    );
     140                }
     141$html=
     142__('子样式:','EVEShipInfo')。'&quot<span id=“'.$jsID.'-substyle-label”>'$activeSubstyle['label']。'</span>&quot<br/>'。
     143'<a href=“javascript:void(0);”onclick=“'.$clientName.'.Previous();”>&laquo;'__('Previous','EVEShipInfo')。'</a> '。
     144'|<span id=“'.$jsID.'-position”>1</span>/'.count($def['substyles'])。'  | '.
     145'<a href=“javascript:void(0);”onclick=“'.$clientName.'.Next();”>'__(“下一步”,“EVEShipInfo”)。”&拉奎</a> ';
     146            }
     147$html=
     148“<script>jQuery(document).ready(function(){'.$clientName.'.Start();})</script>”。
     149“</div>”。
     150'<div style=“clear:both;”></div>';
     151
     152返回$html;
    57153    }
    58154}
  • eve-shipinfo/trunk/classes/EVEShipInfo/Collection/Ship.php

    1236586兰特 1296625兰特  
    9797公共函数getDescription()
    9898    {
    99 return$this->getPropertyValue('description');
     99静态$descr=空;
     100       
     101//修复了一些奇怪的非utf8字符
     102//数据转储中的描述。
     103if(!isset($descr)){
     104$descr=$this->getPropertyValue('description');
     105$regex='/((?:[\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x800-\xBB]{3}){1100})|/x’;
     106$descr=preg_replace($regex,'$1',$descr);
     107        }
     108       
     109返回$descr;
    100110    }
    101111   
     
    187197公共函数getPowerToSpeed()
    188198    {
    189 return$this->getAttribute(“powerToSpeed”);
     199return$this->getAttribute价值(“powerToSpeed”);
    190200    }
    191201   
     
    271281$name=$区域$类型。'损伤共振’;
    272282       
    273 return$this->getAttribute($name,$units);
     283return$this->getAttribute价值($name,$units);
    274284    }
    275285   
     
    888898self::$registeredShips[$shipID]=true;
    889899       
     900$encoded=json_encode($this->exportData());
     901if(!$编码){
     902返回“”;
     903        }
     904       
    890905返回
    891906“<script>”。
    892907冲刺(
    893908“EVEShipInfo.AddShip(%s);”,
    894                json_encode($this->exportData())
     909               $编码
    895910            ).
    896911“</script>”;
  • eve-shipinfo/trunk/classes/EVEShipInfo/Collection/Ship/Attribute.php

    999633卢比 1296625兰特  
    9393if($漂亮){
    9494$tokens=爆炸('.',$value);
    95 $0000=$token[0];
    9695if(isset($令牌[1])){
    9796返回number_format($value,2);
     
    102101       
    103102返回$value;
     103    }
     104   
     105   /**
     106*以字符串形式检索属性值
     107*机组名称(如有)。
     108    *
     109*示例:500 m/s
     110    *
     111*@返回字符串
     112    */
     113公共函数getValuePretty()
     114    {
     115$result=$this->getValue(true);
     116       
     117$units=$this->getUnitName();
     118if(!空($单位)){
     119$result.=“”$单位;
     120        }
     121       
     122返回$result;
    104123    }
    105124   
  • eve-shipinfo/trunk/classes/EVEShipInfo/Plugin.php

    1236586兰特 1296625兰特  
    2222    }
    2323   
     24受保护的$galleryURL;
     25   
    2426公共函数getGalleryURL()
    2527    {
    26 返回$this->url。'/画廊';
    27     }
     28if(isset($this->galleryURL)){
     29return$this->galleryURL;
     30        }
     31       
     32$upload_dir=wp_upload_dir();
     33$path=$upload_dir['basedir']。'/eve-shipinfo';
     34if(is_dir($path)){
     35           
     36return$upload_dir['baseurl']。'/eve-shipinfo';
     37}其他{
     38$url=$this->url。”/画廊';
     39        }
     40       
     41$this->galleryURL=$url;
     42返回$url;
     43    }
     44   
     45受保护的$galleryPath;
    2846   
    2947公共函数getGalleryPath()
    3048    {
    31 return$this->dir.'/gallower';
     49if(isset($this->galleryPath)){
     50return$this->galleryPath;
     51        }
     52       
     53$upload_dir=wp_upload_dir();
     54$path=$upload_dir['basedir']。'/eve-shipinfo';
     55       
     56if(!is_dir($path)){
     57$path=$this->dir.'/gallower';
     58        }
     59       
     60$this->galleryPath=$path;
     61return$path;
    3262    }
    3363   
  • eve-shipinfo/trunk/css/admin.css

    1237087元 1296625兰特  
    120120边距-底部:8px;
    121121}
     122
     123.theme条目.theme按钮{
     124位置:相对;
     125顶部:10倍;
     126}
     127
     128.主题列表{
     129边距顶部:40px;
     130}
     131
     132.theme电子条目{
     133左边边距:30px;
     134边距-底部:30px;
     135填充:16px;
     136浮动:左;
     137明确:两者都有;
     138边框:实心1px#dedede;
     139背景:fafafa;
     140方框阴影:0 1px 20px 5px rgba(0,0,0,.1);
     141}
     142
     143.theme当前名称{
     144位置:相对;
     145顶部:-5px;
     146背景:#32373c;
     147颜色:#fff;
     148填充:2px 8px;
     149边距:2px;
     150显示:嵌入式块;
     151字体大小:11px;
     152font-weight:正常;
     153左边边距:9px;
     154}
     155
     156.theme条目.theme描述{
     157字体样式:斜体;
     158}
     159
     160.theme条目.theme名称{
     161填充:0!重要;
     162边距:0!重要;
     163字体大小:32px!重要;
     164font-weight:100!重要;
     165}
     166
     167.theme条目.theme按钮{
     168浮动:右;
     169}
     170
     171.theme拇指{
     172宽度:400px;
     173光标:放大;
     174}
     175
     176.theme-tumb.maximized{
     177宽度:自动;
     178光标:缩小;
     179}
  • eve-shipinfo/trunk/eve-shipinfo.php

    1294251元 1296625兰特  
    44*插件URI:http://aeonoftime.com/EVE_Online_Tools/EV-ShipInfo-WordPress-Plugin
    55*说明:在WordPress网站中放置EVE Online发货数据库,以及高质量的屏幕截图和专门的短代码。
    6 *版本:1。8
     6*版本:1。9
    77*作者:Sebastian Mordziol
    88*作者URI:http://www.aeonoftime.com
  • eve-shipinfo/trunk/readme.txt

    294251卢比 1296625兰特  
    44要求至少:3.5
    55测试达到:4.3
    6 稳定标签:1。8
     6稳定标签:1。9
    77许可证:GPLv3
    88许可证URI:https://www.gnu.org/licenses/gpl-3.0.txt
     
    2222*极其可定制的发货清单短代码
    2323*船廊短代码
     24*船舶信息弹出窗口的可切换主题
    2425*EFT配件进口商和管理:在船旁或使用短代码单独展示您的配件
    2526*完整集成的短代码参考
     
    5051
    5152==变更日志==
     53
     54= 1.9 =
     55*修复了一个编码错误,该错误可能导致某些船只弹出窗口无法工作
     56*修复了发货属性API中的一些一致性问题
     57*修复了每次更新插件时删除的屏幕截图库:库现在必须存储在wp-content/uploads文件夹中。
     58*添加了对主题子样式的支持
     59*添加了带有颜色子样式的新自定义深色主题
    5260
    5361= 1.8 =
注:请参阅Trac变更集获取有关使用变更集查看器的帮助。