Esempio n. 1
0
$gperm_handler =& xoops_gethandler('groupperm');
if (is_object($xoopsUser)) {
    $groups = $xoopsUser->getGroups();
} else {
	$groups = XOOPS_GROUP_ANONYMOUS;
}
if (!$gperm_handler->checkRight('nw_view', $story->topicid(), $groups, $xoopsModule->getVar('mid'))) {
	redirect_header(NW_MODULE_URL . '/index.php', 3, _NOPERM);
	exit();
}

$xoops_meta_keywords='';
$xoops_meta_description='';


if(trim($story->keywords()) != '') {
	$xoops_meta_keywords = $story->keywords();
} else {
	$xoops_meta_keywords = nw_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;
Esempio n. 2
0
		    $nohtml = isset($_POST['nohtml']) ? intval($_POST['nohtml']) : 0;
			$story->setNohtml($nohtml);
			if (!isset($_POST['approve'])) {
			    $approve = 0;
			}
		} else {
			$story->setNohtml = 1;
		}

		$title = $story->title('InForm');
	  	$hometext = $story->hometext('InForm');
	  	if ($approveprivilege) {
  	    	$bodytext = $story->bodytext('InForm');
  	    	$ihome = $story -> ihome();
  	    	$description = $story->description('E');
  	    	$keywords = $story->keywords('E');
  		}

		//Display post preview
		$newsauthor=$story->uid();
		$p_title = $story->title('Preview');
		$p_hometext = $story->hometext('Preview');
		if ($approveprivilege) {
		    $p_bodytext = $story->bodytext('Preview');
	    	$p_hometext .= '<br /><br />'.$p_bodytext;
		}
		$topicalign2 = isset($story->topicalign) ? 'align="'.$story->topicalign().'"' : '';
		$p_hometext = (($xt->topic_imgurl() != '') && $topicdisplay) ? '<img src="images/topics/'.$xt->topic_imgurl().'" '.$topicalign2.' alt="" />'.$p_hometext : $p_hometext;
		themecenterposts($p_title, $p_hometext);

		//Display post edit form