当前位置: 首页>>代码示例>>PHP>>正文


PHP cmsTagLine函数代码示例

本文整理汇总了PHP中cmsTagLine函数的典型用法代码示例。如果您正苦于以下问题:PHP cmsTagLine函数的具体用法?PHP cmsTagLine怎么用?PHP cmsTagLine使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了cmsTagLine函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cmsTagBar

function cmsTagBar($target, $item_id, $selected=''){
    if ($tagline = cmsTagLine($target, $item_id, true, $selected)){
        return '<div class="taglinebar"><span class="label">Теги: </span><span class="tags">'.$tagline.'</span></div>';
    } else {
        return '';
    }
}
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:7,代码来源:lib_tags.php

示例2: eventGetArticle

    private function eventGetArticle($item) {
        global $_LANG;

        $item_id = $item['id'];
        $tag_arr = explode(', ', cmsTagLine('content', $item_id, false));
        $id_target = array();

        // Получаем id назначения таких же тегов, не более пяти на каждый
        foreach ($tag_arr as $tag) {
            $sql = "SELECT item_id FROM cms_tags WHERE tag = '$tag' AND item_id<>'$item_id' AND target='content' LIMIT 5";
            $rs = cmsCore::c('db')->query($sql) ;
            if (cmsCore::c('db')->num_rows($rs)) {
                while ($tagitem = cmsCore::c('db')->fetch_assoc($rs)) {
                    $id_target[]= $tagitem['item_id'];
                }
            }
        }

        if (count($id_target)) {
            $id_target	= array_unique($id_target);
            $id_target 	= array_slice($id_target, 0, $this->config['P_LIMIT']);
            if ($this->config['P_UNSORT']) { shuffle($id_target); }

            $morecontent = '';
            foreach ($id_target as $n) {
                $con = cmsTagItemLink('content', $n);
                if ($con) {
                    $morecontent .= '<p>'. $con ."</p>";
                }
            }
            if ($morecontent) { $item['content'] .= '<h4>'. $_LANG['P_SIMILAR_ARTICLES'] .':</h4>'. $morecontent; }
        }
        
        return $item;
    }
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:35,代码来源:plugin.php

示例3: cmsTagBar

function cmsTagBar($target, $item_id, $selected = '')
{
    global $_LANG;
    if ($tagline = cmsTagLine($target, $item_id, true, $selected)) {
        return '<div class="taglinebar"><i class="fa fa-tags fa-lg"></i> <span class="label">' . $_LANG['TAGS'] . ': </span><span class="tags">' . $tagline . '</span></div>';
    } else {
        return '';
    }
}
开发者ID:deltas1,项目名称:icms1,代码行数:9,代码来源:lib_tags.php

示例4: getPosts

 /**
  * Получает посты по условиям
  * @param bool $show_all
  * @param obj $ownerModel
  * @return array $posts
  */
 public function getPosts($show_all = false, $ownerModel, $is_short = false)
 {
     $pub_where = $show_all ? '1=1' : 'p.published = 1';
     if (isset($this->owner)) {
         $pub_where .= " AND b.owner = '{$this->owner}'";
     }
     $sql = "SELECT p.*,\r\n                       u.nickname as author, u.login, u.is_deleted,\r\n                       b.allow_who as blog_allow_who,\r\n                       b.seolink as bloglink,\r\n                       b.title as blog_title,\r\n                       b.owner as owner {$this->inDB->select}\r\n                FROM cms_blog_posts p\r\n\t\t\t\tINNER JOIN cms_blogs b ON b.id = p.blog_id\r\n\t\t\t\tLEFT JOIN cms_users u ON u.id = p.user_id\r\n\t\t\t\t{$this->inDB->join}\r\n                WHERE {$pub_where}\r\n\t\t\t\t      {$this->inDB->where}\r\n                {$this->inDB->group_by}\r\n                {$this->inDB->order_by}\n";
     if ($this->inDB->limit) {
         $sql .= "LIMIT {$this->inDB->limit}";
     }
     $result = $this->inDB->query($sql);
     $this->inDB->resetConditions();
     if (!$this->inDB->num_rows($result)) {
         return false;
     }
     $posts = array();
     while ($post = $this->inDB->fetch_assoc($result)) {
         $post['fpubdate'] = cmsCore::dateFormat($post['pubdate']);
         $post['url'] = $ownerModel->getPostURL($post['bloglink'], $post['seolink']);
         $post['blog_url'] = $ownerModel->getBlogURL($post['bloglink']);
         //Разбиваем текст поста на 2 части по тегу [cut=...] и оставляем только первую из них
         if (mb_strstr($post['content_html'], '[cut')) {
             $post['content_html'] = $this->getPostShort($post['content_html'], $post['url']);
         }
         if (!$is_short) {
             $post['tagline'] = cmsTagLine($this->getTarget('tags'), $post['id']);
         }
         // если захотим получать аватар владельца
         if (isset($post['imageurl'])) {
             $post['author_avatar'] = cmsUser::getUserAvatarUrl($post['user_id'], 'small', $post['imageurl'], $post['is_deleted']);
         }
         $posts[] = $post;
     }
     return cmsCore::callEvent('GET_POSTS', $posts);
 }
开发者ID:deltas1,项目名称:icms1,代码行数:41,代码来源:blog.class.php

示例5: content


//.........这里部分代码省略.........
            if ($do == 'addarticle') {
                $pagetitle = $_LANG['ADD_ARTICLE'];
                $inPage->setTitle($pagetitle);
                $inPage->addPathway($_LANG['USERS'], '/' . str_replace('/', '', cmsUser::PROFILE_LINK_PREFIX));
                $inPage->addPathway($inUser->nickname, cmsUser::getProfileURL($inUser->login));
                $inPage->addPathway($_LANG['MY_ARTICLES'], '/content/my.html');
                $inPage->addPathway($pagetitle);
                // поддержка биллинга
                if (IS_BILLING) {
                    $action = cmsBilling::getAction('content', 'add_content');
                    foreach ($pubcats as $p => $pubcat) {
                        if ($pubcat['cost']) {
                            $dynamic_cost = true;
                        } else {
                            $pubcats[$p]['cost'] = $action['point_cost'][$inUser->group_id];
                        }
                    }
                    cmsBilling::checkBalance('content', 'add_content', $dynamic_cost);
                }
            }
            // Если редактируем статью
            if ($do == 'editarticle') {
                $pagetitle = $_LANG['EDIT_ARTICLE'];
                $inPage->setTitle($pagetitle);
                $inPage->addPathway($_LANG['USERS'], '/' . str_replace('/', '', cmsUser::PROFILE_LINK_PREFIX));
                if ($item['user_id'] != $inUser->id) {
                    $user = $inDB->get_fields('cms_users', "id='{$item['user_id']}'", 'login, nickname');
                    $inPage->addPathway($user['nickname'], cmsUser::getProfileURL($user['login']));
                } else {
                    $inPage->addPathway($inUser->nickname, cmsUser::getProfileURL($inUser->login));
                }
                $inPage->addPathway($_LANG['MY_ARTICLES'], '/content/my.html');
                $inPage->addPathway($pagetitle);
                $item['tags'] = cmsTagLine('content', $item['id'], false);
                $item['image'] = file_exists(PATH . '/images/photos/small/article' . $item['id'] . '.jpg') ? 'article' . $item['id'] . '.jpg' : '';
                if (!$is_auto_add) {
                    cmsCore::addSessionMessage($_LANG['ATTENTION'] . ': ' . $_LANG['EDIT_ARTICLE_PREMODER'], 'info');
                }
            }
            $inPage->initAutocomplete();
            $autocomplete_js = $inPage->getAutocompleteJS('tagsearch', 'tags');
            $item = cmsCore::callEvent('PRE_EDIT_ARTICLE', @$item ? $item : array());
            cmsPage::initTemplate('components', 'com_content_edit')->assign('mod', $item)->assign('do', $do)->assign('cfg', $model->config)->assign('pubcats', $pubcats)->assign('pagetitle', $pagetitle)->assign('is_admin', $inUser->is_admin)->assign('is_billing', IS_BILLING)->assign('dynamic_cost', $dynamic_cost)->assign('autocomplete_js', $autocomplete_js)->display('com_content_edit.tpl');
        }
        // Пришел запрос на сохранение статьи
        if (cmsCore::inRequest('add_mod')) {
            $errors = false;
            $article['category_id'] = cmsCore::request('category_id', 'int', 1);
            $article['user_id'] = $item['user_id'] ? $item['user_id'] : $inUser->id;
            $article['title'] = cmsCore::request('title', 'str', '');
            $article['tags'] = cmsCore::request('tags', 'str', '');
            $article['description'] = cmsCore::request('description', 'html', '');
            $article['content'] = cmsCore::request('content', 'html', '');
            $article['description'] = cmsCore::badTagClear($article['description']);
            $article['content'] = cmsCore::badTagClear($article['content']);
            $article['published'] = $is_auto_add ? 1 : 0;
            if ($do == 'editarticle') {
                $article['published'] = $item['published'] == 0 ? $item['published'] : $article['published'];
            }
            $article['pubdate'] = $do == 'editarticle' ? $item['pubdate'] : date('Y-m-d H:i');
            $article['enddate'] = $do == 'editarticle' ? $item['enddate'] : $article['pubdate'];
            $article['is_end'] = $do == 'editarticle' ? $item['is_end'] : 0;
            $article['showtitle'] = $do == 'editarticle' ? $item['showtitle'] : 1;
            $article['meta_desc'] = $do == 'addarticle' ? mb_strtolower($article['title']) : $inDB->escape_string($item['meta_desc']);
            $article['meta_keys'] = $do == 'addarticle' ? $inCore->getKeywords($article['content']) : $inDB->escape_string($item['meta_keys']);
            $article['showdate'] = $do == 'editarticle' ? $item['showdate'] : 1;
开发者ID:deltas1,项目名称:icms1,代码行数:67,代码来源:frontend.php

示例6: photos


//.........这里部分代码省略.........
            cmsCore::halt();
        }
        // получаем фото
        $photo = cmsCore::callEvent('GET_PHOTO', $inPhoto->getPhoto($id));
        if (!$photo) {
            cmsCore::halt();
        }
        if (mb_strstr($photo['NSDiffer'], 'club')) {
            cmsCore::halt();
        }
        $is_author = $photo['user_id'] == $inUser->id && $inUser->id;
        if (!$inUser->is_admin && !$is_author) {
            cmsCore::halt();
        }
        if (cmsCore::inRequest('edit_photo')) {
            $mod['title'] = cmsCore::request('title', 'str', '');
            $mod['title'] = $mod['title'] ? $mod['title'] : $photo['title'];
            $mod['description'] = cmsCore::request('description', 'str', '');
            $mod['tags'] = cmsCore::request('tags', 'str', '');
            $mod['comments'] = $inUser->is_admin ? cmsCore::request('comments', 'int') : $photo['comments'];
            if ($model->config['seo_user_access'] || $inUser->is_admin) {
                $mod['pagetitle'] = cmsCore::request('pagetitle', 'str', '');
                $mod['meta_keys'] = cmsCore::request('meta_keys', 'str', '');
                $mod['meta_desc'] = cmsCore::request('meta_desc', 'str', '');
            }
            $file = $model->initUploadClass($inDB->getNsCategory('cms_photo_albums', $photo['album_id']))->uploadPhoto($photo['file']);
            $mod['file'] = $file['filename'] ? $file['filename'] : $photo['file'];
            $inPhoto->updatePhoto($mod, $photo['id']);
            $description = '<a href="/photos/photo' . $photo['id'] . '.html" class="act_photo"><img src="/images/photos/small/' . $mod['file'] . '" alt="' . htmlspecialchars(stripslashes($mod['title'])) . '" /></a>';
            cmsActions::updateLog('add_photo', array('object' => $mod['title'], 'description' => $description), $photo['id']);
            cmsCore::addSessionMessage($_LANG['PHOTO_SAVED'], 'success');
            cmsCore::jsonOutput(array('error' => false, 'redirect' => '/photos/photo' . $photo['id'] . '.html'));
        } else {
            $photo['tags'] = cmsTagLine('photo', $photo['id'], false);
            cmsPage::initTemplate('components', 'com_photos_edit')->assign('photo', $photo)->assign('form_action', '/photos/editphoto' . $photo['id'] . '.html')->assign('no_tags', false)->assign('is_admin', $inUser->is_admin)->assign('cfg', $model->config)->display('com_photos_edit.tpl');
            cmsCore::jsonOutput(array('error' => false, 'html' => ob_get_clean()));
        }
    }
    /////////////////////////////// PHOTO MOVE /////////////////////////////////////////////////////////////////////////////////////////
    if ($do == 'movephoto') {
        if ($_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {
            cmsCore::halt();
        }
        if (!$inUser->id) {
            cmsCore::halt();
        }
        $photo = cmsCore::callEvent('GET_PHOTO', $inPhoto->getPhoto($id));
        if (!$photo) {
            cmsCore::halt();
        }
        if (mb_strstr($photo['NSDiffer'], 'club')) {
            cmsCore::halt();
        }
        if (!$inUser->is_admin) {
            cmsCore::halt();
        }
        if (!cmsCore::inRequest('move_photo')) {
            cmsPage::initTemplate('components', 'com_photos_move')->assign('form_action', '/photos/movephoto' . $photo['id'] . '.html')->assign('html', $inPhoto->getAlbumsOption('', $photo['album_id']))->display('com_photos_move.tpl');
            cmsCore::jsonOutput(array('error' => false, 'html' => ob_get_clean()));
        } else {
            $album = cmsCore::callEvent('GET_PHOTO_ALBUM', $inDB->getNsCategory('cms_photo_albums', cmsCore::request('album_id', 'int')));
            if (!$album) {
                cmsCore::halt();
            }
            if (!$album['public'] && !$inUser->is_admin) {
                cmsCore::error404();
开发者ID:deltas1,项目名称:icms1,代码行数:67,代码来源:frontend.php

示例7: applet_content


//.........这里部分代码省略.........
                            </div>
                        </td>
                        <td width="130" valign="top">
                            <label><?php echo $_LANG['AD_PUBLIC_DATE']; ?></label>
                            <div>
                                <input type="text" id="pubdate" class="form-control" name="pubdate" style="width:100px;display: inline-block" <?php if(@!$mod['pubdate']) { echo 'value="'.date('d.m.Y').'"'; } else { echo 'value="'.$mod['pubdate'].'"'; } ?>/>

                                <input type="hidden" name="olddate" value="<?php echo @$mod['pubdate']?>" />
                            </div>
                        </td>
                        <td width="16" valign="bottom" style="padding-bottom:10px">
                            <input type="checkbox" id="showdate" class="uittip" name="showdate" title="<?php echo $_LANG['AD_VIEW_DATE_AND_AUTHOR']; ?>" value="1" <?php if ($mod['showdate'] || $do=='add') { echo 'checked="checked"'; } ?>/>
                        </td>
                        <td width="160" valign="top">
                            <label><?php echo $_LANG['AD_ARTICLE_TEMPLATE']; ?></label>
                            <div><input type="text" class="form-control" style="width:160px" name="tpl" value="<?php echo @$mod['tpl'];?>"></div>
                        </td>
                    </tr>
                </table>
                    
                <div class="form-group">
                    <label><?php echo $_LANG['AD_ARTICLE_NOTICE']; ?></label>
                    <div><?php $inCore->insertEditor('description', $mod['description'], '200', '100%'); ?></div>
                </div>

                <div class="form-group">
                    <label><?php echo $_LANG['AD_ARTICLE_TEXT']; ?></label>
                    <?php insertPanel(); ?>
                    <div><?php $inCore->insertEditor('content', $mod['content'], '400', '100%'); ?></div>
                </div>
                    
                <div class="form-group">
                    <label><?php echo $_LANG['AD_ARTICLE_TAGS']; ?></label>
                    <input type="text" id="tags" class="form-control" name="tags" value="<?php if (isset($mod['id'])) { echo cmsTagLine('content', $mod['id'], false); } ?>" />
                </div>

                <div>
                    <label>
                        <input type="radio" name="autokeys" <?php if ($do == 'add' && $cfg['autokeys']) { ?>checked="checked"<?php } ?> value="1"/>
                        <?php echo $_LANG['AD_AUTO_GEN_KEY']; ?>
                    </label>
                </div>
                <div>
                    <label>
                        <input type="radio" name="autokeys" value="2" />
                        <?php echo $_LANG['AD_TAGS_AS_KEY']; ?>
                    </label>
                </div>
                <div>
                    <label>
                        <input type="radio" name="autokeys" id="autokeys3" value="3" <?php if ($do == 'edit' || !$cfg['autokeys']) { ?>checked="checked"<?php } ?>/>
                        <?php echo $_LANG['AD_MANUAL_KEY']; ?>
                    </label>
                </div>
                    
                <?php if ($cfg['af_on'] && $do=='add') { ?>
                <div>
                    <label>
                        <input type="checkbox" name="noforum" id="noforum" value="1" />
                        <?php echo $_LANG['AD_NO_CREATE_THEME']; ?>
                    </label>
                </div>
                <?php } ?>
            </td>

            <!-- боковая ячейка -->
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:67,代码来源:content.php

示例8: cmsTagLine

<?php
if(!defined('VALID_CMS')) { die('ACCESS DENIED'); }

/////////////////////////////// ДОБАВЛЕНИЕ ПОСТА ////////////////////////////////////
if (in_array($bdo, array('newpost', 'editpost'))) {
    if ($bdo=='editpost') {
        $post = $inBlog->getPost($post_id);
        
        if (!$post) { cmsCore::error404(); }
        
        $post['tags'] = cmsTagLine($inBlog->getTarget('tags'), $post['id'], false);

            $blog = $inBlog->getBlog($post['blog_id']);
            if (!$blog) { cmsCore::error404(); }

            $club = $model->getClub($blog['user_id']);
            if(!$club) { cmsCore::error404(); }

	}

	if($bdo=='newpost'){

		$club = $model->getClub($id);
		if(!$club) { cmsCore::error404(); }

		$blog = $inBlog->getBlogByUserId($club['id']);
		if (!$blog) { cmsCore::error404(); }

	}

	// если блоги запрещены
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:31,代码来源:club_blogs.php

示例9: blog


//.........这里部分代码省略.........
        $blog['moderate_link'] = $model->getBlogURL() . '/moderate.html';
        $blog['blog_link'] = $model->getBlogURL();
        $blog['add_post_link'] = '/blog/newpost' . ($cat_id ? $cat_id : '') . '.html';
        //Генерируем панель со страницами
        if ($cat_id) {
            $pagination = cmsPage::getPagebar($total, $page, $model->config['perpage'], $blog['blog_link'] . '/page-%page%/cat-' . $cat_id);
        } else {
            $pagination = cmsPage::getPagebar($total, $page, $model->config['perpage'], $blog['blog_link'] . '/page-%page%');
        }
        $smarty = $inCore->initSmarty('components', 'com_blog_view.tpl');
        $smarty->assign('myblog', $myblog);
        $smarty->assign('is_config', true);
        $smarty->assign('is_admin', $inUser->is_admin);
        $smarty->assign('is_writer', $is_writer);
        $smarty->assign('on_moderate', $on_moderate);
        $smarty->assign('cat_id', $cat_id);
        $smarty->assign('blogcats', $blogcats);
        $smarty->assign('total', $total);
        $smarty->assign('all_total', isset($all_total) ? $all_total : 0);
        $smarty->assign('blog', $blog);
        $smarty->assign('posts', $posts);
        $smarty->assign('pagination', $pagination);
        $smarty->display('com_blog_view.tpl');
    }
    ////////// НОВЫЙ ПОСТ / РЕДАКТИРОВАНИЕ ПОСТА //////////////////////////////////////////////////////////////////
    if ($do == 'newpost' || $do == 'editpost') {
        // для редактирования сначала получаем пост
        if ($do == 'editpost') {
            $post = $inBlog->getPost($post_id);
            if (!$post) {
                cmsCore::error404();
            }
            $id = $post['blog_id'];
            $post['tags'] = cmsTagLine('blogpost', $post['id'], false);
        }
        // получаем блог
        $blog = $inBlog->getBlog($blog_id);
        if (!$blog) {
            cmsCore::error404();
        }
        //Если доступа нет, возвращаемся и выводим сообщение об ошибке
        if (!cmsUser::checkUserContentAccess($blog['allow_who'], $blog['user_id'])) {
            cmsCore::addSessionMessage($_LANG['CLOSED_BLOG'] . '<br>' . $_LANG['CLOSED_BLOG_TEXT'], 'error');
            cmsCore::redirect('/blog');
        }
        // Права доступа
        $myblog = $inUser->id && $inUser->id == $blog['user_id'];
        // автор блога
        $is_writer = $inBlog->isUserBlogWriter($blog, $inUser->id);
        // может ли пользователь писать в блог
        // если не его блог, пользователь не писатель и не админ, вне зависимости от авторства показываем 404
        if (!$myblog && !$is_writer && !$inUser->is_admin) {
            cmsCore::error404();
        }
        // проверяем является ли пользователь автором, если редактируем пост
        if ($do == 'editpost' && !$inUser->is_admin && $post['user_id'] != $inUser->id) {
            cmsCore::error404();
        }
        //Если еще не было запроса на сохранение
        if (!cmsCore::inRequest('goadd')) {
            $inPage->addPathway($blog['title'], $model->getBlogURL());
            //для нового поста
            if ($do == 'newpost') {
                if (IS_BILLING) {
                    cmsBilling::checkBalance('blogs', 'add_post');
                }
开发者ID:4uva4ek,项目名称:svato,代码行数:67,代码来源:frontend.php

示例10: cmsTagLine

    cmsCore::halt();
}
if (!$item_id) {
    cmsCore::jsonOutput(array('error' => true, 'html' => ' Не получен идентификатор записи!'));
    cmsCore::halt();
}
//библиотека тегов
cmsCore::includeFile('/core/lib_tags.php');
//шаблон формы редактирования
$template = 'p_front_editor_' . $component . '.tpl';
//получаем запись для редактирования
$item = $inDB->get_fields('cms_' . $component, "id = {$item_id}", '*');
// теги статьи
if ($item) {
    $target = $component == 'blog_posts' ? 'blogpost' : $component;
    $item['tags'] = cmsTagLine("{$target}", $item_id, false);
}
if (!$item) {
    cmsCore::jsonOutput(array('error' => true, 'html' => ' Не получена запись для редактирования!'));
    cmsCore::halt();
}
//изображение статьи для формы редактирования статей
if ($component == 'content') {
    $item['image'] = file_exists(PATH . '/images/photos/medium/article' . $item['id'] . '.jpg') ? 'article' . $item['id'] . '.jpg' : '';
}
//html-код формы
$html = '';
ob_start();
$smarty = cmsPage::initTemplate('plugins', $template);
$smarty->assign('item', $item);
$smarty->assign('csrf_token', cmsUser::getCsrfToken());
开发者ID:m-fatikhov,项目名称:icms1_front_editor_plugin,代码行数:31,代码来源:get_edit_form.php

示例11: getArticlesList

 /**
  * Получаем статьи по заданным параметрам
  * @return array
  */
 public function getArticlesList($only_published = true)
 {
     $today = date("Y-m-d H:i:s");
     if ($only_published) {
         $this->inDB->where("con.published = 1 AND con.pubdate <= '{$today}' AND (con.is_end=0 OR (con.is_end=1 AND con.enddate >= '{$today}'))");
     }
     $sql = "SELECT con.*,\r\n\t\t\t\t\t   cat.title as cat_title, cat.seolink as catseolink,\r\n\t\t\t\t\t   cat.showdesc,\r\n                       u.nickname as author,\r\n                       u.login as user_login\r\n                FROM cms_content con\r\n\t\t\t\tINNER JOIN cms_category cat ON cat.id = con.category_id\r\n\t\t\t\tLEFT JOIN cms_users u ON u.id = con.user_id\r\n                WHERE con.is_arhive = 0\r\n                      {$this->inDB->where}\r\n\r\n                {$this->inDB->group_by}\r\n\r\n                {$this->inDB->order_by}\n";
     if ($this->inDB->limit) {
         $sql .= "LIMIT {$this->inDB->limit}";
     }
     $result = $this->inDB->query($sql);
     $this->inDB->resetConditions();
     if (!$this->inDB->num_rows($result)) {
         return false;
     }
     while ($article = $this->inDB->fetch_assoc($result)) {
         $article['fpubdate'] = cmsCore::dateFormat($article['pubdate']);
         $article['ffpubdate'] = date('c', strtotime($article['pubdate']));
         $article['tagline'] = cmsTagLine('content', $article['id'], true);
         $article['comments'] = cmsCore::getCommentsCount('article', $article['id']);
         $article['url'] = $this->getArticleURL(null, $article['seolink']);
         $article['cat_url'] = $this->getCategoryURL(null, $article['catseolink']);
         $article['image'] = file_exists(PATH . '/images/photos/small/article' . $article['id'] . '.jpg') ? 'article' . $article['id'] . '.jpg' : '';
         $articles[] = $article;
     }
     $articles = cmsCore::callEvent('GET_ARTICLES', $articles);
     return translations::process(cmsConfig::getConfig('lang'), 'content_content', $articles);
 }
开发者ID:deltas1,项目名称:icms1,代码行数:32,代码来源:model.php

示例12: cmsTagLine

        <?php 
    if ($do == 'add_photo') {
        ?>
        <tr>
        <td>Cохранить оригинал: </td>
        <td><input name="saveorig" type="radio" value="1" checked="checked" />Да<input name="saveorig" type="radio" value="0"  />Нет</label></td>
        </tr>
        <?php 
    }
    ?>
        <tr>
            <td valign="top">Теги фотографии: <br />
            <span class="hinttext">Ключевые слова, через запятую</span></td>
            <td valign="top"><input name="tags" type="text" id="tags" size="45" value="<?php 
    if (isset($mod['id'])) {
        echo cmsTagLine('photo', $mod['id'], false);
    }
    ?>
" /></td>
        </tr>
        </table>
        <table width="100%" border="0">
            <tr>
                <?php 
    if (!isset($mod['user']) || @$mod['user'] == 1) {
        echo '<td width="52%" valign="top">';
        echo 'Описание фотографии:<br/>';
        $inCore->insertEditor('description', $mod['description'], '260', '605');
        echo '</td>';
    }
    ?>
开发者ID:ratmir-by,项目名称:icms-calendar,代码行数:31,代码来源:backend.php

示例13: getArticlesList

    /**
     * Получаем статьи по заданным параметрам
     * @return array
     */
    public function getArticlesList($only_published=true) {
        $today = date("Y-m-d H:i:s");

        if ($only_published) {
            cmsCore::c('db')->where("con.published = 1 AND con.pubdate <= '". $today ."'");
        }

        $sql = "SELECT con.*,
                    con.pubdate as fpubdate,
                    cat.title as cat_title, cat.seolink as catseolink,
                    cat.showdesc,
                    u.nickname as author,
                    u.login as user_login
                FROM cms_content con
                INNER JOIN cms_category cat ON cat.id = con.category_id
                LEFT JOIN cms_users u ON u.id = con.user_id
                WHERE con.is_arhive = 0
                ". cmsCore::c('db')->where ."
                ". cmsCore::c('db')->group_by ."
                ". cmsCore::c('db')->order_by. "\n";

        if (cmsCore::c('db')->limit) {
            $sql .= "LIMIT ". cmsCore::c('db')->limit;
        }

        $result = cmsCore::c('db')->query($sql);

        cmsCore::c('db')->resetConditions();

        if (!cmsCore::c('db')->num_rows($result)) { return false; }

        while ($article = cmsCore::c('db')->fetch_assoc($result)) {
            $article['fpubdate'] = cmsCore::dateFormat($article['fpubdate']);
            $article['tagline']  = cmsTagLine('content', $article['id'], true);
            $article['comments'] = cmsCore::getCommentsCount('article', $article['id']);
            $article['url']      = $this->getArticleURL(null, $article['seolink']);
            $article['cat_url']  = $this->getCategoryURL(null, $article['catseolink']);
            
            if (file_exists(PATH .'/images/content/medium/'. ceil($article['id']/100) .'/article'. $article['id' ] .'.jpg')) {
                $article['image'] = '/images/content/medium/'. ceil($article['id']/100) .'/article'. $article['id' ] .'.jpg';
                $article['image_small'] = '/images/content/small/'. ceil($article['id']/100) .'/article'. $article['id' ] .'.jpg';
            }
            
            if (!empty($article['images'])) { $article['images'] = json_decode($article['images'], true); }
            
            $articles[] = $article;
        }

        $articles = cmsCore::callEvent('GET_ARTICLES', $articles);

        return $articles;
    }
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:56,代码来源:model.php

示例14: getArticlesList2

 /**
  * Получаем статьи по id категориям
  * @return array
  */
 public function getArticlesList2($only_published = true, $cat_id = '1')
 {
     $today = date("Y-m-d H:i:s");
     if ($only_published) {
         $this->inDB->where("con.published = 1 AND con.pubdate <= '{$today}' AND (con.is_end=0 OR (con.is_end=1 AND con.enddate >= '{$today}')) AND con.category_id = '{$cat_id}'");
     }
     $sql = "SELECT con.*,\n                       con.pubdate as fpubdate,\n\t\t\t\t\t   cat.title as cat_title, cat.seolink as catseolink,\n\t\t\t\t\t   cat.showdesc, cat.description as catdescription,\n                       u.nickname as author,\n                       u.login as user_login\n                FROM cms_content con\n\t\t\t\tINNER JOIN cms_category cat ON cat.id = con.category_id\n\t\t\t\tLEFT JOIN cms_users u ON u.id = con.user_id\n                WHERE con.is_arhive = 0\n                      {$this->inDB->where}\n\n                {$this->inDB->group_by}\n\n                ORDER BY con.ordering\n";
     if ($this->inDB->limit) {
         $sql .= "LIMIT {$this->inDB->limit}";
     }
     $result = $this->inDB->query($sql);
     $this->inDB->resetConditions();
     if (!$this->inDB->num_rows($result)) {
         return false;
     }
     while ($article = $this->inDB->fetch_assoc($result)) {
         $article['fpubdate'] = cmsCore::dateFormat($article['fpubdate']);
         $article['tagline'] = cmsTagLine('content', $article['id'], true);
         $article['comments'] = cmsCore::getCommentsCount('article', $article['id']);
         $article['url'] = $this->getArticleURL(null, $article['seolink']);
         $article['cat_url'] = $this->getCategoryURL(null, $article['catseolink']);
         if (isset($_SESSION['lang']) && $_SESSION['lang'] != 'ru') {
             $article['image'] = file_exists(PATH . '/images/photos/small/article' . $article['id'] . '_' . $_SESSION['lang'] . '.jpg') ? 'article' . $article['id'] . '_' . $_SESSION['lang'] . '.jpg' : '';
         } else {
             $article['image'] = file_exists(PATH . '/images/photos/small/article' . $article['id'] . '.jpg') ? 'article' . $article['id'] . '.jpg' : '';
         }
         $articles[] = $article;
     }
     $articles = cmsCore::callEvent('GET_ARTICLES', $articles);
     return $articles;
 }
开发者ID:vicktorwork,项目名称:cms1,代码行数:35,代码来源:model.php

示例15: cmsTagLine

                <div style="margin-top:12px"><strong>Краткое описание</strong></div>
                <div><?php 
$inCore->insertEditor('shortdesc', $item['shortdesc'], '200', '100%');
?>
</div>

                <div style="margin-top:12px"><strong>Подробное описание</strong></div>
                <div><?php 
$inCore->insertEditor('description', $item['description'], '400', '100%');
?>
</div>

                <div style="margin-top:12px"><strong>Теги объекта</strong></div>
                <div><input name="tags" type="text" id="tags" style="width:99%" value="<?php 
if (isset($item['id'])) {
    echo cmsTagLine('map', $item['id'], false);
}
?>
" /></div>

                <?php 
if ($do == 'edit_item') {
    if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/images/photos/small/map' . $item['id'] . '.jpg')) {
        ?>
                                <div style="margin-top:3px;margin-bottom:3px;padding:10px;border:solid 1px gray;text-align:center">
                                    <img src="/images/photos/small/map<?php 
        echo $item['id'];
        ?>
.jpg" border="0" />
                                    <div>
                                        <label><input type="checkbox" name="img_delete[]" class="input" value="map<?php 
开发者ID:4uva4ek,项目名称:svato,代码行数:31,代码来源:com_inmaps_edit.php


注:本文中的cmsTagLine函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。