Example #1
0
					<img src="http://<?php 
echo TemplateHelper::getSiteUrl();
?>
/ico/rss2.png" width="16" height="16" alt="" />
					<a href="http://<?php 
echo TemplateHelper::getSiteUrl();
?>
/news/all/rss.xml">Все</a> |
					<img src="http://<?php 
echo TemplateHelper::getSiteUrl();
?>
/ico/jabber.png" width="16" height="16" alt="" />
					<a href="xmpp:bot@1chan.ru?roster;name=1chan.ru;">Jabber-бот</a>
				</div>
				<?php 
$_footer_links = Blog_BlogLinksModel::GetLinks();
?>
				<div class="b-footer-imgboards">
					<h2>Имиджборды:</h2>
					<ul>
					<?php 
foreach ($_footer_links['imgboards'] as $link) {
    ?>

						<li>
						<?php 
    if (@$link['offline']) {
        ?>

							<img src="http://<?php 
        echo TemplateHelper::getSiteUrl();
Example #2
0
 /**
  * Управление ссылками:
  */
 public function blogLinksAction(Application $application, Template $template)
 {
     $template->setParameter('menu', 'posts');
     $template->setParameter('submenu', 'links');
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $links = array();
         $imgboards = explode("\n", $_POST['imgboards']);
         $services = explode("\n", $_POST['services']);
         foreach ($imgboards as $str) {
             if (empty($str)) {
                 continue;
             }
             list($href, $title) = explode(' | ', $str);
             $links['imgboards'][] = array('href' => $href, 'title' => $title);
         }
         foreach ($services as $str) {
             if (empty($str)) {
                 continue;
             }
             list($href, $title) = explode(' | ', $str);
             $links['services'][] = array('href' => $href, 'title' => $title);
         }
         Blog_BlogLinksModel::SetLinks($links);
     }
     $links = Blog_BlogLinksModel::GetLinks();
     $imgboards = '';
     $services = '';
     foreach ($links['imgboards'] as $link) {
         $imgboards .= $link['href'] . " | " . $link['title'] . "\n";
     }
     foreach ($links['services'] as $link) {
         $services .= $link['href'] . " | " . $link['title'] . "\n";
     }
     $this['imgboards'] = $imgboards;
     $this['services'] = $services;
     return true;
 }