示例#1
0
文件: Action.php 项目: kirileec/usr
 public function updateLink()
 {
     if (Links_Plugin::form('update')->validate()) {
         $this->response->goBack();
     }
     /** 取出数据 */
     $link = $this->request->from('lid', 'name', 'sort', 'image', 'url', 'description', 'user');
     /** 更新数据 */
     $this->db->query($this->db->update($this->prefix . 'links')->rows($link)->where('lid = ?', $link['lid']));
     /** 设置高亮 */
     $this->widget('Widget_Notice')->highlight('link-' . $link['lid']);
     /** 提示信息 */
     $this->widget('Widget_Notice')->set(_t('链接 <a href="%s">%s</a> 已经被更新', $link['url'], $link['name']), NULL, 'success');
     /** 转向原页 */
     $this->response->redirect(Typecho_Common::url('extending.php?panel=Links%2Fmanage-links.php', $this->options->adminUrl));
 }
示例#2
0
 /**
  * 激活插件方法,如果激活失败,直接抛出异常
  * 
  * @access public
  * @return void
  * @throws Typecho_Plugin_Exception
  */
 public static function activate()
 {
     try {
         Links_Plugin::linksInstall();
         $err = '建立友情链接数据表,插件启用成功';
     } catch (Typecho_Db_Exception $e) {
         $code = $e->getCode();
         if (1050 == $code) {
             $err = '友情链接数据表已经存在,插件启用成功';
         } else {
             return _t('友情链接插件启用失败');
         }
     }
     Helper::addPanel(3, 'Links/manage-links.php', '友情链接', '', 'administrator');
     Helper::addAction('links-edit', 'Links_Action');
     return _t($err);
 }
示例#3
0
    exit;
}
$this->need('header.php');
?>

<div class="main-inner">
    <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
        <div class="post-header">
			<h2 class="post-title"><?php 
$this->title();
?>
</h2>
		</div>
        <div class="post-content" itemprop="articleBody">
            <?php 
$this->content();
?>
			<ul class="tag-list flinks">
				<?php 
Links_Plugin::output(null, 0, '');
?>
			</ul>
        </div>
		
    </article>
    <?php 
$this->need('comments.php');
?>
</div><!-- end #main-->
<?php 
$this->need('footer.php');
    _e('没有任何链接');
    ?>
</h6></td>
                            </tr>
                            <?php 
}
?>
                        </tbody>
                    </table>
                    <input type="hidden" name="do" value="delete" />
                    </form>
                </div>

                <div class="column-08 typecho-mini-panel typecho-radius-topleft typecho-radius-topright typecho-radius-bottomleft typecho-radius-bottomright">
						<?php 
Links_Plugin::form()->render();
?>
                </div>

        </div>
    </div>
</div>

<?php 
include 'copyright.php';
include 'common-js.php';
?>

<script type="text/javascript">
    (function () {
        window.addEvent('domready', function() {
示例#5
0
文件: Plugin.php 项目: kirileec/usr
 /**
  * 解析
  * 
  * @access public
  * @param array $matches 解析值
  * @return string
  */
 public static function parseCallback($matches)
 {
     $db = Typecho_Db::get();
     $pattern = $matches[3];
     $links_num = $matches[1];
     $sort = $matches[2];
     return Links_Plugin::output_str($pattern, $links_num, $sort);
 }
示例#6
0
    _e('文章分类');
    ?>
</h3>
                <ul class="sidepan clear">
                    <?php 
    $this->widget('Widget_Metas_Category_List')->parse('<li><a href="{permalink}">{name}</a> ({count})</li>');
    ?>
                </ul>
            </section>
<?php 
}
if (empty($this->options->sidebarBlock) || in_array('ShowLink', $this->options->sidebarBlock)) {
    if ($this->is('index')) {
        ?>
            <section class="sidelink"> 
                <h3><?php 
        _e('友情链接');
        ?>
</h3>
                <ul class="sidepan clear">
                    <?php 
        Links_Plugin::output("SHOW_TEXT", 0, "Index");
        ?>
                </ul>
            </section>
<?php 
    }
}
?>
        </aside>
示例#7
0
<main id="main" class="main">
  <div class="main-inner">
    <div id="content" class="content">
 <div id="posts" class="posts-expand">
          <?php 
$this->content();
?>
  
          <?php 
if (class_exists("Links_Plugin")) {
    ?>
  
<div class="links-of-author" style="margin-top:60px;">
    <p style="margin: 0 0 10px 0;"><strong>友情链接</strong></p>
    <?php 
    Links_Plugin::output('<span class="links-of-author-item"><a href="{url}" title="{title}" target="_blank">{name}</a></span>');
    ?>
</div>
    <?php 
}
?>
</div>
</div>
<?php 
$this->need('comments.php');
?>
</div>
<?php 
$this->need('sidebar.php');
?>
</main>
示例#8
0
"><?php 
    $pages->title();
    ?>
</a>
				<?php 
}
?>
  		</nav>
  		
  		<?php 
if ($this->options->linksSupport) {
    ?>
  		<br />
  		<nav class="sidebar-nav side-bar-links">
  		  <?php 
    Links_Plugin::output($pattern = '<a class="sidebar-nav-item" href="{url}" title="{title}" target="_blank">{name}</a>', $links_num = 0, $sort = NULL);
    ?>
  		</nav>
  		<?php 
}
?>
  		
  		<div class="sidebar-item">
  			<p>
  				&copy; <?php 
echo date('Y');
?>
. All rights reserved.
  			</p>
  		</div>
    </div>
    <!-- Sidebar hamburger button -->
    <button class="MD-burger-icon sidebar-toggle">
<span class="MD-burger-layer"></span>
</button>

    <div class="md-links">
        <?php 
if (class_exists("Links_Plugin")) {
    ?>
        <?php 
    Links_Plugin::output('
        <a href="{url}" title="{title}" target="_blank">
            <li class="md-links-item">
                <img src="{image}" alt="{name}" width="72px"/>
                <span  class="md-links-title">{name}</span><br />
                <span>{description}</span>
            </li>
        </a>
        ');
    ?>
        <?php 
}
?>
    </div>


    <?php 
include 'sidebar.php';
?>
    <?php 
示例#10
0
文件: fav.php 项目: SkyFire-Lee/luhu
    exit;
}
$this->need('header.php');
?>

<div class="wrapper container" role="main">
    <article class="post no-line" itemscope itemtype="http://schema.org/BlogPosting">
        <h1 class="post-title" itemprop="name headline"><?php 
$this->title();
?>
</h1>
        <div class="post-content" itemprop="articleBody">
            <h3>阅读列表</h3>
            <ul class="links fav-list">
            <?php 
Links_Plugin::output($pattern = '<li class="clearfix"><a href="{url}" title="{title}" target="_blank" rel="nofollow">阅读</a><div class="link-des">{name}</div></li>', $links_num = 0, $sort = read);
?>
            </ul>
            <h3>个人收藏</h3>
            <ul class="links site-list clearfix">
                <?php 
Links_Plugin::output($pattern = NULL, $links_num = 0, $sort = link);
?>
            </ul>
        </div>
    </article>
</div>

<?php 
$this->need('footer.php');
$this->need('sidebar.php');
示例#11
0
<?php

if (!defined('__TYPECHO_ROOT_DIR__')) {
    exit;
}
?>
<footer class="footer">
    <div class="wrapper btm clearfix">
        <div class="btm-nav">
            <?php 
if ($this->is('index')) {
    ?>
                <h3 class="btm-title">友情链接</h3>
                <ul class="btm-list links clearfix">
                    <?php 
    Links_Plugin::output($pattern = NULL, $links_num = 10, $sort = NULL);
    ?>
                </ul>
            <?php 
} else {
    ?>
                <h3 class="btm-title">最新文章</h3>
                <ul class="btm-list">
                    <?php 
    $this->widget('Widget_Contents_Post_Recent')->to($post);
    ?>
                    <?php 
    while ($post->next()) {
        ?>
                        <li><a href="<?php 
        $post->permalink();
示例#12
0
                <?php 
Links_Plugin::output("SHOW_TEXT", 0, "主要");
?>
              </ul>

              <ul class="nav nav-pills nav-justified" role="tablist">
              <?php 
Links_Plugin::output("SHOW_TEXT", 0, "常用");
?>
              </ul>
              <h4 class="bhl_divider grey" style="margin:5px 0;">
                更多
              </h4>
              <ol class="breadcrumb">
                <?php 
Links_Plugin::output("SHOW_TEXT", 0, "其他");
?>
              </ol>        
            </div>
          </div> <!-- .row -->
        </div> <!-- .container -->
      </div> <!-- .bhl_footer -->

    </div> <!-- .site-wrapper -->

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="http://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="http://cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
示例#13
0
    <section class="widget widget-tag">
        <h3>热门标签</h3>
        <div class="tag-cloud">
            <?php 
        $this->widget('Widget_Metas_Tag_Cloud', 'ignoreZeroCount=true&limit=15')->parse('<a href="{permalink}" class="tag-link-{count}" title="{count}个话题" style="font-size: 14px;">{name} ({count})</a>');
        ?>
        </div>
    </section>
     <?php 
    }
    ?>
    <section class="widget">
        <h3 class="widget-title"><?php 
    _e('友情链接');
    ?>
</h3>
        <ul class="widget-list">
            <?php 
    Links_Plugin::output("<li><a class=\"item\" href=\"{url}\" title=\"{title}\" target=\"_blank\"><p class=\"header\">{name}</p><p>{description}</p></a></li>\n", 10);
    ?>
        </ul>
    </section>
<?php 
}
?>
    <!-- 只在首页显示 -->

</div>
    <div id="fixed"></div>
</aside><!-- end #sidebar -->
示例#14
0
    ?>
                    友情链接
                <?php 
}
?>
                <b class="caret"></b>
            </a>
            <ul class="dropdown-menu">
                <?php 
if (class_exists("Links_Plugin")) {
    ?>
                    <?php 
    Links_Plugin::output('
                    <li>
                        <a href="{url}" target="_blank" itle="{title}">
                            {name}
                        </a>
                    </li>
                    ');
    ?>
                <?php 
}
?>
            </ul>
        </li>

        <?php 
if (!defined('__TYPECHO_ROOT_DIR__')) {
    exit;
}
Typecho_Widget::widget('Widget_Stat')->to($stat);
示例#15
0
?>
</br>
</a>本博客由<a href="http://www.upyun.com"><img src="https://www.upyun.com/assets/league/180X90.png"/></a>提供CDN加速</br>
				<?php 
if ($this->options->cnzzCode) {
    ?>
		        <?php 
    $this->options->cnzzCode();
    ?>
		        <?php 
}
?>
			</div>
			<div class="footer-right">
				<?php 
Links_Plugin::output();
?>
			</div>
			<div class="clearfix"></div>
		</div>
	</div>
	<script type="text/javascript">
	$('.loading').animate({'width':'78%'},50);
	</script>
	<?php 
$this->footer();
?>

	<?php 
if (!empty($this->options->extPlugin) && in_array('UseFancybox', $this->options->extPlugin)) {
    ?>
示例#16
0
    </section>
    <?php 
}
?>

    <?php 
if (!empty($this->options->sidebarBlock) && in_array('ShowFriend', $this->options->sidebarBlock)) {
    ?>
    <section class="block friend-list">
        <p class="ui <?php 
    $this->options->labelColor();
    ?>
 ribbon label">友情链接</p>
        <div class="animated list friend">
            <?php 
    Links_Plugin::output("<a class=\"item\" href=\"{url}\" title=\"{title}\" target=\"_blank\"><img class=\"avatar image\" src=\"{image}\" alt=\"{name}\" /><div class=\"content\"><p class=\"header\">{name}</p><p>{description}</p></div></a>\n", 10);
    ?>
        </div>
    </section>
    <?php 
}
?>

    <?php 
if (!empty($this->options->sidebarBlock) && in_array('ShowCategory', $this->options->sidebarBlock)) {
    ?>
    <section class="block">
        <p class="ui <?php 
    $this->options->labelColor();
    ?>
 ribbon label"><?php 
示例#17
0
        </ul>
	</section>
    <?php 
}
?>
    <?php 
$all_plugins = Typecho_Plugin::export();
?>
    <?php 
if (array_key_exists('Links', $all_plugins['activated'])) {
    ?>
    <section class="widget">
        <h3 class="widget-title">Links</h3>
        <ul class="widget-list">
        <?php 
    Links_Plugin::output("SHOW_TEXT", 10);
    ?>
        </ul>
    </section>
    <?php 
}
?>
    <?php 
if (!empty($this->options->sidebarBlock) && in_array('ShowOther', $this->options->sidebarBlock)) {
    ?>
	<section class="widget">
		<h3 class="widget-title"><?php 
    _e('其它');
    ?>
</h3>
        <ul class="widget-list">
        <i class="fa fa-globe"></i> SF
    </a>
  </span>
            </div>
            <?php 
if (class_exists("Links_Plugin")) {
    ?>
                <div class="motion-element" <?php 
    if ($this->options->sidebarFlinks == 'hide') {
        echo 'hidden';
    }
    ?>
>
                    <div class="friend-link-title">友情链接</div>
                    <?php 
    Links_Plugin::output('<span class="friend-link-item"><a href="{url}" title="{title}" target="_blank">{name}</a></span>');
    ?>
                </div>
            <?php 
}
?>
        </section>
        <?php 
if ($this->is('post')) {
    ?>
            <section class="post-toc-wrap sidebar-panel-active motion-element">
                <div class="post-toc-indicator-top post-toc-indicator"></div>
                <div class="post-toc">
                    <p class="post-toc-empty">此文章未包含目录</p>
                </div>
            </section>