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


PHP article_tagnames函数代码示例

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


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

示例1: getsetting

 function getsetting()
 {
     global $_G;
     $settings = $this->setting;
     if ($settings['catid']) {
         $settings['catid']['value'][] = array(0, lang('portalcp', 'block_all_category'));
         loadcache('portalcategory');
         foreach ($_G['cache']['portalcategory'] as $value) {
             if ($value['level'] == 0) {
                 $settings['catid']['value'][] = array($value['catid'], $value['catname']);
                 if ($value['children']) {
                     foreach ($value['children'] as $catid2) {
                         $value2 = $_G['cache']['portalcategory'][$catid2];
                         $settings['catid']['value'][] = array($value2['catid'], '-- ' . $value2['catname']);
                         if ($value2['children']) {
                             foreach ($value2['children'] as $catid3) {
                                 $value3 = $_G['cache']['portalcategory'][$catid3];
                                 $settings['catid']['value'][] = array($value3['catid'], '---- ' . $value3['catname']);
                             }
                         }
                     }
                 }
             }
         }
     }
     if ($settings['tag']) {
         $tagnames = article_tagnames();
         foreach ($tagnames as $k => $v) {
             $settings['tag']['value'][] = array($k, $v);
         }
     }
     return $settings;
 }
开发者ID:dalinhuang,项目名称:healthshop,代码行数:33,代码来源:block_article.php

示例2: dgmdate

                            }
                            $attach['from'] = 'forum';
                            $attachs[] = $attach;
                        }
                    }
                    break;
            }
        }
        if (!empty($article['dateline'])) {
            $article['dateline'] = dgmdate($article['dateline']);
        }
        if (!empty($attachs)) {
            $article['attachs'] = get_upload_content($attachs);
        }
        $article_tags = article_parse_tags($article['tag']);
        $tag_names = article_tagnames();
    }
}
require_once libfile('function/upload');
$swfconfig = getuploadconfig($_G['uid'], 0, false);
require_once libfile('function/spacecp');
$albums = getalbums($_G['uid']);
include_once template("portal/portalcp_article");
function portalcp_get_summary($message)
{
    $message = preg_replace(array("/\\[attach\\].*?\\[\\/attach\\]/", "/\\&[a-z]+\\;/i", "/\\<script.*?\\<\\/script\\>/"), '', $message);
    $message = preg_replace("/\\[.*?\\]/", '', $message);
    $message = getstr(strip_tags($message), 200);
    return $message;
}
function portalcp_get_postmessage($post, $getauthorall = '')
开发者ID:renning,项目名称:html,代码行数:31,代码来源:portalcp_article.php

示例3: implode

         $mpurl .= '&' . implode('&', $orders['urls']);
     }
     $orderby = array($_GET['orderby'] => ' selected');
     $ordersc = array($_GET['ordersc'] => ' selected');
     $perpage = empty($_GET['perpage']) ? 0 : intval($_GET['perpage']);
     if (!in_array($perpage, array(10, 20, 50, 100))) {
         $perpage = 10;
     }
     $categoryselect = category_showselect('portal', 'catid', true, $_GET['catid']);
     $searchlang = array();
     $keys = array('search', 'likesupport', 'resultsort', 'defaultsort', 'orderdesc', 'orderasc', 'perpage_10', 'perpage_20', 'perpage_50', 'perpage_100', 'article_dateline', 'article_id', 'article_title', 'article_uid', 'article_username', 'article_category', 'article_tag');
     foreach ($keys as $key) {
         $searchlang[$key] = cplang($key);
     }
     $articletagcheckbox = '';
     $article_tags = article_tagnames();
     foreach ($article_tags as $k => $v) {
         $checked = !empty($_GET['tag']) && !empty($_GET['tag'][$k]) ? 'checked="checked"' : '';
         $articletagcheckbox .= "<input type=\"checkbox\" class=\"checkbox\" id=\"tag_{$k}\" name=\"tag[{$k}]\" value=\"1\"{$checked} />";
         $articletagcheckbox .= "<label for=\"tag_{$k}\">{$v}</label>";
     }
     $start = ($page - 1) * $perpage;
     $mpurl .= '&perpage=' . $perpage;
     $perpages = array($perpage => ' selected');
     $adminscript = ADMINSCRIPT;
     echo <<<SEARCH
t<form method="get" autocomplete="off" action="{$adminscript}" id="tb_search">
t\t<div style="margin-top:8px;">
t\t\t<table cellspacing="3" cellpadding="3">
t\t\t\t<tr>
t\t\t\t\t<th>{$searchlang['article_id']}</th><td><input type="text" class="txt" name="aid" value="{$_GET['aid']}"></td>
开发者ID:softhui,项目名称:discuz,代码行数:31,代码来源:admincp_article.php

示例4: article_edit


//.........这里部分代码省略.........
                    } else {
                        if ($article_arr['is_bbs'] != 1) {
                            $article_arr['reply'] = array();
                        }
                    }
                    if ($article_arr['is_bbs']) {
                        $article_arr['reply'] = $data_article_arr['reply'];
                    }
                    $article_arr['cookie'] = $p_arr['login_cookie'];
                    $article_arr['page_url'] = $data_article_arr['url'];
                    $old_arr['forum_id'] = intval($_GET['old_forum_id']);
                    $forum_arr = article_move_forums($article_arr, $old_arr);
                    if ($forum_arr['is_download_img'] == 1) {
                        //下载图片
                        $forum_arr['cookie'] = $p_arr['login_cookie'];
                        $forum_arr['is_download_img'] = $article_arr['is_download_img'];
                        $forum_arr['is_download_file'] = $p_arr['is_download_file'];
                        $forum_arr['is_water_img'] = $article_arr['is_water_img'];
                        forum_downremotefile($forum_arr, $old_arr);
                    }
                    $setarr['forum_id'] = $article_arr['tid'] = $forum_arr['tid'];
                    $article_view_url = 'forum.php?mod=viewthread&tid=' . $setarr['forum_id'];
                } else {
                    //博客
                    $old_arr['catid'] = intval($_GET['old_blog_big_cid']);
                    $old_arr['classid'] = intval($_GET['old_blog_small_cid']);
                    $old_arr['uid'] = intval($_GET['old_uid']);
                    $old_arr['username'] = $_GET['old_username'];
                    $old_arr['blog_id'] = $_GET['old_blog_id'];
                    $setarr['blog_id'] = $article_arr['aid'] = article_move_blog($article_arr, $old_arr);
                    $article_arr['cookie'] = $p_arr['login_cookie'];
                    $article_arr['page_url'] = $data_article_arr['url'];
                    $arr['is_download_file'] = $p_arr['is_download_file'];
                    $arr['content_filter_html'] = unserialize(dstripslashes($p_arr['content_filter_html']));
                    downremotefile($article_arr, 'album', $old_arr);
                    $article_view_url = 'home.php?mod=space&do=blog&uid=' . $article_arr['uid'] . '&id=' . $setarr['blog_id'];
                }
            }
            $setarr['status'] = 2;
            DB::update('strayer_article_title', $setarr, array('aid' => $aid));
        }
        $msg = $_GET['public_flag'] ? milu_lang('public') : milu_lang('save');
        $return_url = '?' . PICK_GO . 'picker_manage&myac=article_manage&p=1&pid=' . $pid . $_GET['url_args'];
        $return_list_html = '<a href="' . $return_url . '">' . milu_lang('return_list') . '</a>';
        if ($article_view_url) {
            $article_view_output = '&nbsp;<span class="pipe">|</span>&nbsp;<a target="_blank" href="' . $article_view_url . '">' . milu_lang('view_article') . '</a>';
        }
        cpmsg(milu_lang('save_success', array('msg' => $msg)) . '<br><br><a href="?' . PICK_GO . 'picker_manage&myfunc=article_edit&aid=' . $aid . '&pid=' . $pid . '">' . milu_lang('continue_edit') . '</a>&nbsp;<span class="pipe">|</span>&nbsp;' . $return_list_html . $article_view_output, PICK_GO . 'picker_manage&myfunc=article_edit&aid=' . $aid . '&pid=' . $pid, 'succeed');
    } else {
        $pid = intval($_GET['pid']);
        $p_arr = get_pick_info($pid);
        $p_arr['public_class'] = unserialize($p_arr['public_class']);
        $aid = intval($_GET['aid']);
        $data = article_info($aid);
        $data['p_arr'] = $p_arr;
        $data['status'] = intval($_GET['status']);
        if (!$data['view_num']) {
            $view_arr = format_wrap($p_arr['view_num'], ',');
            if ($view_arr) {
                $data['view_num'] = rand($view_arr[0], $view_arr[1]);
            }
        }
        if ($data['contents'] > 1) {
            if ($data['content_arr']) {
                $data['content'] = content_merge($data['content_arr'], 1);
            }
        }
        $time_arr = create_public_time($data, 1);
        $data['public_time'] = array_pop($time_arr);
        $data['public_time'] = dgmdate($data['public_time'], 'Y-m-d H:i');
        if (!$data['uid']) {
            $rand_arr = get_rand_uid($p_arr);
            $data['uid'] = $rand_arr[0]['uid'];
        }
        $data['raids'] = unserialize($data['raids']);
        if ($data['raids']) {
            $query = DB::query("SELECT title,aid FROM " . DB::table('portal_article_title') . " WHERE aid IN (" . dimplode($data['raids']) . ")");
            $list = array();
            while ($value = DB::fetch($query)) {
                $list[$value['aid']] = $value;
                $data['raids_html'] .= '<li id="raid_li_' . $value['aid'] . '"><input type="hidden" name="raids[]" value="' . $value['aid'] . '" size="5"><a href="portal.php?mod=view&aid=' . $value['aid'] . '" target="_blank">' . $value['title'] . '</a>(' . milu_lang('article') . ' ID: ' . $value['aid'] . ')<a href="javascript:;" onclick="raid_delete(' . $value['aid'] . ');" class="xg1">' . milu_lang('del') . '</a></li>';
            }
        }
        if (!$data['forum_typeid']) {
            $data['forum_typeid'] = $p_arr['public_class'][1];
        }
        $data['threadtypes'] = getthreadtypes(array('typeid' => $p_arr['public_class'][1], 'fid' => $p_arr['public_class'][0]));
        $data['forumselect'] = '<select id="forums" name="forums" onchange="getthreadtypes(this.value, 0)">' . forumselect(FALSE, 0, $p_arr['public_class'][0], TRUE) . '</select>&nbsp;&nbsp;<span id="threadtypes">' . $data['threadtypes'] . '</span>';
        $data['portalselect'] = category_showselect('portal', 'portal', $p_arr['public_class'][0]);
        $data['blogselect'] = category_showselect('blog', 'blog', $p_arr['public_class'][0]);
        $data['article_tags'] = article_parse_tags($data['tag']);
        $data['tag_names'] = article_tagnames();
        $data['show_blog_class'] = get_person_blog_class($data['uid'], $data['blog_small_cid']);
        $data['pid'] = $pid;
        $data['public_type'] = $p_arr['public_type'];
        $data['content'] = dhtmlspecialchars($data['content']);
        $data['url_args'] = $_GET['url_args'];
        return $data;
    }
}
开发者ID:edmundwong,项目名称:V604,代码行数:101,代码来源:function.article.php


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