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


PHP gcms::showDetail方法代码示例

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


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

示例1: ucwords

                $m = $install_modules[$index['module']]['menu_text'];
                $t = $install_modules[$index['module']]['menu_tooltip'];
            } else {
                $m = ucwords($index['module']);
                $t = $m;
            }
            $canonical = gcms::getURL($index['module']);
            $breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
        }
        // อัปเดทการเปิดดู
        if (!isset($_REQUEST['visited'])) {
            $index['visited']++;
            $db->edit(DB_INDEX, $index['id'], array('visited' => $index['visited']));
        }
        $cache->save($sql, $index);
        // แทนที่ลงใน template ของโมดูล
        $patt = array('/{BREADCRUMS}/', '/{TOPIC}/', '/{DETAIL}/', '/{MODULE}/');
        $replace = array();
        $replace[] = implode("\n", $breadcrumbs);
        $replace[] = $index['topic'];
        $replace[] = gcms::showDetail($index['detail'], true, false);
        $replace[] = $module;
        $content = preg_replace($patt, $replace, gcms::loadtemplate($index['module'], '', 'main'));
        // title,keywords,description
        $title = $index['topic'];
        $keywords = $index['keywords'];
        $description = $index['description'];
        // เลือกเมนู
        $menu = empty($install_modules[$index['module']]['alias']) ? $index['module'] : $install_modules[$index['module']]['alias'];
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:main.php

示例2: is_file

     $canonical = gcms::getURL($index['module'], '', 0, $index['id']);
 }
 // แก้ไขบทความ เจ้าของหรือ mod
 $canEdit = is_file(ROOT_PATH . 'modules/document/write.php') && ($moderator || $isMember && $login['id'] == $index['member_id']);
 // แทนที่ลงใน template ของโมดูล
 $patt = array('/{BREADCRUMS}/', '/{COMMENTLIST}/', '/{REPLYFORM}/', '/{TOPIC}/', '/<MEMBER>(.*)<\\/MEMBER>/s', '/(edit-{QID}-0-0-{MODULE})/', '/(delete-{QID}-0-0-{MODULE})/', '/(quote-{QID}-0-0-{MODULE})/', '/{DETAIL}/', '/{LANGUAGE}/', '/{UID}/', '/{DISPLAYNAME}/', '/{IMG}/', '/{STATUS}/', '/{DATE}/', '/{DATEISO}/', '/{CATEGORY}/', '/{VISITED}/', '/{TAGS}/', '/{COMMENTS}/', '/{QID}/', '/{LOGIN_PASSWORD}/', '/{LOGIN_EMAIL}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/', '/{DELETE}/', '/{MODULE}/', '/{MODULEID}/', '/{VOTE}/', '/{VOTE_COUNT}/', '/{CATID}/');
 $replace = array();
 $replace[] = implode("\n", $breadcrumbs);
 $replace[] = sizeof($comments) == 0 ? '' : implode("\n", $comments);
 $replace[] = $canReply ? gcms::loadtemplate($index['module'], 'document', 'reply') : '';
 $replace[] = $index['topic'];
 $replace[] = $isMember ? '' : '$1';
 $replace[] = $canEdit ? '\\1' : 'hidden';
 $replace[] = $canDelete ? '\\1' : 'hidden';
 $replace[] = $canReply ? '\\1' : 'hidden';
 $replace[] = gcms::HighlightSearch(gcms::showDetail($index['detail'], $canview, false), $search);
 $replace[] = LANGUAGE;
 $replace[] = (int) $index['member_id'];
 $replace[] = empty($index['displayname']) ? $index['email'] : $index['displayname'];
 if (is_file(DATA_PATH . "document/{$index['picture']}")) {
     // รูปภาพของบทความ
     $image_src = DATA_URL . "document/{$index['picture']}";
     $replace[] = '<figure><img src="' . $image_src . '" alt="' . $index['topic'] . '"></figure>';
 } else {
     $image_src = WEB_URL . "/{$index['default_icon']}";
     $replace[] = '';
 }
 $replace[] = $index['status'];
 $replace[] = gcms::mktime2date($index['create_date']);
 $replace[] = date(DATE_ISO8601, $index['create_date']);
 $replace[] = $category;
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:view.php

示例3: implode

                $i++;
                $row = '<article class=r>';
                $row .= '<div class=detail>' . $picture . gcms::showDetail($item['detail'], true) . '</div>';
                $row .= '<footer>';
                $row .= '<p><strong>{LNG_COMMENT_NO}#' . $i . '</strong></p>';
                $row .= '<p><strong>{LNG_BY}</strong>: ' . (empty($item['displayname']) ? $item['email'] : $item['displayname']) . '</p>';
                $row .= '<p><strong>{LNG_POSTED}</strong>: ' . gcms::mktime2date($item['last_update']) . '</p>';
                $row .= '<p><strong>{LNG_IP}</strong>: ' . gcms::showip($item['ip']) . '</p>';
                $row .= '</footer>';
                $row .= '</article>';
                $comments[] = $row;
            }
            $title = $index['topic'];
            if ($index['picture'] != '' && is_file($imagedir . $index['picture'])) {
                $picture = '<p class=img><img src="' . $imageurl . $index['picture'] . '" alt=""></p>';
            } else {
                $picture = '';
            }
            $content = '<article>';
            $content .= '<header><h1>' . $index['topic'] . '</h1></header>';
            $content .= '<div class=detail>' . $picture . gcms::showDetail($index['detail'], true) . '</div>';
            $content .= '<footer>';
            $content .= '<p><strong>{LNG_BY}</strong> : ' . ($index['displayname'] == '' ? $index['email'] : $index['displayname']) . '</p>';
            $content .= '<p><strong>{LNG_POSTED}</strong>: ' . gcms::mktime2date($index['create_date']) . '</p>';
            $content .= '<p><strong>{LNG_URL}</strong> : ' . gcms::getURL($modules['module'], '', 0, 0, "wbid={$index['id']}") . '</p>';
            $content .= '</footer>';
            $content .= '</article>';
            $content .= implode("\n", $comments);
        }
    }
}
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:print.php

示例4: array

 // แก้ไขบอร์ด (mod หรือ ตัวเอง)
 $canEdit = $moderator || $isMember && $login['id'] == $index['member_id'];
 // antispam
 $register_antispamchar = gcms::rndname(32);
 $_SESSION[$register_antispamchar] = gcms::rndname(4);
 // แทนที่ลงใน template ของโมดูล
 $patt = array('/{BREADCRUMS}/', '/{COMMENTLIST}/', '/(edit-{QID}-0-0-{MODULE})/', '/(delete-{QID}-0-0-{MODULE})/', '/(quote-{QID}-([0-9]+)-([0-9]+)-{MODULE})/', '/(pin-{QID}-0-0-{MODULE})/', '/(lock-{QID}-0-0-{MODULE})/', '/{URL}/', '/{TOPIC}/', '/{PIN}/', '/{LOCK}/', '/{PIN_TITLE}/', '/{LOCK_TITLE}/', '/{DETAIL}/', '/{UID}/', '/{DISPLAYNAME}/', '/{STATUS}/', '/{DATE}/', '/{DATEISO}/', '/{VISITED}/', '/{COMMENTS}/', '/{REPLYFORM}/', '/<MEMBER>(.*)<\\/MEMBER>/s', '/<UPLOAD>(.*)<\\/UPLOAD>/s', '/{LOGIN_PASSWORD}/', '/{LOGIN_EMAIL}/', '/{ANTISPAM}/', '/{ANTISPAMVAL}/', '/{QID}/', '/{DELETE}/');
 if ($index['picture'] != '' && is_file($imagedir . $index['picture'])) {
     $image_src = $imageurl . $index['picture'];
     $picture = '<figure class=center><img src="' . $image_src . '" alt="' . $index['topic'] . '"></figure>';
 } else {
     $picture = '';
     $image_src = WEB_URL . "/{$index['default_icon']}";
 }
 // รายละเอียดเนื้อหา
 $detail = gcms::showDetail($index['detail'], $canView, true, true);
 $replace = array();
 $replace[] = implode("\n", $breadcrumbs);
 $replace[] = implode("\n", $comments);
 $replace[] = $canEdit ? '\\1' : 'hidden';
 $replace[] = $canDelete ? '\\1' : 'hidden';
 $replace[] = !$canReply || $index['locked'] == 1 ? 'hidden' : '\\1';
 $replace[] = $moderator ? '\\1' : 'hidden';
 $replace[] = $moderator ? '\\1' : 'hidden';
 $replace[] = $canonical;
 $replace[] = $index['topic'];
 $replace[] = $index['pin'] == 0 ? 'un' : '';
 $replace[] = $index['locked'] == 0 ? 'un' : '';
 $replace[] = $index['pin'] == 0 ? $lng['LNG_PIN'] : $lng['LNG_UNPIN'];
 $replace[] = $index['locked'] == 0 ? $lng['LNG_LOCK'] : $lng['LNG_UNLOCK'];
 $replace[] = $picture . gcms::HighlightSearch($detail, $search);
开发者ID:phannack,项目名称:GCMS,代码行数:31,代码来源:view.php


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