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


PHP NewsStory::title方法代码示例

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


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

示例1: PrintPage

function PrintPage($storyid)
{
    global $xoopsConfig, $xoopsModule;
    $story = new NewsStory($storyid);
    $datetime = formatTimestamp($story->published());
    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
    echo '<html><head>';
    echo '<meta http-equiv="Content-Type" content="text/html; charset=' . _CHARSET . '" />';
    echo '<title>' . $xoopsConfig['sitename'] . '</title>';
    echo '<meta name="AUTHOR" content="' . $xoopsConfig['sitename'] . '" />';
    echo '<meta name="COPYRIGHT" content="Copyright (c) 2001 by ' . $xoopsConfig['sitename'] . '" />';
    echo '<meta name="DESCRIPTION" content="' . $xoopsConfig['slogan'] . '" />';
    echo '<meta name="GENERATOR" content="' . XOOPS_VERSION . '" />';
    echo '<body bgcolor="#ffffff" text="#000000" onload="window.print()">
    	<table border="0"><tr><td align="center">
    	<table border="0" width="640" cellpadding="0" cellspacing="1" bgcolor="#000000"><tr><td>
    	<table border="0" width="640" cellpadding="20" cellspacing="1" bgcolor="#ffffff"><tr><td align="center">
    	<img src="' . XOOPS_URL . '/images/logo.gif" border="0" alt="" /><br /><br />
    	<h3>' . $story->title() . '</h3>
    	<small><b>' . _NW_DATE . '</b>&nbsp;' . $datetime . ' | <b>' . _NW_TOPICC . '</b>&nbsp;' . $story->topic_title() . '</small><br /><br /></td></tr>';
    echo '<tr valign="top" style="font:12px;"><td>' . $story->hometext() . '<br />';
    $bodytext = $story->bodytext();
    $bodytext = str_replace("[pagebreak]", "<br style=\"page-break-after:always;\">", $bodytext);
    if ($bodytext != '') {
        echo $bodytext . '<br /><br />';
    }
    echo '</td></tr></table></td></tr></table>
	<br /><br />';
    printf(_NW_THISCOMESFROM, $xoopsConfig['sitename']);
    echo '<br /><a href="' . XOOPS_URL . '/">' . XOOPS_URL . '</a><br /><br />
    	' . _NW_URLFORSTORY . ' <!-- Tag below can be used to display Permalink image --><!--img src="' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/images/x.gif" /--><br />
    	<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/article.php?storyid=' . $story->storyid() . '">' . XOOPS_URL . '/article.php?storyid=' . $story->storyid() . '</a>
    	</td></tr></table>
    	</body>
    	</html>
    	';
}
开发者ID:amjadtbssm,项目名称:website,代码行数:37,代码来源:print.php

示例2: formatTimestamp

    redirect_header(XOOPS_URL . '/modules/news/index.php', 2, _NW_NOSTORY);
    exit;
}
$gperm_handler =& xoops_gethandler('groupperm');
if (is_object($xoopsUser)) {
    $groups = $xoopsUser->getGroups();
} else {
    $groups = XOOPS_GROUP_ANONYMOUS;
}
if (!$gperm_handler->checkRight('news_view', $article->topicid(), $groups, $xoopsModule->getVar('mid'))) {
    redirect_header(XOOPS_URL . '/modules/news/index.php', 3, _NOPERM);
    exit;
}
$dateformat = news_getmoduleoption('dateformat');
$article_data = $article->hometext() . $article->bodytext();
$article_title = $article->title();
$article_title = news_html2text($myts->undoHtmlSpecialChars($article_title));
$forumdata['topic_title'] = $article_title;
$pdf_data['title'] = $article->title();
$topic_title = $article->topic_title();
$topic_title = news_html2text($myts->undoHtmlSpecialChars($topic_title));
$pdf_data['subtitle'] = $topic_title;
$pdf_data['subsubtitle'] = '';
$pdf_data['date'] = formatTimestamp($article->published(), $dateformat);
$pdf_data['filename'] = preg_replace("/[^0-9a-z\\-_\\.]/i", '', $myts->htmlSpecialChars($article->topic_title()) . ' - ' . $article->title());
$pdf_data['filename'] = 'test';
$hometext = $article->hometext();
$bodytext = $article->bodytext();
$content = $myts->undoHtmlSpecialChars($hometext) . '<br /><br />' . $myts->undoHtmlSpecialChars($bodytext);
$content = str_replace('[pagebreak]', '<br /><br />', $content);
$pdf_data['content'] = $content;
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:makepdf.php

示例3: isset

include_once '../../mainfile.php';
include_once XOOPS_ROOT_PATH . '/modules/news/class/class.newsstory.php';
include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
// We verify that the user can post comments **********************************
if (!isset($xoopsModuleConfig)) {
    die;
}
if ($xoopsModuleConfig['com_rule'] == 0) {
    // Comments are deactivate
    die;
}
if ($xoopsModuleConfig['com_anonpost'] == 0 && !is_object($xoopsUser)) {
    // Anonymous users can't post
    die;
}
// ****************************************************************************
$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
if ($com_itemid > 0) {
    $article = new NewsStory($com_itemid);
    if ($article->storyid > 0) {
        $com_replytext = _POSTEDBY . '&nbsp;<b>' . $article->uname() . '</b>&nbsp;' . _DATE . '&nbsp;<b>' . formatTimestamp($article->published(), news_getmoduleoption('dateformat')) . '</b><br /><br />' . $article->hometext();
        $bodytext = $article->bodytext();
        if ($bodytext != '') {
            $com_replytext .= '<br /><br />' . $bodytext . '';
        }
        $com_replytitle = $article->title();
        include_once XOOPS_ROOT_PATH . '/include/comment_new.php';
    } else {
        exit;
    }
}
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:comment_new.php

示例4: foreach

         $filesarr = $sfiles->getAllbyStory($storyid);
         if (count($filesarr) > 0) {
             foreach ($filesarr as $onefile) {
                 $onefile->delete();
             }
         }
         xoops_comment_delete($xoopsModule->getVar('mid'), $storyid);
         xoops_notification_deletebyitem($xoopsModule->getVar('mid'), 'story', $storyid);
         updateCache();
         redirect_header('index.php?op=newarticle', 1, _AM_DBUPDATED);
         exit;
     } else {
         $story = new NewsStory($storyid);
         xoops_cp_header();
         echo "<h4>" . _AM_CONFIG . "</h4>";
         xoops_confirm(array('op' => 'delete', 'storyid' => $storyid, 'ok' => 1), 'index.php', _AM_RUSUREDEL . '<br />' . $story->title());
     }
     break;
 case "topicsmanager":
     topicsmanager();
     break;
 case "addTopic":
     addTopic();
     break;
 case "delTopic":
     delTopic();
     break;
 case "modTopicS":
     modTopicS();
     break;
 case "edit":
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:index.php

示例5: array

         }
     }
 }
 $destname = '';
 $result = $story->store();
 if ($result) {
     if ($approveprivilege && news_getmoduleoption('tags')) {
         $tag_handler = xoops_getmodulehandler('tag', 'tag');
         $tag_handler->updateByItem($_POST['item_tag'], $story->storyid(), $xoopsModule->getVar('dirname'), 0);
     }
     if (!$editmode) {
         // 	Notification
         // TODO: modifier afin qu'en cas de prépublication, la notification ne se fasse pas
         $notification_handler =& xoops_gethandler('notification');
         $tags = array();
         $tags['STORY_NAME'] = $story->title();
         $tags['STORY_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/article.php?storyid=' . $story->storyid();
         // If notify checkbox is set, add subscription for approve
         if ($notifypub && $approve) {
             include_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
             $notification_handler->subscribe('story', $story->storyid(), 'approve', XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE, $xoopsModule->getVar('mid'), $story->uid());
         }
         if ($approve == 1) {
             $notification_handler->triggerEvent('global', 0, 'new_story', $tags);
             $notification_handler->triggerEvent('story', $story->storyid(), 'approve', $tags);
             // Added by Lankford on 2007/3/23
             $notification_handler->triggerEvent('category', $story->topicid(), 'new_story', $tags);
         } else {
             $tags['WAITINGSTORIES_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/admin/index.php?op=newarticle';
             $notification_handler->triggerEvent('global', 0, 'story_submit', $tags);
         }
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:submit.php

示例6: b_news_top_show

/**
 * Notes about the spotlight :
 * If you have restricted topics on index page (in fact if the program must completly respect the permissions) and if
 * the news you have selected to be viewed in the spotlight can't be viewed by someone then the spotlight is not visible !
 * This is available in the classical and in the tabbed view.
 * But if you have uncheck the option "Restrict topics on index page", then the news will be visible but users without
 * permissions will be rejected when they will try to read news content.
 *
 * Also, if you have selected a tabbed view and wanted to use the Spotlight but did not choosed a story, then the block
 * will switch to the "most recent news" mode (the visible news will be searched according to the permissions)
 */
function b_news_top_show($options)
{
    global $xoopsConfig;
    include_once XOOPS_ROOT_PATH . '/modules/news/include/functions.php';
    $myts =& MyTextSanitizer::getInstance();
    $block = array();
    $displayname = news_getmoduleoption('displayname');
    $tabskin = news_getmoduleoption('tabskin');
    if (file_exists(XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php')) {
        include_once XOOPS_ROOT_PATH . '/modules/news/language/' . $xoopsConfig['language'] . '/main.php';
    } else {
        include_once XOOPS_ROOT_PATH . '/modules/news/language/english/main.php';
    }
    $block['displayview'] = $options[8];
    $block['tabskin'] = $tabskin;
    $block['imagesurl'] = XOOPS_URL . '/modules/news/images/';
    $restricted = news_getmoduleoption('restrictindex');
    $dateformat = news_getmoduleoption('dateformat');
    $infotips = news_getmoduleoption('infotips');
    $newsrating = news_getmoduleoption('ratenews');
    if ($dateformat == '') {
        $dateformat = 's';
    }
    $perm_verified = false;
    $news_visible = true;
    // Is the spotlight visible ?
    if ($options[4] == 1 && $restricted && $options[5] == 0) {
        $perm_verified = true;
        $permittedtopics = news_MygetItemIds();
        $permstory = new NewsStory($options[6]);
        if (!in_array($permstory->topicid(), $permittedtopics)) {
            $usespotlight = false;
            $news_visible = false;
            $topicstitles = array();
        }
        $options[4] == 0;
    }
    // Try to see what tabs are visibles (if we are in restricted view of course)
    if ($options[8] == 2 && $restricted && $options[14] != 0) {
        $topics2 = array();
        $permittedtopics = news_MygetItemIds();
        $topics = array_slice($options, 14);
        foreach ($topics as $onetopic) {
            if (in_array($onetopic, $permittedtopics)) {
                $topics2[] = $onetopic;
            }
        }
        $before = array_slice($options, 0, 14);
        $options = array_merge($before, $topics2);
    }
    if ($options[8] == 2) {
        // Tabbed view ********************************************************************************************
        $defcolors[1] = array('#F90', '#FFFFFF', '#F90', '#C60', '#999');
        // Bar Style
        $defcolors[2] = array('#F90', '#FFFFFF', '#F90', '#AAA', '#666');
        // Beveled
        $defcolors[3] = array('#F90', '#FFFFFF', '', '#789', '#789');
        // Classic
        $defcolors[4] = array('#F90', '#FFFFFF', '', '', '');
        // Folders
        $defcolors[5] = array('#F90', '#FFFFFF', '#CCC', 'inherit', '#999');
        // MacOs
        $defcolors[6] = array('#F90', '#FFFFFF', '#FFF', '#DDD', '#999');
        // Plain
        $defcolors[7] = array('#F90', '#FFFFFF', '', '', '');
        // Rounded
        $defcolors[8] = array('#F90', '#FFFFFF', '#F90', '#930', '#C60');
        // ZDnet
        $myurl = $_SERVER['PHP_SELF'];
        if (substr($myurl, strlen($myurl) - 1, 1) == '/') {
            $myurl .= 'index.php';
        }
        $myurl .= '?';
        foreach ($_GET as $key => $value) {
            if ($key != 'NewsTab') {
                $myurl .= $key . '=' . $value . '&';
            }
        }
        $block['url'] = $myurl;
        $tabscount = 0;
        $usespotlight = false;
        if (isset($_GET['NewsTab'])) {
            $_SESSION['NewsTab'] = intval($_GET['NewsTab']);
            $currenttab = intval($_GET['NewsTab']);
        } elseif (isset($_SESSION['NewsTab'])) {
            $currenttab = intval($_SESSION['NewsTab']);
        } else {
            $currenttab = 0;
        }
//.........这里部分代码省略.........
开发者ID:trabisdementia,项目名称:xuups,代码行数:101,代码来源:news_top.php

示例7: formatTimestamp

if (empty($_GET['com_id']) && $storypage == 0) {
    if (is_object($xoopsUser)) {
        if ($xoopsUser->getVar('uid') == $article->uid() || news_is_admin_group()) {
            // nothing ! ;-)
        } else {
            $article->updateCounter();
        }
    } else {
        $article->updateCounter();
    }
}
$xoopsOption['template_main'] = 'news_article.html';
include_once XOOPS_ROOT_PATH . '/header.php';
$story['id'] = $storyid;
$story['posttime'] = formatTimestamp($article->published(), $dateformat);
$story['news_title'] = $article->title();
$story['title'] = $article->textlink() . '&nbsp;:&nbsp;' . $article->title();
$story['topic_title'] = $article->textlink();
$story['text'] = $article->hometext();
$bodytext = $article->bodytext();
if (xoops_trim($bodytext) != '') {
    $articletext = array();
    if (news_getmoduleoption('enhanced_pagenav')) {
        $articletext = preg_split('/(\\[pagebreak:|\\[pagebreak)(.*)(\\])/iU', $bodytext);
        $arr_titles = array();
        $auto_summary = $article->auto_summary($bodytext, $arr_titles);
        $bodytext = str_replace('[summary]', $auto_summary, $bodytext);
        $articletext[$storypage] = str_replace('[summary]', $auto_summary, $articletext[$storypage]);
        $story['text'] = str_replace('[summary]', $auto_summary, $story['text']);
    } else {
        $articletext = explode('[pagebreak]', $bodytext);
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:article.php

示例8: isset

    exit;
}
$storypage = isset($_GET['page']) ? intval($_GET['page']) : 0;
$dateformat = getmoduleoption('dateformat');
$hcontent = '';
/**
 * update counter only when viewing top page
 */
if (empty($_GET['com_id']) && $storypage == 0) {
    $article->updateCounter();
}
$xoopsOption['template_main'] = 'news_article.html';
include_once XOOPS_ROOT_PATH . '/header.php';
$story['id'] = $storyid;
$story['posttime'] = formatTimestamp($article->published(), $dateformat);
$story['news_title'] = $article->title();
$story['title'] = $article->textlink() . "&nbsp;:&nbsp;" . $article->title();
$story['topic_title'] = $article->textlink();
$story['text'] = $article->hometext();
$bodytext = $article->bodytext();
if (xoops_trim($bodytext) != '') {
    $articletext = explode("[pagebreak]", $bodytext);
    $story_pages = count($articletext);
    if ($story_pages > 1) {
        include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
        $pagenav = new XoopsPageNav($story_pages, 1, $storypage, 'page', 'storyid=' . $storyid);
        if (news_isbot()) {
            // A bot is reading the articles, we are going to show him all the links to the pages
            $xoopsTpl->assign('pagenav', $pagenav->renderNav($story_pages));
        } else {
            $xoopsTpl->assign('pagenav', $pagenav->renderNav());
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:article.php

示例9: checkEmail

        $tpl->assign('channel_webmaster', checkEmail($xoopsConfig['adminmail'], true));
        // Fed up with spam
        $tpl->assign('channel_editor', checkEmail($xoopsConfig['adminmail'], true));
        // Fed up with spam
        $tpl->assign('channel_category', $xt->topic_title());
        $tpl->assign('channel_generator', 'XOOPS');
        $tpl->assign('channel_language', _LANGCODE);
        $tpl->assign('image_url', XOOPS_URL . '/images/logo.gif');
        $dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.gif');
        if (empty($dimention[0])) {
            $width = 88;
        } else {
            $width = $dimention[0] > 144 ? 144 : $dimention[0];
        }
        if (empty($dimention[1])) {
            $height = 31;
        } else {
            $height = $dimention[1] > 400 ? 400 : $dimention[1];
        }
        $tpl->assign('image_width', $width);
        $tpl->assign('image_height', $height);
        $count = $sarray;
        foreach ($sarray as $story) {
            $storytitle = $story->title();
            //if we are allowing html, we need to use htmlspecialchars or any bug will break the output
            $description = htmlspecialchars($story->hometext());
            $tpl->append('items', array('title' => xoops_utf8_encode($storytitle), 'link' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'guid' => XOOPS_URL . '/modules/news/article.php?storyid=' . $story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode($description)));
        }
    }
}
$tpl->display('db:news_rss.html', $topicid);
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:backendt.php

示例10: NewsStory

include_once XOOPS_ROOT_PATH . '/header.php';
$myts =& MyTextSanitizer::getInstance();
// set comment mode if not set
$article = new NewsStory($storyid);
if ($article->published() == 0 || $article->published() > time()) {
    redirect_header('index.php', 2, _NW_NOSTORY);
    exit;
}
$storypage = isset($_GET['page']) ? intval($_GET['page']) : 0;
// update counter only when viewing top page
if (empty($_GET['com_id']) && $storypage == 0) {
    $article->updateCounter();
}
$story['id'] = $storyid;
$story['posttime'] = formatTimestamp($article->published());
$story['title'] = $article->textlink() . "&nbsp;:&nbsp;" . $article->title();
$story['text'] = $article->hometext();
$bodytext = $article->bodytext();
if (trim($bodytext) != '') {
    $articletext = explode("[pagebreak]", $bodytext);
    $story_pages = count($articletext);
    if ($story_pages > 1) {
        include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
        $pagenav = new XoopsPageNav($story_pages, 1, $storypage, 'page', 'storyid=' . $storyid);
        $xoopsTpl->assign('pagenav', $pagenav->renderNav());
        //$xoopsTpl->assign('pagenav', $pagenav->renderImageNav());
        if ($storypage == 0) {
            $story['text'] = $story['text'] . '<br /><br />' . $articletext[$storypage];
        } else {
            $story['text'] = $articletext[$storypage];
        }
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:31,代码来源:article.php

示例11: getmoduleoption

    redirect_header(XOOPS_URL . '/modules/news/index.php', 2, _NW_NOSTORY);
    exit;
}
$gperm_handler =& xoops_gethandler('groupperm');
if (is_object($xoopsUser)) {
    $groups = $xoopsUser->getGroups();
} else {
    $groups = XOOPS_GROUP_ANONYMOUS;
}
if (!$gperm_handler->checkRight("news_view", $article->topicid(), $groups, $xoopsModule->getVar('mid'))) {
    redirect_header(XOOPS_URL . '/modules/news/index.php', 3, _NOPERM);
    exit;
}
$dateformat = getmoduleoption('dateformat');
$article_data = $article->hometext() . $article->bodytext();
$forumdata['topic_title'] = news_html2text($myts->undoHtmlSpecialChars($article->title()));
$pdf_data['title'] = news_html2text($myts->undoHtmlSpecialChars($article->title()));
$pdf_data['subtitle'] = $myts->htmlSpecialChars($article->topic_title());
$pdf_data['subsubtitle'] = '';
$pdf_data['date'] = formatTimestamp($article->published(), $dateformat);
$pdf_data['filename'] = preg_replace("/[^0-9a-z\\-_\\.]/i", '', $myts->htmlSpecialChars($article->topic_title()) . ' - ' . $article->title());
$pdf_data['filename'] = 'test';
$content = $article->hometext() . '<br /><br />' . $article->bodytext();
$content = str_replace("[pagebreak]", "<br /><br />", $content);
$pdf_data['content'] = $content;
$pdf_data['author'] = $article->uname();
//Other stuff
$puff = '<br />';
$puffer = '<br /><br /><br />';
//create the A4-PDF...
$pdf_config['slogan'] = $xoopsConfig['sitename'] . ' - ' . $xoopsConfig['slogan'];
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:makepdf.php

示例12: while

 $news->Setkeywords('');
 $news->Setdescription('');
 $news->counter = $article['counter'];
 $news->setTopicId($news_topicid);
 $news->setIhome($article['ihome']);
 $news->setNotifyPub($article['notifypub']);
 $news->story_type = $article['story_type'];
 $news->setTopicdisplay($article['topicdisplay']);
 $news->setTopicalign($article['topicalign']);
 $news->setComments($article['comments']);
 $news->rating = $article['rating'];
 $news->votes = $votes['cpt'];
 $approved = $article['published'] > 0 ? true : false;
 $news->approved = $approved;
 $news->store($approved);
 echo '<br>&nbsp;&nbsp;This story was imported : ' . $news->title();
 $news_newsid = $news->storyid();
 // ********************
 // The files
 $result4 = $db->query('SELECT * FROM ' . $ams_files . ' WHERE storyid=' . $ams_newsid);
 while ($file = $db->fetchArray($result4)) {
     $sfile = new sFiles();
     $sfile->setFileRealName($file['filerealname']);
     $sfile->setStoryid($news_newsid);
     $sfile->date = $file['date'];
     $sfile->setMimetype($file['mimetype']);
     $sfile->setDownloadname($file['downloadname']);
     $sfile->counter = $file['counter'];
     $sfile->store();
     echo '<br>&nbsp;&nbsp;&nbsp;&nbsp;This file was imported : ' . $sfile->getDownloadname();
     $news_fileid = $sfile->fileid;
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:amsimport.php

示例13: PrintPage

}
if (!$gperm_handler->checkRight("news_view", $story->topicid(), $groups, $xoopsModule->getVar('mid'))) {
    redirect_header(XOOPS_URL . '/modules/news/index.php', 3, _NOPERM);
    exit;
}
$xoops_meta_keywords = '';
$xoops_meta_description = '';
if (trim($story->keywords()) != '') {
    $xoops_meta_keywords = $story->keywords();
} else {
    $xoops_meta_keywords = news_createmeta_keywords($story->hometext() . '<br />' . $story->bodytext());
}
if (trim($story->description()) != '') {
    $xoops_meta_description = $story->description();
} else {
    $xoops_meta_description = $story->title();
}
function PrintPage()
{
    global $xoopsConfig, $xoopsModule, $story, $xoops_meta_keywords, $xoops_meta_description;
    $myts =& MyTextSanitizer::getInstance();
    $datetime = formatTimestamp($story->published(), getmoduleoption('dateformat'));
    echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
    echo '<html><head>';
    echo '<meta http-equiv="Content-Type" content="text/html; charset=' . _CHARSET . '" />';
    echo '<title>' . $myts->htmlSpecialChars($story->title()) . ' - ' . _NW_PRINTER . ' - ' . $myts->htmlSpecialChars($story->topic_title()) . ' - ' . $xoopsConfig['sitename'] . '</title>';
    echo '<meta name="AUTHOR" content="' . $xoopsConfig['sitename'] . '" />';
    echo '<meta name="keywords" content="' . $xoops_meta_keywords . '" />';
    echo '<meta name="COPYRIGHT" content="Copyright (c) 2001 by ' . $xoopsConfig['sitename'] . '" />';
    echo '<meta name="DESCRIPTION" content="' . $xoops_meta_description . '" />';
    echo '<meta name="GENERATOR" content="' . XOOPS_VERSION . '" />';
开发者ID:BackupTheBerlios,项目名称:soopa,代码行数:31,代码来源:print.php

示例14: mktime

    $xoopsTpl->assign('currentyear', $fromyear);
    $xoopsTpl->assign('lang_actions', _NW_ACTIONS);
    $xoopsTpl->assign('lang_date', _NW_DATE);
    $xoopsTpl->assign('lang_views', _NW_VIEWS);
    // must adjust the selected time to server timestamp
    $timeoffset = $useroffset - $xoopsConfig['server_TZ'];
    $monthstart = mktime(0 - $timeoffset, 0, 0, $frommonth, 1, $fromyear);
    $monthend = mktime(23 - $timeoffset, 59, 59, $frommonth + 1, 0, $fromyear);
    $monthend = $monthend > time() ? time() : $monthend;
    $sql = "SELECT * FROM " . $xoopsDB->prefix("stories") . " WHERE published > {$monthstart} and published < {$monthend} ORDER by published DESC";
    $result = $xoopsDB->query($sql);
    $count = 0;
    while ($myrow = $xoopsDB->fetchArray($result)) {
        $article = new NewsStory($myrow);
        $story = array();
        $story['title'] = "<a href='index.php?storytopic=" . $article->topicid() . "'>" . $article->topic_title() . "</a>: <a href='article.php?storyid=" . $article->storyid() . "'>" . $article->title() . "</a>";
        $story['counter'] = $article->counter();
        $story['date'] = formatTimestamp($article->published(), "m", $useroffset);
        $story['print_link'] = 'print.php?storyid=' . $article->storyid();
        $story['mail_link'] = 'mailto:?subject=' . sprintf(_NW_INTARTICLE, $xoopsConfig['sitename']) . '&amp;body=' . sprintf(_NW_INTARTFOUND, $xoopsConfig['sitename']) . ':  ' . XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/article.php?storyid=' . $article->storyid();
        $xoopsTpl->append('stories', $story);
        $count++;
    }
    $xoopsTpl->assign('lang_printer', _NW_PRINTERFRIENDLY);
    $xoopsTpl->assign('lang_sendstory', _NW_SENDSTORY);
    $xoopsTpl->assign('lang_storytotal', sprintf(_NW_THEREAREINTOTAL, $count));
} else {
    $xoopsTpl->assign('show_articles', false);
}
$xoopsTpl->assign('lang_newsarchives', _NW_NEWSARCHIVES);
include XOOPS_ROOT_PATH . "/footer.php";
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:archive.php

示例15: PrintPage

}
if (!$gperm_handler->checkRight('news_view', $story->topicid(), $groups, $xoopsModule->getVar('mid'))) {
    redirect_header(XOOPS_URL . '/modules/news/index.php', 3, _NOPERM);
    exit;
}
$xoops_meta_keywords = '';
$xoops_meta_description = '';
if (trim($story->keywords()) != '') {
    $xoops_meta_keywords = $story->keywords();
} else {
    $xoops_meta_keywords = news_createmeta_keywords($story->hometext() . ' ' . $story->bodytext());
}
if (trim($story->description()) != '') {
    $xoops_meta_description = $story->description();
} else {
    $xoops_meta_description = strip_tags($story->title());
}
function PrintPage()
{
    global $xoopsConfig, $xoopsModule, $story, $xoops_meta_keywords, $xoops_meta_description;
    $myts =& MyTextSanitizer::getInstance();
    $datetime = formatTimestamp($story->published(), news_getmoduleoption('dateformat'));
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xml:lang="<?php 
    echo _LANGCODE;
    ?>
" lang="<?php 
    echo _LANGCODE;
    ?>
开发者ID:trabisdementia,项目名称:xuups,代码行数:31,代码来源:print.php


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