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


PHP cmsCore::setIdUploadImage方法代码示例

本文整理汇总了PHP中cmsCore::setIdUploadImage方法的典型用法代码示例。如果您正苦于以下问题:PHP cmsCore::setIdUploadImage方法的具体用法?PHP cmsCore::setIdUploadImage怎么用?PHP cmsCore::setIdUploadImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cmsCore的用法示例。


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

示例1: addComment

 public function addComment($item)
 {
     $item = cmsCore::callEvent('ADD_COMMENT', $item);
     $item['target_title'] = $this->inDB->escape_string($item['target_title']);
     $comment_id = $this->inDB->insert('cms_comments', $item);
     cmsCore::setIdUploadImage('comment', $comment_id);
     return $comment_id;
 }
开发者ID:deltas1,项目名称:icms1,代码行数:8,代码来源:model.php

示例2: addPost

 /**
  * Добавляет пост в блоге
  * @param array $item
  * @return array $post_id, $seolink
  */
 public function addPost($item)
 {
     $item = cmsCore::callEvent('ADD_POST', $item);
     //парсим bb-код перед записью в базу
     // Парсим по отдельности части текста, если есть тег [cut
     if (mb_strstr($item['content'], '[cut')) {
         $msg_to = $this->getPostShort($item['content']);
         $msg_to = cmsCore::parseSmiles($msg_to, true);
         $msg_after = $this->getPostShort($item['content'], false, true);
         $msg_after = cmsCore::parseSmiles($msg_after, true);
         $cut = $this->getPostCut($item['content']);
         $item['content_html'] = $msg_to . $cut . $msg_after;
     } else {
         $item['content_html'] = cmsCore::parseSmiles($item['content'], true);
     }
     // Экранируем специальные символы
     $item['content'] = $this->inDB->escape_string($item['content']);
     $item['content_html'] = $this->inDB->escape_string($item['content_html']);
     $post_id = $this->inDB->insert('cms_blog_posts', $item);
     if (!$post_id) {
         return false;
     }
     cmsInsertTags($item['tags'], $this->getTarget('tags'), $post_id);
     $item['id'] = $post_id;
     $item['seolink'] = $this->generatePostSeoLink($item);
     $this->inDB->query("UPDATE cms_blog_posts SET seolink='{$item['seolink']}' WHERE id = '{$post_id}'");
     if ($item['published']) {
         cmsUser::checkAwards($item['user_id']);
     }
     cmsCore::setIdUploadImage('blog_post', $post_id);
     return array('id' => $post_id, 'seolink' => $item['seolink']);
 }
开发者ID:deltas1,项目名称:icms1,代码行数:37,代码来源:blog.class.php

示例3: updatePost

 public function updatePost($post, $post_id)
 {
     cmsCore::callEvent('UPDATE_FORUM_POST', $post_id);
     cmsCore::setIdUploadImage('post', $post_id);
     return $this->inDB->update('cms_forum_posts', $post, $post_id);
 }
开发者ID:r2git,项目名称:icms1,代码行数:6,代码来源:model.php

示例4: updateArticle

    /**
     * Обновляет статью
     * @return bool
     */
    public function updateArticle($id, $article, $not_upd_seo = false) {
        $article['id'] = $id;
        
        cmsCore::setIdUploadImage('', $article['id'], 'content');
        cmsCore::requestUploadImgTitles($article['id'], 'content');
        cmsCore::updateComImages($article['id'], 'content', '', 'cms_content', 'images');

        if (!$not_upd_seo) {
            if (@$article['url']) {
                $article['url'] = cmsCore::strToURL($article['url'], $this->config['is_url_cyrillic']);
            }

            $article['seolink'] = $this->getSeoLink($article);
        } else {
            unset($article['seolink']);
            unset($article['url']);
        }

        if (!$article['user_id']) {
            $article['user_id'] = cmsCore::c('user')->id;
        }

        $article = cmsCore::callEvent('UPDATE_ARTICLE', $article);

        cmsCore::c('db')->update('cms_content', $article, $id);

        if (!$not_upd_seo) {
            $this->updateContentCommentsLink($id);
        }

        cmsInsertTags($article['tags'], 'content', $id);

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

示例5:

	if(!cmsUser::checkCsrfToken()) { cmsCore::halt(); }

	// добавляем запись методом модели места назначения
	$wall_id = $model->addWall(array(
            'user_id'=>$target_id,
            'author_id'=>$inUser->id,
            'nickname'=>$inUser->nickname,
            'content'=>$message,
            'usertype'=>$component,
            'pubdate'=>date('Y-m-d H:i:s')
        ));

	if($wall_id){

            // регистрируем загруженные фотографии к записи
            cmsCore::setIdUploadImage('wall', $wall_id, $component);

            cmsCore::jsonOutput(array('error' => false, 'html'  => $_LANG['WALL_MESG_ADD']));

	} else {

            cmsCore::jsonOutput(array('error' => true, 'text'  => $_LANG['ERR_SUBMIT_WALL']));

	}

}
/* ==================================================================================================== */
/* ==================================================================================================== */
if($do == 'delete'){

    if (!$inUser->id) { cmsCore::halt(); }
开发者ID:Acsac,项目名称:CMS-RuDi,代码行数:31,代码来源:wall.php

示例6: ob_start

        ob_start();
        cmsPage::initTemplate('components', 'com_users_addwall')->assign('target_id', $target_id)->assign('component', $component)->assign('bb_toolbar', cmsPage::getBBCodeToolbar('message', true, $component, 'wall'))->assign('smilies', cmsPage::getSmilesPanel('message'))->display('com_users_addwall.tpl');
        cmsCore::jsonOutput(array('error' => false, 'html' => ob_get_clean()));
    }
    $message = $inDB->escape_string(cmsCore::parseSmiles(cmsCore::request('message', 'html', ''), true));
    if (mb_strlen($message) < 2) {
        cmsCore::jsonOutput(array('error' => true, 'text' => $_LANG['ERR_SEND_WALL']));
    }
    if (!cmsUser::checkCsrfToken()) {
        cmsCore::halt();
    }
    // добавляем запись методом модели места назначения
    $wall_id = $model->addWall(array('user_id' => $target_id, 'author_id' => $inUser->id, 'nickname' => $inUser->nickname, 'content' => $message, 'usertype' => $component, 'pubdate' => date('Y-m-d H:i:s')));
    if ($wall_id) {
        // регистрируем загруженные фотографии к записи
        cmsCore::setIdUploadImage('wall', $wall_id);
        cmsCore::jsonOutput(array('error' => false, 'html' => $_LANG['WALL_MESG_ADD']));
    } else {
        cmsCore::jsonOutput(array('error' => true, 'text' => $_LANG['ERR_SUBMIT_WALL']));
    }
}
/* ==================================================================================================== */
/* ==================================================================================================== */
if ($do == 'delete') {
    if (!$inUser->id) {
        cmsCore::halt();
    }
    if (!cmsUser::checkCsrfToken()) {
        cmsCore::halt();
    }
    $record_id = cmsCore::request('record_id', 'int', 0);
开发者ID:deltas1,项目名称:icms1,代码行数:31,代码来源:wall.php


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