<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* File containing actions that can be performed by visitors of the site,
* like adding comments, etc...
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: action.php,v 1.6 2006-07-12 07:11:45 kimitake Exp $
- * $NucleusJP: action.php,v 1.5 2005/04/20 06:49:45 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: action.php,v 1.7 2007-02-04 06:28:44 kimitake Exp $
+ * $NucleusJP: action.php,v 1.6 2006/07/12 07:11:45 kimitake Exp $
*/
$CONF = array();
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
/**
* Nucleus Atom Syndication
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: atom.php,v 1.6 2006-07-12 07:11:45 kimitake Exp $
- * $NucleusJP: atom.php,v 1.5 2005/04/20 06:49:45 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: atom.php,v 1.7 2007-02-04 06:28:44 kimitake Exp $
+ * $NucleusJP: atom.php,v 1.6 2006/07/12 07:11:45 kimitake Exp $
*/
header('Pragma: no-cache');
<?php
+//setup for benchmarking
+include('./benchmark.inc');
// This file will generate and return the main page of the site
$CONF = array();
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: install.php,v 1.6 2006-07-17 19:59:46 kimitake Exp $
- * $NucleusJP$
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: install.php,v 1.7 2007-02-04 06:28:44 kimitake Exp $
+ * $NucleusJP: install.php,v 1.6 2006/07/17 19:59:46 kimitake Exp $
*/
/*
/* for the non-php systems that decide to show the contents:
?></div><?php */
-?>
\ No newline at end of file
+?>
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* in order to use this.
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: bookmarklet.php,v 1.8 2007-02-03 05:41:29 kimitake Exp $
- * $NucleusJP: bookmarklet.php,v 1.7 2006/07/17 20:01:39 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: bookmarklet.php,v 1.9 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: bookmarklet.php,v 1.8 2007/02/03 05:41:29 kimitake Exp $
*/
// bookmarklet is part of admin area (might need XML-RPC)
exit;
}
-if (!$member->isLoggedIn()) {
+if (!$member->isLoggedIn() ) {
bm_loginAndPassThrough();
exit;
}
// on successfull login
-if (($action == 'login') && ($member->isLoggedIn()))
+if ( ($action == 'login') && ($member->isLoggedIn() ) ) {
$action = requestVar('nextaction');
-if ($action == '')
+}
+
+if ($action == '') {
$action = 'add';
+}
-sendContentType('application/xhtml+xml', 'bookmarklet-'.$action);
+sendContentType('application/xhtml+xml', 'bookmarklet-' . $action);
// check ticket
$action = strtolower($action);
$aActionsNotToCheck = array('login', 'add', 'edit');
-if (!in_array($action, $aActionsNotToCheck))
-{
- if (!$manager->checkTicket())
+
+if (!in_array($action, $aActionsNotToCheck) ) {
+
+ if (!$manager->checkTicket() ) {
bm_doError(_ERROR_BADTICKET);
-}
+ }
+}
// find out what to do
switch ($action) {
+ // adds the item for real
case 'additem':
- bm_doAddItem(); // adds the item for real
+ bm_doAddItem();
break;
+
+ // shows the edit item form
case 'edit':
- bm_doEditForm(); // shows the edit item form
+ bm_doEditForm();
break;
- case 'edititem': // edits the item for real
+
+ // edits the item for real
+ case 'edititem':
bm_doEditItem();
break;
- case 'login': // on login, 'action' gets changed to 'nextaction'
+
+ // on login, 'action' gets changed to 'nextaction'
+ case 'login':
bm_doError('Something went wrong');
break;
+
+ // shows the fill in form
case 'add':
default:
- bm_doShowForm(); // shows the fill in form
+ bm_doShowForm();
break;
}
$manager->loadClass('ITEM');
$result = ITEM::createFromRequest();
- if ($result['status'] == 'error')
+ if ($result['status'] == 'error') {
bm_doError($result['message']);
+ }
$blogid = getBlogIDFromItemID($result['itemid']);
$blog =& $manager->getBlog($blogid);
function bm_doEditItem() {
global $member, $manager, $CONF;
- $itemid = intRequestVar('itemid');
- $catid = postVar('catid');
+ $itemid = intRequestVar('itemid');
+ $catid = postVar('catid');
// only allow if user is allowed to alter item
- if (!$member->canUpdateItem($itemid, $catid))
+ if (!$member->canUpdateItem($itemid, $catid) ) {
bm_doError(_ERROR_DISALLOWED);
+ }
- $body = postVar('body');
- $title = postVar('title');
- $more = postVar('more');
- $closed = intPostVar('closed');
+ $body = postVar('body');
+ $title = postVar('title');
+ $more = postVar('more');
+ $closed = intPostVar('closed');
$actiontype = postVar('actiontype');
-
- $draftid = intPostVar('draftid');
+ $draftid = intPostVar('draftid');
// redirect to admin area on delete (has delete confirmation)
if ($actiontype == 'delete') {
- redirect('index.php?action=itemdelete&itemid='.$itemid);
+ redirect('index.php?action=itemdelete&itemid=' . $itemid);
exit;
}
// create new category if needed (only on edit/changedate)
- if (strstr($catid,'newcat')) {
+ if (strstr($catid,'newcat') ) {
// get blogid
- list($blogid) = sscanf($catid,"newcat-%d");
+ list($blogid) = sscanf($catid, "newcat-%d");
// create
$blog =& $manager->getBlog($blogid);
$catid = $blog->createNewCategory();
// show error when sth goes wrong
- if (!$catid)
+ if (!$catid) {
bm_doError('Could not create new category');
+ }
}
// only edit action is allowed for bookmarklet edit
case 'changedate':
$publish = 1;
$wasdraft = 0;
- $timestamp = mktime(postVar('hour'), postVar('minutes'), 0, postVar('month'), postVar('day'), postVar('year'));
+ $timestamp = mktime(postVar('hour'), postVar('minutes'), 0, postVar('month'), postVar('day'), postVar('year') );
break;
case 'edit':
$publish = 1;
}
// show success message
- if ($catid != intPostVar('catid'))
+ if ($catid != intPostVar('catid') ) {
bm_message(_ITEM_UPDATED, _ITEM_UPDATED, 'アイテムは追加され、新しいカテゴリーが作成されました。<a href="index.php?action=categoryedit&blogid='.$blog->getID().'&catid='.$catid.'" onclick="if (event && event.preventDefault) event.preventDefault(); window.open(this.href); return false;" title="Opens in new window">ここをクリックしてカテゴリーの名前と説明を編集してください。</a>', '');
- else
+ } else {
bm_message(_ITEM_UPDATED, _ITEM_UPDATED, _ITEM_UPDATED, '');
+ }
}
function bm_loginAndPassThrough() {
<?php bm_style(); ?>
</head>
<body>
- <h1><?php echo _LOGIN_PLEASE?></h1>
+ <h1><?php echo _LOGIN_PLEASE ?></h1>
<form method="post" action="bookmarklet.php">
<p>
<input name="action" value="login" type="hidden" />
- <input name="blogid" value="<?php echo htmlspecialchars($blogid) ?>" type="hidden" />
- <input name="logtext" value="<?php echo htmlspecialchars($log_text) ?>" type="hidden" />
- <input name="loglink" value="<?php echo htmlspecialchars($log_link) ?>" type="hidden" />
- <input name="loglinktitle" value="<?php echo htmlspecialchars($log_linktitle) ?>" type="hidden" />
- <?php echo _LOGINFORM_NAME?>:
+ <input name="blogid" value="<?php echo htmlspecialchars($blogid); ?>" type="hidden" />
+ <input name="logtext" value="<?php echo htmlspecialchars($log_text); ?>" type="hidden" />
+ <input name="loglink" value="<?php echo htmlspecialchars($log_link); ?>" type="hidden" />
+ <input name="loglinktitle" value="<?php echo htmlspecialchars($log_linktitle); ?>" type="hidden" />
+ <?php echo _LOGINFORM_NAME ?>:
<br /><input name="login" />
- <br /><?php echo _LOGINFORM_PWD?>:
+ <br /><?php echo _LOGINFORM_PWD ?>:
<br /><input name="password" type="password" />
<br /><br />
- <br /><input type="submit" value="<?php echo _LOGIN?>" />
+ <br /><input type="submit" value="<?php echo _LOGIN ?>" />
</p>
</form>
- <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE?></a></p>
+ <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE ?></a></p>
</body>
</html>
<?php
if (!BLOG::existsID($blogid))
bm_doError(_ERROR_NOSUCHBLOG);
- if (!$member->isTeamMember($blogid))
+ if (!$member->isTeamMember($blogid) ) {
bm_doError(_ERROR_NOTONTEAM);
+ }
$logje = '';
- if ($log_text)
- $logje .= '<blockquote><div>"' . htmlspecialchars($log_text) .'"</div></blockquote>' . "\n";
- if (!$log_linktitle)
+
+ if ($log_text) {
+ $logje .= '<blockquote><div>"' . htmlspecialchars($log_text) . '"</div></blockquote>' . "\n";
+ }
+
+ if (!$log_linktitle) {
$log_linktitle = $log_link;
- if ($log_link)
- $logje .= '<a href="'. htmlspecialchars($log_link) . '">'. htmlspecialchars($log_linktitle).'</a>';
+ }
+ if ($log_link) {
+ $logje .= '<a href="' . htmlspecialchars($log_link) . '">' . htmlspecialchars($log_linktitle) . '</a>';
+ }
$item['body'] = $logje;
$item['title'] = htmlspecialchars($log_linktitle);
$factory = new PAGEFACTORY($blogid);
- $factory->createAddForm('bookmarklet',$item);
+ $factory->createAddForm('bookmarklet', $item);
}
function bm_doEditForm() {
$itemid = intRequestVar('itemid');
- if (!$manager->existsItem($itemid, 0, 0))
+ if (!$manager->existsItem($itemid, 0, 0) ) {
bm_doError(_ERROR_NOSUCHITEM);
+ }
- if (!$member->canAlterItem($itemid))
+ if (!$member->canAlterItem($itemid) ) {
bm_doError(_ERROR_DISALLOWED);
+ }
- $item =& $manager->getItem($itemid,1,1);
- $blog =& $manager->getBlog(getBlogIDFromItemID($itemid));
+ $item =& $manager->getItem($itemid, 1, 1);
+ $blog =& $manager->getBlog(getBlogIDFromItemID($itemid) );
- $manager->notify('PrepareItemForEdit', array('item' => &$item));
+ $manager->notify('PrepareItemForEdit', array('item' => &$item) );
- if ($blog->convertBreaks()) {
+ if ($blog->convertBreaks() ) {
$item['body'] = removeBreaks($item['body']);
$item['more'] = removeBreaks($item['more']);
}
- $formfactory = new PAGEFACTORY($blog->getID());
- $formfactory->createEditForm('bookmarklet',$item);
-
+ $formfactory = new PAGEFACTORY($blog->getID() );
+ $formfactory->createEditForm('bookmarklet', $item);
}
function bm_doError($msg) {
- bm_message(_ERROR,_ERRORMSG,$msg);
+ bm_message(_ERROR, _ERRORMSG, $msg);
die;
}
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET ?>" />
<title><?php echo $title ?></title>
<?php bm_style(); ?>
- <?php echo $extrahead?>
+ <?php echo $extrahead; ?>
</head>
<body>
- <h1><?php echo $head ?></h1>
- <p><?php echo $msg ?></p>
- <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE?></a></p>
+ <h1><?php echo $head; ?></h1>
+ <p><?php echo $msg; ?></p>
+ <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE ?></a></p>
</body>
</html>
- <?php }
+ <?php
+}
function bm_style() {
echo '<link rel="stylesheet" type="text/css" href="styles/bookmarklet.css" />';
global $CONF;
?>
<script type="text/javascript" defer="defer">
-doc=external.menuArguments.document;
-lt=escape(doc.selection.createRange().text);
-loglink=escape(external.menuArguments.location.href);
-loglinktitle=escape(doc.title);
-wingm=window.open('<?php echo $CONF['AdminURL']?>bookmarklet.php?blogid=<?php echo intGetVar('blogid')?>&logtext='+lt+'&loglink='+loglink+'&loglinktitle='+loglinktitle,'nucleusbm','scrollbars=yes,width=600,height=500,left=10,top=10,status=yes,resizable=yes');
+doc = external.menuArguments.document;
+lt = escape(doc.selection.createRange().text);
+loglink = escape(external.menuArguments.location.href);
+loglinktitle = escape(doc.title);
+wingm = window.open('<?php echo $CONF['AdminURL']?>bookmarklet.php?blogid=<?php echo intGetVar('blogid')?>&logtext=' + lt + '&loglink=' + loglink + '&loglinktitle=' + loglinktitle, 'nucleusbm', 'scrollbars=yes,width=600,height=500,left=10,top=10,status=yes,resizable=yes');
wingm.focus();
</script>
<?php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja-JP" xml:lang="ja-JP">
<head>
- <!-- $Id: plugins.html,v 1.8 2006-07-17 20:02:50 kimitake Exp $ -->
- <!-- $NucleusJP: plugins.html,v 1.7 2006/07/12 07:11:46 kimitake Exp $ -->
+ <!-- $Id: plugins.html,v 1.9 2007-02-04 06:28:45 kimitake Exp $ -->
+ <!-- $NucleusJP: plugins.html,v 1.8 2006/07/17 20:02:50 kimitake Exp $ -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nucleus - プラグイン API</title>
<link rel="stylesheet" type="text/css" href="styles/manual.css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja-JP" xml:lang="ja-JP">
<head>
- <!-- $Id: sqltables.html,v 1.6 2006-07-17 20:02:50 kimitake Exp $ -->
- <!-- $NucleusJP: sqltables.html,v 1.5 2006/07/12 07:11:46 kimitake Exp $ -->
+ <!-- $Id: sqltables.html,v 1.7 2007-02-04 06:28:45 kimitake Exp $ -->
+ <!-- $NucleusJP: sqltables.html,v 1.6 2006/07/17 20:02:50 kimitake Exp $ -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nucleus - SQL テーブル構造</title>
<link rel="stylesheet" type="text/css" href="styles/manual.css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja-JP" xml:lang="ja-JP">
<head>
- <!-- $Id: history.html,v 1.9 2007-02-03 06:48:36 kimitake Exp $ -->
- <!-- $NucleusJP: history.html,v 1.8 2007/02/03 06:22:57 kimitake Exp $ -->
+ <!-- $Id: history.html,v 1.10 2007-02-04 06:28:45 kimitake Exp $ -->
+ <!-- $NucleusJP: history.html,v 1.9 2007/02/03 06:48:36 kimitake Exp $ -->
<title>Nucleus - History</title>
<link rel="stylesheet" type="text/css" href="styles/manual.css" />
</head>
<li>
<b>Nucleus v3.3 "Lithium" (Beta - February 2, 2007)</b>
<ul>
+ <li>FIXED: allow + in email address, see <a href="http://forum.nucleuscms.org/viewtopic.php?t=14207">here</a> (wgroleau)</li>
+ <li>FIXED: XHTML compliance in default skin (admun)</li>
<li>FIXED (<a href="http://dev.nucleuscms.org/tracker/index.php?id=80&do=details">#80</a>): Atom 1.0 support (rakaz)</li>
<li>FIXED (<a href="http://dev.nucleuscms.org/tracker/index.php?id=129&do=details">#129</a>): Plugin API: SpamCheck event called from core. (rakaz)</li>
<li>FIXED (<a href="http://dev.nucleuscms.org/tracker/index.php?id=128&do=details">#128</a>): Don't show DISALLOWED(XXXX) errors (karma)</li>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja-JP" xml:lang="ja-JP">
<head>
- <!-- $Id: index.html,v 1.7 2007-01-31 10:02:57 kimitake Exp $ -->
- <!-- $NucleusJP: index.html,v 1.6 2006/07/17 20:02:50 kimitake Exp $ -->
+ <!-- $Id: index.html,v 1.8 2007-02-04 06:28:45 kimitake Exp $ -->
+ <!-- $NucleusJP: index.html,v 1.7 2007/01/31 10:02:57 kimitake Exp $ -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nucleus CMS マニュアル</title>
<link rel="stylesheet" type="text/css" href="styles/manual.css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja-JP" xml:lang="ja-JP">
<head>
- <!-- $Id: skins.html,v 1.5 2006-07-12 07:11:46 kimitake Exp $ -->
- <!-- $NucleusJP: skins.html,v 1.4 2005/03/19 08:34:53 kimitake Exp $ -->
+ <!-- $Id: skins.html,v 1.6 2007-02-04 06:28:45 kimitake Exp $ -->
+ <!-- $NucleusJP: skins.html,v 1.5 2006/07/12 07:11:46 kimitake Exp $ -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nucleus - スキンとテンプレートについて</title>
<link rel="stylesheet" type="text/css" href="styles/manual.css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja-JP" xml:lang="ja-JP">
<head>
- <!-- $Id: tips.html,v 1.5 2006-07-12 07:11:46 kimitake Exp $ -->
- <!-- $NucleusJP: tips.html,v 1.4 2005/03/19 08:34:53 kimitake Exp $ -->
+ <!-- $Id: tips.html,v 1.6 2007-02-04 06:28:45 kimitake Exp $ -->
+ <!-- $NucleusJP: tips.html,v 1.5 2006/07/12 07:11:46 kimitake Exp $ -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Nucleus - 便利な使い方ヒントの紹介</title>
<link rel="stylesheet" type="text/css" href="styles/manual.css" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <!-- $Id: forgotpassword.html,v 1.8 2006-07-17 20:01:39 kimitake Exp $ -->
- <!-- $NucleusJP: forgotpassword.html,v 1.7 2006/07/12 07:11:46 kimitake Exp $ -->
+ <!-- $Id: forgotpassword.html,v 1.9 2007-02-04 06:28:45 kimitake Exp $ -->
+ <!-- $NucleusJP: forgotpassword.html,v 1.8 2006/07/17 20:01:39 kimitake Exp $ -->
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
<title>Nucleus - パスワードの紛失</title>
<style type="text/css">
<a id="nucleus_cf"></a>
<form method="post" action="#nucleus_cf">
+ <div class="commentform">
<input type="hidden" name="action" value="addcomment" />
<input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
<input type="hidden" name="itemid" value="<%itemid%>" />
- <div class="commentform">
<%errordiv%>
<label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>
<textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"><%formdata(body)%></textarea>
<%callback(FormExtra,commentform-loggedin)%>
</div>
-</form>
\ No newline at end of file
+</form>
<a id="nucleus_cf"></a>
<form method="post" action="#nucleus_cf">
+ <div class="commentform">
<input type="hidden" name="action" value="addcomment" />
<input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
<input type="hidden" name="itemid" value="<%itemid%>" />
- <div class="commentform">
<%errordiv%>
<label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>
<input type="submit" alt="<%text(_COMMENTFORM_SUBMIT)%>" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />
</div>
-</form>
\ No newline at end of file
+</form>
<a id="nucleus_lf"></a>
<form method="post" action="#nucleus_lf">
-<input type="hidden" name="action" value="login" />
<div class="loginform">
+<input type="hidden" name="action" value="login" />
<%errordiv%>
<label for="nucleus_lf_name" accesskey="l"><%text(_LOGINFORM_NAME)%></label>
<input type="submit" alt="<%text(_LOGIN)%>" value="<%text(_LOGIN)%>" class="formbutton" />
</div>
-</form>
\ No newline at end of file
+</form>
<a id="nucleus_mf"></a>
<form method="post" action="#nucleus_mf">
+ <div class="mailform">
<input type="hidden" name="memberid" value="<%formdata(memberid)%>" />
<input type="hidden" name="action" value="sendmessage" />
<input type="hidden" name="url" value="<%formdata(url)%>" />
- <div class="mailform">
<%errordiv%>
<textarea alt="<%text(_MMAIL_MAIL)%>" name="message" class="formfield" rows="<%formdata(rows)%>" cols="<%formdata(cols)%>"><%formdata(message)%></textarea>
<a id="nucleus_mf"></a>
<form method="post" action="#nucleus_mf">
+ <div class="mailform">
<input type="hidden" name="memberid" value="<%formdata(memberid)%>" />
<input type="hidden" name="action" value="sendmessage" />
<input type="hidden" name="url" value="<%formdata(url)%>" />
- <div class="mailform">
<%errordiv%>
<textarea alt="<%text(_MMAIL_MAIL)%>" name="message" class="formfield" rows="<%formdata(rows)%>" cols="<%formdata(cols)%>"><%formdata(message)%></textarea>
<form method="get" action="<%self%>">
+ <div class="searchform">
<input type="hidden" name="amount" value="0" />
<input type="hidden" name="blogid" value="<%formdata(id)%>" />
- <div class="searchform">
<input name="query" alt="<%text(_SEARCHFORM_QUERY)%>" class="formfield" size="10" maxlength="60" accesskey="4" value="<%formdata(query)%>" />
<input type="submit" alt="<%text(_SEARCHFORM_SUBMIT)%>" value="<%text(_SEARCHFORM_SUBMIT)%>" class="formbutton" />
</div>
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: index.php,v 1.7 2006-07-17 20:01:39 kimitake Exp $
- * $NucleusJP: index.php,v 1.6 2005/08/13 07:33:45 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: index.php,v 1.8 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: index.php,v 1.7 2006/07/17 20:01:39 kimitake Exp $
*/
// we are using admin stuff:
$CONF = array();
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* Some JavaScript code for the admin area
*
- * $Id: admin.js,v 1.4 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: admin.js,v 1.3 2005/03/12 06:19:04 kimitake Exp $
+ * $Id: admin.js,v 1.5 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: admin.js,v 1.4 2006/07/12 07:11:47 kimitake Exp $
*/
function help(url) {
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* Some JavaScript code for the bookmarklets
*
- * $Id: bookmarklet.js,v 1.4 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: bookmarklet.js,v 1.3 2005/03/12 06:19:04 kimitake Exp $
+ * $Id: bookmarklet.js,v 1.5 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: bookmarklet.js,v 1.4 2006/07/12 07:11:47 kimitake Exp $
*/
/**
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* That's basically it :)
*
- * $Id: compatibility.js,v 1.4 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: compatibility.js,v 1.3 2005/03/12 06:19:04 kimitake Exp $
+ * $Id: compatibility.js,v 1.5 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: compatibility.js,v 1.4 2006/07/12 07:11:47 kimitake Exp $
*/
// to get the script working when page is sent as application/xhtml+xml
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* This file contains functions to allow adding items from inside the weblog.
* Also contains code to avoid submitting form data twice.
*
- * $Id: edit.js,v 1.5 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: edit.js,v 1.4.2.1 2005/09/27 06:58:55 kimitake Exp $
+ * $Id: edit.js,v 1.6 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: edit.js,v 1.5 2006/07/12 07:11:47 kimitake Exp $
*/
var nucleusConvertBreaks = true;
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* script the check (on the clientside) if a entered value
* is a valid number and remove the invalid chars
*
- * $Id: numbercheck.js,v 1.3 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: numbercheck.js,v 1.2 2005/03/12 06:19:04 kimitake Exp $
+ * $Id: numbercheck.js,v 1.4 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: numbercheck.js,v 1.3 2006/07/12 07:11:47 kimitake Exp $
*/
function checkNumeric(f)
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* of the License, or (at your option) any later version.
* (see nucleus/documentation/index.html#license for more info)
*
- * $Id: opennew.js,v 1.4 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: opennew.js,v 1.3 2005/03/12 06:19:04 kimitake Exp $
+ * $Id: opennew.js,v 1.5 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: opennew.js,v 1.4 2006/07/12 07:11:47 kimitake Exp $
*
* JavaScript to open non-local links in a new window.
*
document.links[i].target = to;
}
}
-}
\ No newline at end of file
+}
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* @require compatibility.js
*
- * $Id: templateEdit.js,v 1.4 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: templateEdit.js,v 1.3 2005/03/12 06:19:04 kimitake Exp $
+ * $Id: templateEdit.js,v 1.5 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: templateEdit.js,v 1.4 2006/07/12 07:11:47 kimitake Exp $
*/
var amountOfFields = 1;
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Actions that can be called via action.php
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ACTION.php,v 1.6 2007-01-31 10:02:58 kimitake Exp $
- * $NucleusJP: ACTION.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: ACTION.php,v 1.7 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: ACTION.php,v 1.6 2007/01/31 10:02:58 kimitake Exp $
*/
class ACTION
{
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Actionlog class for Nucleus
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ACTIONLOG.php,v 1.5 2006-07-17 20:03:44 kimitake Exp $
- * $NucleusJP: ACTIONLOG.php,v 1.4 2005/08/13 07:31:04 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: ACTIONLOG.php,v 1.6 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: ACTIONLOG.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
*/
define('ERROR',1); // only errors
define('WARNING',2); // errors and warnings
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* SKIN::getAllowedActionsForType($type) method
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ACTIONS.php,v 1.3 2006-11-13 00:36:39 kimitake Exp $
- * @version $NucleusJP: ACTIONS.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: ACTIONS.php,v 1.4 2007-02-04 06:28:45 kimitake Exp $
+ * @version $NucleusJP: ACTIONS.php,v 1.3 2006/11/13 00:36:39 kimitake Exp $
*/
class ACTIONS extends BaseActions {
$this->parser =& $parser;
}
- /*
- Forms get parsedincluded now, using an extra <formdata> skinvar
+ /**
+ * Forms get parsedincluded now, using an extra <formdata> skinvar
*/
function doForm($filename) {
global $DIR_NUCLEUS;
array_pop($this->parser->actions); // ticket
}
- function parse_ticket() {
- global $manager;
- $manager->addTicketHidden();
- }
-
- function parse_formdata($what) {
- echo $this->formdata[$what];
- }
- function parse_text($which) {
- // constant($which) only available from 4.0.4 :(
- if (defined($which)) {
- eval("echo $which;");
- }
- }
- function parse_callback($eventName, $type)
- {
- global $manager;
- $manager->notify($eventName, array('type' => $type));
- }
- function parse_errordiv() {
- global $errormessage;
- if ($errormessage)
- echo '<div class="error">', htmlspecialchars($errormessage),'</div>';
- }
-
- function parse_skinname() {
- echo $this->skin->getName();
- }
-
/**
* Checks conditions for if statements
*
return $member->isBlogAdmin($blogid);
}
-
- function parse_ifcat($text = '') {
- if ($text == '') {
- // new behaviour
- $this->parse_if('category');
- } else {
- // old behaviour
- global $catid, $blog;
- if ($blog->isValidCategory($catid))
- echo $text;
- }
- }
-
- // a link to the today page (depending on selected blog, etc...)
- function parse_todaylink($linktext = '') {
- global $blog, $CONF;
- if ($blog)
- echo $this->_link(createBlogidLink($blog->getID(),$this->linkparams), $linktext);
- else
- echo $this->_link($CONF['SiteUrl'], $linktext);
- }
-
- // a link to the archives for the current blog (or for default blog)
- function parse_archivelink($linktext = '') {
- global $blog, $CONF;
- if ($blog)
- echo $this->_link(createArchiveListLink($blog->getID(),$this->linkparams), $linktext);
- else
- echo $this->_link(createArchiveListLink(), $linktext);
- }
-
- // include itemid of prev item
- function parse_previtem() {
- global $itemidprev;
- echo $itemidprev;
- }
-
- // include itemtitle of prev item
- function parse_previtemtitle($format = '') {
- global $itemtitleprev;
-
- switch ($format) {
- case 'xml':
- echo stringToXML ($itemtitleprev);
- break;
- case 'attribute':
- echo stringToAttribute ($itemtitleprev);
- break;
- case 'raw':
- echo $itemtitleprev;
- break;
- default:
- echo htmlspecialchars($itemtitleprev);
- break;
- }
- }
-
- // include itemid of next item
- function parse_nextitem() {
- global $itemidnext;
- echo $itemidnext;
- }
-
- // include itemtitle of next item
- function parse_nextitemtitle($format = '') {
- global $itemtitlenext;
-
- switch ($format) {
- case 'xml':
- echo stringToXML ($itemtitlenext);
- break;
- case 'attribute':
- echo stringToAttribute ($itemtitlenext);
- break;
- case 'raw':
- echo $itemtitlenext;
- break;
- default:
- echo htmlspecialchars($itemtitlenext);
- break;
- }
- }
-
- function parse_prevarchive() {
- global $archiveprev;
- echo $archiveprev;
- }
-
- function parse_nextarchive() {
- global $archivenext;
- echo $archivenext;
- }
-
- function parse_archivetype() {
- global $archivetype;
- echo $archivetype;
- }
-
- function parse_prevlink($linktext = '', $amount = 10) {
- global $itemidprev, $archiveprev, $startpos;
-
- if ($this->skintype == 'item')
- $this->_itemlink($itemidprev, $linktext);
- else if ($this->skintype == 'search' || $this->skintype == 'index')
- $this->_searchlink($amount, $startpos, 'prev', $linktext);
- else
- $this->_archivelink($archiveprev, $linktext);
- }
-
- function parse_nextlink($linktext = '', $amount = 10) {
- global $itemidnext, $archivenext, $startpos;
- if ($this->skintype == 'item')
- $this->_itemlink($itemidnext, $linktext);
- else if ($this->skintype == 'search' || $this->skintype == 'index')
- $this->_searchlink($amount, $startpos, 'next', $linktext);
- else
- $this->_archivelink($archivenext, $linktext);
- }
-
+
/**
* returns either
* - a raw link (html/xml encoded) when no linktext is provided
$l = $u;
return $l;
}
-
+
/**
* Outputs a next/prev link
*
else
$this->parse_todaylink($linktext);
}
-
+
function _archivelink($id, $linktext = '') {
global $CONF, $blog;
if ($id)
else
$this->parse_todaylink($linktext);
}
+
+ /**
+ * Helper function that sets the category that a blog will need to use
+ *
+ * @param $blog
+ * An object of the blog class, passed by reference (we want to make changes to it)
+ * @param $catname
+ * The name of the category to use
+ */
+ function _setBlogCategory(&$blog, $catname) {
+ global $catid;
+ if ($catname != '')
+ $blog->setSelectedCategoryByName($catname);
+ else
+ $blog->setSelectedCategory($catid);
+ }
+
+ function _preBlogContent($type, &$blog) {
+ global $manager;
+ $manager->notify('PreBlogContent',array('blog' => &$blog, 'type' => $type));
+ }
+ function _postBlogContent($type, &$blog) {
+ global $manager;
+ $manager->notify('PostBlogContent',array('blog' => &$blog, 'type' => $type));
+ }
+
+ /**
+ * Parse skinvar additemform
+ */
+ function parse_additemform() {
+ global $blog, $CONF;
+ $this->formdata = array(
+ 'adminurl' => htmlspecialchars($CONF['AdminURL']),
+ 'catid' => $blog->getDefaultCategory()
+ );
+ $blog->InsertJavaScriptInfo();
+ $this->doForm('additemform');
+ }
+
+ /**
+ * Parse skinvar adminurl
+ * (shortcut for admin url)
+ */
+ function parse_adminurl() {
+ $this->parse_sitevar('adminurl');
+ }
+
+ /**
+ * Parse skinvar archive
+ */
+ function parse_archive($template, $category = '') {
+ global $blog, $archive;
+ // can be used with either yyyy-mm or yyyy-mm-dd
+ sscanf($archive,'%d-%d-%d',$y,$m,$d);
+ $this->_setBlogCategory($blog, $category);
+ $this->_preBlogContent('achive',$blog);
+ $blog->showArchive($template, $y, $m, $d);
+ $this->_postBlogContent('achive',$blog);
- function parse_itemlink($linktext = '') {
- global $itemid;
- $this->_itemlink($itemid, $linktext);
}
/**
echo strftime($format,mktime(0,0,0,$m,$d?$d:1,$y));
}
+ function parse_archivedaylist($template, $category = 'all', $limit = 0) {
+ global $blog;
+ if ($category == 'all') $category = '';
+ $this->_preBlogContent('archivelist',$blog);
+ $this->_setBlogCategory($blog, $category);
+ $blog->showArchiveList($template, 'day', $limit);
+ $this->_postBlogContent('archivelist',$blog);
+ }
+
+ /**
+ * A link to the archives for the current blog (or for default blog)
+ */
+ function parse_archivelink($linktext = '') {
+ global $blog, $CONF;
+ if ($blog)
+ echo $this->_link(createArchiveListLink($blog->getID(),$this->linkparams), $linktext);
+ else
+ echo $this->_link(createArchiveListLink(), $linktext);
+ }
+
+ function parse_archivelist($template, $category = 'all', $limit = 0) {
+ global $blog;
+ if ($category == 'all') $category = '';
+ $this->_preBlogContent('archivelist',$blog);
+ $this->_setBlogCategory($blog, $category);
+ $blog->showArchiveList($template, 'month', $limit);
+ $this->_postBlogContent('archivelist',$blog);
+ }
+
+ /**
+ * Parse skinvar archivetype
+ */
+ function parse_archivetype() {
+ global $archivetype;
+ echo $archivetype;
+ }
+
+ /**
+ * Parse skinvar blog
+ */
function parse_blog($template, $amount = 10, $category = '') {
global $blog, $startpos;
$this->amountfound = $blog->readLog($template, $limit, $offset, $startpos);
$this->_postBlogContent('blog',$blog);
}
-
- function parse_otherblog($blogname, $template, $amount = 10, $category = '') {
- global $manager;
-
- list($limit, $offset) = sscanf($amount, '%d(%d)');
-
- $b =& $manager->getBlog(getBlogIDFromName($blogname));
- $this->_setBlogCategory($b, $category);
- $this->_preBlogContent('otherblog',$b);
- $this->amountfound = $b->readLog($template, $limit, $offset);
- $this->_postBlogContent('otherblog',$b);
- }
-
- // include one item (no comments)
- function parse_item($template) {
- global $blog, $itemid, $highlight;
- $this->_setBlogCategory($blog, ''); // need this to select default category
- $this->_preBlogContent('item',$blog);
- $r = $blog->showOneitem($itemid, $template, $highlight);
- if ($r == 0)
- echo _ERROR_NOSUCHITEM;
- $this->_postBlogContent('item',$blog);
+
+ /*
+ * Parse skinvar bloglist
+ * Shows a list of all blogs
+ * bnametype: whether 'name' or 'shortname' is used for the link text
+ */
+ function parse_bloglist($template, $bnametype = '') {
+ global $blog;
+
+ $blog->showBlogList($template, $bnametype);
}
-
- function parse_itemid() {
- global $itemid;
- echo $itemid;
- }
-
-
- // include comments for one item
- function parse_comments($template) {
- global $itemid, $manager, $blog, $highlight;
- $template =& $manager->getTemplate($template);
-
- // create parser object & action handler
- $actions =& new ITEMACTIONS($blog);
- $parser =& new PARSER($actions->getDefinedActions(),$actions);
- $actions->setTemplate($template);
- $actions->setParser($parser);
- $item = ITEM::getitem($itemid, 0, 0);
- $actions->setCurrentItem($item);
-
- $comments =& new COMMENTS($itemid);
- $comments->setItemActions($actions);
- $comments->showComments($template, -1, 1, $highlight); // shows ALL comments
- }
-
- function parse_archive($template, $category = '') {
- global $blog, $archive;
- // can be used with either yyyy-mm or yyyy-mm-dd
- sscanf($archive,'%d-%d-%d',$y,$m,$d);
- $this->_setBlogCategory($blog, $category);
- $this->_preBlogContent('achive',$blog);
- $blog->showArchive($template, $y, $m, $d);
- $this->_postBlogContent('achive',$blog);
-
- }
-
- function parse_otherarchive($blogname, $template, $category = '') {
- global $archive, $manager;
- sscanf($archive,'%d-%d-%d',$y,$m,$d);
- $b =& $manager->getBlog(getBlogIDFromName($blogname));
- $this->_setBlogCategory($b, $category);
- $this->_preBlogContent('otherachive',$b);
- $b->showArchive($template, $y, $m, $d);
- $this->_postBlogContent('otherachive',$b);
- }
-
- function parse_archivelist($template, $category = 'all', $limit = 0) {
- global $blog;
- if ($category == 'all') $category = '';
- $this->_preBlogContent('archivelist',$blog);
- $this->_setBlogCategory($blog, $category);
- $blog->showArchiveList($template, 'month', $limit);
- $this->_postBlogContent('archivelist',$blog);
- }
-
- function parse_archivedaylist($template, $category = 'all', $limit = 0) {
+
+ /**
+ * Parse skinvar blogsetting
+ */
+ function parse_blogsetting($which) {
global $blog;
- if ($category == 'all') $category = '';
- $this->_preBlogContent('archivelist',$blog);
- $this->_setBlogCategory($blog, $category);
- $blog->showArchiveList($template, 'day', $limit);
- $this->_postBlogContent('archivelist',$blog);
- }
-
- function parse_itemtitle($format = '') {
- global $manager, $itemid;
- $item =& $manager->getItem($itemid,0,0);
-
- switch ($format) {
- case 'xml':
- echo stringToXML ($item['title']);
+ switch($which) {
+ case 'id':
+ echo htmlspecialchars($blog->getID());
break;
- case 'attribute':
- echo stringToAttribute ($item['title']);
+ case 'url':
+ echo htmlspecialchars($blog->getURL());
break;
- case 'raw':
- echo $item['title'];
+ case 'name':
+ echo htmlspecialchars($blog->getName());
break;
- default:
- echo htmlspecialchars(strip_tags($item['title']));
+ case 'desc':
+ echo htmlspecialchars($blog->getDescription());
+ break;
+ case 'short':
+ echo htmlspecialchars($blog->getShortName());
break;
}
}
-
- function parse_categorylist($template, $blogname = '') {
- global $blog, $manager;
-
- if ($blogname == '') {
- $this->_preBlogContent('categorylist',$blog);
- $blog->showCategoryList($template);
- $this->_postBlogContent('categorylist',$blog);
- } else {
- $b =& $manager->getBlog(getBlogIDFromName($blogname));
- $this->_preBlogContent('categorylist',$b);
- $b->showCategoryList($template);
- $this->_postBlogContent('categorylist',$b);
- }
+
+ /**
+ * Parse callback
+ */
+ function parse_callback($eventName, $type)
+ {
+ global $manager;
+ $manager->notify($eventName, array('type' => $type));
}
-
+
+ /**
+ * Parse skinvar category
+ */
function parse_category($type = 'name') {
global $catid, $blog;
if (!$blog->isValidCategory($catid))
break;
}
}
+
+ /**
+ * Parse categorylist
+ */
+ function parse_categorylist($template, $blogname = '') {
+ global $blog, $manager;
- function parse_otherarchivelist($blogname, $template, $category = 'all', $limit = 0) {
- global $manager;
- if ($category == 'all') $category = '';
- $b =& $manager->getBlog(getBlogIDFromName($blogname));
- $this->_setBlogCategory($b, $category);
- $this->_preBlogContent('otherarchivelist',$b);
- $b->showArchiveList($template, 'month', $limit);
- $this->_postBlogContent('otherarchivelist',$b);
+ if ($blogname == '') {
+ $this->_preBlogContent('categorylist',$blog);
+ $blog->showCategoryList($template);
+ $this->_postBlogContent('categorylist',$blog);
+ } else {
+ $b =& $manager->getBlog(getBlogIDFromName($blogname));
+ $this->_preBlogContent('categorylist',$b);
+ $b->showCategoryList($template);
+ $this->_postBlogContent('categorylist',$b);
+ }
}
-
- function parse_otherarchivedaylist($blogname, $template, $category = 'all', $limit = 0) {
- global $manager;
- if ($category == 'all') $category = '';
- $b =& $manager->getBlog(getBlogIDFromName($blogname));
- $this->_setBlogCategory($b, $category);
- $this->_preBlogContent('otherarchivelist',$b);
- $b->showArchiveList($template, 'day', $limit);
- $this->_postBlogContent('otherarchivelist',$b);
+
+ /**
+ * Parse skinvar charset
+ */
+ function parse_charset() {
+ echo _CHARSET;
}
+
+ /**
+ * Parse skinvar commentform
+ */
+ function parse_commentform($destinationurl = '') {
+ global $blog, $itemid, $member, $CONF, $manager, $DIR_LIBS, $errormessage;
- function parse_searchresults($template, $maxresults = 50 ) {
- global $blog, $query, $amount, $startpos;
+ // warn when trying to provide a actionurl (used to be a parameter in Nucleus <2.0)
+ if (stristr($destinationurl, 'action.php')) {
+ $args = func_get_args();
+ $destinationurl = $args[1];
+ ACTIONLOG::add(WARNING,'actionurl is not longer a parameter on commentform skinvars. Moved to be a global setting instead.');
+ }
- $this->_setBlogCategory($blog, ''); // need this to select default category
- $this->_preBlogContent('searchresults',$blog);
- $this->amountfound = $blog->search($query, $template, $amount, $maxresults, $startpos);
- $this->_postBlogContent('searchresults',$blog);
- }
+ $actionurl = $CONF['ActionURL'];
- function parse_othersearchresults($blogname, $template, $maxresults = 50) {
- global $query, $amount, $manager, $startpos;
- $b =& $manager->getBlog(getBlogIDFromName($blogname));
- $this->_setBlogCategory($b, ''); // need this to select default category
- $this->_preBlogContent('othersearchresults',$b);
- $b->search($query, $template, $amount, $maxresults, $startpos);
- $this->_postBlogContent('othersearchresults',$b);
- }
+ // if item is closed, show message and do nothing
+ $item =& $manager->getItem($itemid,0,0);
+ if ($item['closed'] || !$blog->commentsEnabled()) {
+ $this->doForm('commentform-closed');
+ return;
+ }
- // includes the search query
- function parse_query() {
- global $query;
- echo htmlspecialchars($query);
- }
+ if (!$destinationurl)
+ {
+ $destinationurl = createLink(
+ 'item',
+ array(
+ 'itemid' => $itemid,
+ 'title' => $item['title'],
+ 'timestamp' => $item['timestamp'],
+ 'extra' => $this->linkparams
+ )
+ );
- // include nucleus versionnumber
- function parse_version() {
- global $nucleus;
- echo 'Nucleus CMS ' . $nucleus['version'];
+ // note: createLink returns an HTML encoded URL
+ } else {
+ // HTML encode URL
+ $destinationurl = htmlspecialchars($destinationurl);
+ }
+
+ // values to prefill
+ $user = cookieVar($CONF['CookiePrefix'] .'comment_user');
+ if (!$user) $user = postVar('user');
+ $userid = cookieVar($CONF['CookiePrefix'] .'comment_userid');
+ if (!$userid) $userid = postVar('userid');
+ $email = cookieVar($CONF['CookiePrefix'] .'comment_email');
+ if (!$email) {
+ $email = postVar('email');
+ }
+ $body = postVar('body');
+
+ $this->formdata = array(
+ 'destinationurl' => $destinationurl, // url is already HTML encoded
+ 'actionurl' => htmlspecialchars($actionurl),
+ 'itemid' => $itemid,
+ 'user' => htmlspecialchars($user),
+ 'userid' => htmlspecialchars($userid),
+ 'email' => htmlspecialchars($email),
+ 'body' => htmlspecialchars($body),
+ 'membername' => $member->getDisplayName(),
+ 'rememberchecked' => cookieVar($CONF['CookiePrefix'] .'comment_user')?'checked="checked"':''
+ );
+
+ if (!$member->isLoggedIn()) {
+ $this->doForm('commentform-notloggedin');
+ } else {
+ $this->doForm('commentform-loggedin');
+ }
}
+
+ /**
+ * Parse skinvar comments
+ * include comments for one item
+ */
+ function parse_comments($template) {
+ global $itemid, $manager, $blog, $highlight;
+ $template =& $manager->getTemplate($template);
+ // create parser object & action handler
+ $actions =& new ITEMACTIONS($blog);
+ $parser =& new PARSER($actions->getDefinedActions(),$actions);
+ $actions->setTemplate($template);
+ $actions->setParser($parser);
+ $item = ITEM::getitem($itemid, 0, 0);
+ $actions->setCurrentItem($item);
+ $comments =& new COMMENTS($itemid);
+ $comments->setItemActions($actions);
+ $comments->showComments($template, -1, 1, $highlight); // shows ALL comments
+ }
+
+ /**
+ * Parse errordiv
+ */
+ function parse_errordiv() {
+ global $errormessage;
+ if ($errormessage)
+ echo '<div class="error">', htmlspecialchars($errormessage),'</div>';
+ }
+
+ /**
+ * Parse skinvar errormessage
+ */
function parse_errormessage() {
global $errormessage;
echo $errormessage;
}
-
-
- function parse_imagetext() {
- echo htmlspecialchars(requestVar('imagetext'));
+
+ /**
+ * Parse formdata
+ */
+ function parse_formdata($what) {
+ echo $this->formdata[$what];
+ }
+
+ /**
+ * Parse ifcat
+ */
+ function parse_ifcat($text = '') {
+ if ($text == '') {
+ // new behaviour
+ $this->parse_if('category');
+ } else {
+ // old behaviour
+ global $catid, $blog;
+ if ($blog->isValidCategory($catid))
+ echo $text;
+ }
}
+ /**
+ * Parse skinvar image
+ */
function parse_image($what = 'imgtag') {
global $CONF;
break;
}
}
-
- // When commentform is not used, to include a hidden field with itemid
- function parse_vars() {
+
+ /**
+ * Parse skinvar imagetext
+ */
+ function parse_imagetext() {
+ echo htmlspecialchars(requestVar('imagetext'));
+ }
+
+ /**
+ * Parse skinvar item
+ * include one item (no comments)
+ */
+ function parse_item($template) {
+ global $blog, $itemid, $highlight;
+ $this->_setBlogCategory($blog, ''); // need this to select default category
+ $this->_preBlogContent('item',$blog);
+ $r = $blog->showOneitem($itemid, $template, $highlight);
+ if ($r == 0)
+ echo _ERROR_NOSUCHITEM;
+ $this->_postBlogContent('item',$blog);
+ }
+
+ /**
+ * Parse skinvar itemid
+ */
+ function parse_itemid() {
+ global $itemid;
+ echo $itemid;
+ }
+
+ /**
+ * Parse skinvar itemlink
+ */
+ function parse_itemlink($linktext = '') {
global $itemid;
- echo '<input type="hidden" name="itemid" value="'.$itemid.'" />';
+ $this->_itemlink($itemid, $linktext);
}
- // include a sitevar
- function parse_sitevar($which) {
- global $CONF;
- switch($which) {
- case 'url':
- echo $CONF['IndexURL'];
+ /**
+ * Parse itemtitle
+ */
+ function parse_itemtitle($format = '') {
+ global $manager, $itemid;
+ $item =& $manager->getItem($itemid,0,0);
+
+ switch ($format) {
+ case 'xml':
+ echo stringToXML ($item['title']);
break;
- case 'name':
- echo $CONF['SiteName'];
+ case 'attribute':
+ echo stringToAttribute ($item['title']);
break;
- case 'admin':
- echo $CONF['AdminEmail'];
+ case 'raw':
+ echo $item['title'];
+ break;
+ default:
+ echo htmlspecialchars(strip_tags($item['title']));
break;
- case 'adminurl':
- echo $CONF['AdminURL'];
}
}
- // shortcut for admin url
- function parse_adminurl() { $this->parse_sitevar('adminurl'); }
-
- function parse_blogsetting($which) {
- global $blog;
- switch($which) {
- case 'id':
- echo htmlspecialchars($blog->getID());
- break;
- case 'url':
- echo htmlspecialchars($blog->getURL());
- break;
- case 'name':
- echo htmlspecialchars($blog->getName());
- break;
- case 'desc':
- echo htmlspecialchars($blog->getDescription());
- break;
- case 'short':
- echo htmlspecialchars($blog->getShortName());
- break;
+ /**
+ * Parse skinvar loginform
+ */
+ function parse_loginform() {
+ global $member, $CONF;
+ if (!$member->isLoggedIn()) {
+ $filename = 'loginform-notloggedin';
+ $this->formdata = array();
+ } else {
+ $filename = 'loginform-loggedin';
+ $this->formdata = array(
+ 'membername' => $member->getDisplayName(),
+ );
}
+ $this->doForm($filename);
}
- // includes a member info thingie
+ /**
+ * Parse skinvar member
+ * (includes a member info thingie)
+ */
function parse_member($what) {
global $memberinfo, $member;
}
- function parse_preview($template) {
- global $blog, $CONF, $manager;
+ /**
+ * Parse skinvar membermailform
+ */
+ function parse_membermailform($rows = 10, $cols = 40, $desturl = '') {
+ global $member, $CONF, $memberid;
- $template =& $manager->getTemplate($template);
- $row['body'] = '<span id="prevbody"></span>';
- $row['title'] = '<span id="prevtitle"></span>';
- $row['more'] = '<span id="prevmore"></span>';
- $row['itemlink'] = '';
- $row['itemid'] = 0; $row['blogid'] = $blog->getID();
- echo TEMPLATE::fill($template['ITEM_HEADER'],$row);
- echo TEMPLATE::fill($template['ITEM'],$row);
- echo TEMPLATE::fill($template['ITEM_FOOTER'],$row);
- }
+ if ($desturl == '') {
+ if ($CONF['URLMode'] == 'pathinfo')
+ $desturl = createMemberLink($memberid);
+ else
+ $desturl = $CONF['IndexURL'] . createMemberLink($memberid);
+ }
+
+ $message = postVar('message');
+ $frommail = postVar('frommail');
- function parse_additemform() {
- global $blog, $CONF;
$this->formdata = array(
- 'adminurl' => htmlspecialchars($CONF['AdminURL']),
- 'catid' => $blog->getDefaultCategory()
+ 'url' => htmlspecialchars($desturl),
+ 'actionurl' => htmlspecialchars($CONF['ActionURL']),
+ 'memberid' => $memberid,
+ 'rows' => $rows,
+ 'cols' => $cols,
+ 'message' => htmlspecialchars($message),
+ 'frommail' => htmlspecialchars($frommail)
);
- $blog->InsertJavaScriptInfo();
- $this->doForm('additemform');
- }
+ if ($member->isLoggedIn()) {
+ $this->doForm('membermailform-loggedin');
+ } else if ($CONF['NonmemberMail']) {
+ $this->doForm('membermailform-notloggedin');
+ } else {
+ $this->doForm('membermailform-disallowed');
+ }
+ }
+
/**
- * Executes a plugin skinvar
- *
- * @param pluginName name of plugin (without the NP_)
- *
- * extra parameters can be added
- */
- function parse_plugin($pluginName) {
- global $manager;
+ * Parse skinvar nextarchive
+ */
+ function parse_nextarchive() {
+ global $archivenext;
+ echo $archivenext;
+ }
- // only continue when the plugin is really installed
- if (!$manager->pluginInstalled('NP_' . $pluginName))
- return;
+ /**
+ * Parse skinvar nextitem
+ * (include itemid of next item)
+ */
+ function parse_nextitem() {
+ global $itemidnext;
+ echo $itemidnext;
+ }
- $plugin =& $manager->getPlugin('NP_' . $pluginName);
- if (!$plugin) return;
+ /**
+ * Parse skinvar nextitemtitle
+ * (include itemtitle of next item)
+ */
+ function parse_nextitemtitle($format = '') {
+ global $itemtitlenext;
- // get arguments
- $params = func_get_args();
+ switch ($format) {
+ case 'xml':
+ echo stringToXML ($itemtitlenext);
+ break;
+ case 'attribute':
+ echo stringToAttribute ($itemtitlenext);
+ break;
+ case 'raw':
+ echo $itemtitlenext;
+ break;
+ default:
+ echo htmlspecialchars($itemtitlenext);
+ break;
+ }
+ }
- // remove plugin name
- array_shift($params);
+ /**
+ * Parse skinvar nextlink
+ */
+ function parse_nextlink($linktext = '', $amount = 10) {
+ global $itemidnext, $archivenext, $startpos;
+ if ($this->skintype == 'item')
+ $this->_itemlink($itemidnext, $linktext);
+ else if ($this->skintype == 'search' || $this->skintype == 'index')
+ $this->_searchlink($amount, $startpos, 'next', $linktext);
+ else
+ $this->_archivelink($archivenext, $linktext);
+ }
- // add skin type on front
- array_unshift($params, $this->skintype);
+ /**
+ * Parse skinvar nucleusbutton
+ */
+ function parse_nucleusbutton($imgurl = '',
+ $imgwidth = '85',
+ $imgheight = '31') {
+ global $CONF;
+ if ($imgurl == '') {
+ $imgurl = $CONF['AdminURL'] . 'nucleus.gif';
+ } else if (PARSER::getProperty('IncludeMode') == 'skindir'){
+ // when skindit IncludeMode is used: start from skindir
+ $imgurl = $CONF['SkinsURL'] . PARSER::getProperty('IncludePrefix') . $imgurl;
+ }
- call_user_func_array(array(&$plugin,'doSkinVar'), $params);
+ $this->formdata = array(
+ 'imgurl' => $imgurl,
+ 'imgwidth' => $imgwidth,
+ 'imgheight' => $imgheight,
+ );
+ $this->doForm('nucleusbutton');
+ }
+
+ function parse_otherarchive($blogname, $template, $category = '') {
+ global $archive, $manager;
+ sscanf($archive,'%d-%d-%d',$y,$m,$d);
+ $b =& $manager->getBlog(getBlogIDFromName($blogname));
+ $this->_setBlogCategory($b, $category);
+ $this->_preBlogContent('otherachive',$b);
+ $b->showArchive($template, $y, $m, $d);
+ $this->_postBlogContent('otherachive',$b);
+ }
+
+ /**
+ * Parse skinvar otherarchivedaylist
+ */
+ function parse_otherarchivedaylist($blogname, $template, $category = 'all', $limit = 0) {
+ global $manager;
+ if ($category == 'all') $category = '';
+ $b =& $manager->getBlog(getBlogIDFromName($blogname));
+ $this->_setBlogCategory($b, $category);
+ $this->_preBlogContent('otherarchivelist',$b);
+ $b->showArchiveList($template, 'day', $limit);
+ $this->_postBlogContent('otherarchivelist',$b);
+ }
+
+ /**
+ * Parse skinvar otherarchivelist
+ */
+ function parse_otherarchivelist($blogname, $template, $category = 'all', $limit = 0) {
+ global $manager;
+ if ($category == 'all') $category = '';
+ $b =& $manager->getBlog(getBlogIDFromName($blogname));
+ $this->_setBlogCategory($b, $category);
+ $this->_preBlogContent('otherarchivelist',$b);
+ $b->showArchiveList($template, 'month', $limit);
+ $this->_postBlogContent('otherarchivelist',$b);
}
+
+ /**
+ * Parse skinvar otherblog
+ */
+ function parse_otherblog($blogname, $template, $amount = 10, $category = '') {
+ global $manager;
+ list($limit, $offset) = sscanf($amount, '%d(%d)');
- function parse_commentform($destinationurl = '') {
- global $blog, $itemid, $member, $CONF, $manager, $DIR_LIBS, $errormessage;
+ $b =& $manager->getBlog(getBlogIDFromName($blogname));
+ $this->_setBlogCategory($b, $category);
+ $this->_preBlogContent('otherblog',$b);
+ $this->amountfound = $b->readLog($template, $limit, $offset);
+ $this->_postBlogContent('otherblog',$b);
+ }
- // warn when trying to provide a actionurl (used to be a parameter in Nucleus <2.0)
- if (stristr($destinationurl, 'action.php')) {
- $args = func_get_args();
- $destinationurl = $args[1];
- ACTIONLOG::add(WARNING,'actionurl is not longer a parameter on commentform skinvars. Moved to be a global setting instead.');
- }
+ /**
+ * Parse skinvar othersearchresults
+ */
+ function parse_othersearchresults($blogname, $template, $maxresults = 50) {
+ global $query, $amount, $manager, $startpos;
+ $b =& $manager->getBlog(getBlogIDFromName($blogname));
+ $this->_setBlogCategory($b, ''); // need this to select default category
+ $this->_preBlogContent('othersearchresults',$b);
+ $b->search($query, $template, $amount, $maxresults, $startpos);
+ $this->_postBlogContent('othersearchresults',$b);
+ }
- $actionurl = $CONF['ActionURL'];
+ /**
+ * Executes a plugin skinvar
+ *
+ * @param pluginName name of plugin (without the NP_)
+ *
+ * extra parameters can be added
+ */
+ function parse_plugin($pluginName) {
+ global $manager;
- // if item is closed, show message and do nothing
- $item =& $manager->getItem($itemid,0,0);
- if ($item['closed'] || !$blog->commentsEnabled()) {
- $this->doForm('commentform-closed');
+ // only continue when the plugin is really installed
+ if (!$manager->pluginInstalled('NP_' . $pluginName))
return;
- }
- if (!$destinationurl)
- {
- $destinationurl = createLink(
- 'item',
- array(
- 'itemid' => $itemid,
- 'title' => $item['title'],
- 'timestamp' => $item['timestamp'],
- 'extra' => $this->linkparams
- )
- );
+ $plugin =& $manager->getPlugin('NP_' . $pluginName);
+ if (!$plugin) return;
- // note: createLink returns an HTML encoded URL
- } else {
- // HTML encode URL
- $destinationurl = htmlspecialchars($destinationurl);
- }
+ // get arguments
+ $params = func_get_args();
- // values to prefill
- $user = cookieVar($CONF['CookiePrefix'] .'comment_user');
- if (!$user) $user = postVar('user');
- $userid = cookieVar($CONF['CookiePrefix'] .'comment_userid');
- if (!$userid) $userid = postVar('userid');
- $email = cookieVar($CONF['CookiePrefix'] .'comment_email');
- if (!$email) {
- $email = postVar('email');
- }
- $body = postVar('body');
+ // remove plugin name
+ array_shift($params);
- $this->formdata = array(
- 'destinationurl' => $destinationurl, // url is already HTML encoded
- 'actionurl' => htmlspecialchars($actionurl),
- 'itemid' => $itemid,
- 'user' => htmlspecialchars($user),
- 'userid' => htmlspecialchars($userid),
- 'email' => htmlspecialchars($email),
- 'body' => htmlspecialchars($body),
- 'membername' => $member->getDisplayName(),
- 'rememberchecked' => cookieVar($CONF['CookiePrefix'] .'comment_user')?'checked="checked"':''
- );
+ // add skin type on front
+ array_unshift($params, $this->skintype);
- if (!$member->isLoggedIn()) {
- $this->doForm('commentform-notloggedin');
- } else {
- $this->doForm('commentform-loggedin');
- }
+ call_user_func_array(array(&$plugin,'doSkinVar'), $params);
+ }
+
+ /**
+ * Parse skinvar prevarchive
+ */
+ function parse_prevarchive() {
+ global $archiveprev;
+ echo $archiveprev;
}
- function parse_loginform() {
- global $member, $CONF;
- if (!$member->isLoggedIn()) {
- $filename = 'loginform-notloggedin';
- $this->formdata = array();
- } else {
- $filename = 'loginform-loggedin';
- $this->formdata = array(
- 'membername' => $member->getDisplayName(),
- );
- }
- $this->doForm($filename);
+ /**
+ * Parse skinvar preview
+ */
+ function parse_preview($template) {
+ global $blog, $CONF, $manager;
+
+ $template =& $manager->getTemplate($template);
+ $row['body'] = '<span id="prevbody"></span>';
+ $row['title'] = '<span id="prevtitle"></span>';
+ $row['more'] = '<span id="prevmore"></span>';
+ $row['itemlink'] = '';
+ $row['itemid'] = 0; $row['blogid'] = $blog->getID();
+ echo TEMPLATE::fill($template['ITEM_HEADER'],$row);
+ echo TEMPLATE::fill($template['ITEM'],$row);
+ echo TEMPLATE::fill($template['ITEM_FOOTER'],$row);
}
+ /*
+ * Parse skinvar previtem
+ * (include itemid of prev item)
+ */
+ function parse_previtem() {
+ global $itemidprev;
+ echo $itemidprev;
+ }
- function parse_membermailform($rows = 10, $cols = 40, $desturl = '') {
- global $member, $CONF, $memberid;
+ /**
+ * Parse skinvar previtemtitle
+ * (include itemtitle of prev item)
+ */
+ function parse_previtemtitle($format = '') {
+ global $itemtitleprev;
- if ($desturl == '') {
- if ($CONF['URLMode'] == 'pathinfo')
- $desturl = createMemberLink($memberid);
- else
- $desturl = $CONF['IndexURL'] . createMemberLink($memberid);
+ switch ($format) {
+ case 'xml':
+ echo stringToXML ($itemtitleprev);
+ break;
+ case 'attribute':
+ echo stringToAttribute ($itemtitleprev);
+ break;
+ case 'raw':
+ echo $itemtitleprev;
+ break;
+ default:
+ echo htmlspecialchars($itemtitleprev);
+ break;
}
+ }
- $message = postVar('message');
- $frommail = postVar('frommail');
+ /**
+ * Parse skinvar prevlink
+ */
+ function parse_prevlink($linktext = '', $amount = 10) {
+ global $itemidprev, $archiveprev, $startpos;
- $this->formdata = array(
- 'url' => htmlspecialchars($desturl),
- 'actionurl' => htmlspecialchars($CONF['ActionURL']),
- 'memberid' => $memberid,
- 'rows' => $rows,
- 'cols' => $cols,
- 'message' => htmlspecialchars($message),
- 'frommail' => htmlspecialchars($frommail)
- );
- if ($member->isLoggedIn()) {
- $this->doForm('membermailform-loggedin');
- } else if ($CONF['NonmemberMail']) {
- $this->doForm('membermailform-notloggedin');
- } else {
- $this->doForm('membermailform-disallowed');
- }
+ if ($this->skintype == 'item')
+ $this->_itemlink($itemidprev, $linktext);
+ else if ($this->skintype == 'search' || $this->skintype == 'index')
+ $this->_searchlink($amount, $startpos, 'prev', $linktext);
+ else
+ $this->_archivelink($archiveprev, $linktext);
+ }
+ /**
+ * Parse skinvar query
+ * (includes the search query)
+ */
+ function parse_query() {
+ global $query;
+ echo htmlspecialchars($query);
+ }
+
+ /**
+ * Parse skinvar referer
+ */
+ function parse_referer() {
+ echo htmlspecialchars(serverVar('HTTP_REFERER'));
}
+ /**
+ * Parse skinvar searchform
+ */
function parse_searchform($blogname = '') {
global $CONF, $manager, $maxresults;
if ($blogname) {
$this->doForm('searchform');
}
- function parse_nucleusbutton($imgurl = '',
- $imgwidth = '85',
- $imgheight = '31') {
- global $CONF;
- if ($imgurl == '') {
- $imgurl = $CONF['AdminURL'] . 'nucleus.gif';
- } else if (PARSER::getProperty('IncludeMode') == 'skindir'){
- // when skindit IncludeMode is used: start from skindir
- $imgurl = $CONF['SkinsURL'] . PARSER::getProperty('IncludePrefix') . $imgurl;
- }
+ /**
+ * Parse skinvar searchresults
+ */
+ function parse_searchresults($template, $maxresults = 50 ) {
+ global $blog, $query, $amount, $startpos;
- $this->formdata = array(
- 'imgurl' => $imgurl,
- 'imgwidth' => $imgwidth,
- 'imgheight' => $imgheight,
- );
- $this->doForm('nucleusbutton');
+ $this->_setBlogCategory($blog, ''); // need this to select default category
+ $this->_preBlogContent('searchresults',$blog);
+ $this->amountfound = $blog->search($query, $template, $amount, $maxresults, $startpos);
+ $this->_postBlogContent('searchresults',$blog);
}
+ /**
+ * Parse skinvar self
+ */
function parse_self() {
global $CONF;
echo $CONF['Self'];
}
- function parse_referer() {
- echo htmlspecialchars(serverVar('HTTP_REFERER'));
+ /**
+ * Parse skinvar sitevar
+ * (include a sitevar)
+ */
+ function parse_sitevar($which) {
+ global $CONF;
+ switch($which) {
+ case 'url':
+ echo $CONF['IndexURL'];
+ break;
+ case 'name':
+ echo $CONF['SiteName'];
+ break;
+ case 'admin':
+ echo $CONF['AdminEmail'];
+ break;
+ case 'adminurl':
+ echo $CONF['AdminURL'];
+ }
}
- function parse_charset() {
- echo _CHARSET;
+ /**
+ * Parse skinname
+ */
+ function parse_skinname() {
+ echo $this->skin->getName();
}
/**
- * Helper function that sets the category that a blog will need to use
- *
- * @param $blog
- * An object of the blog class, passed by reference (we want to make changes to it)
- * @param $catname
- * The name of the category to use
- */
- function _setBlogCategory(&$blog, $catname) {
- global $catid;
- if ($catname != '')
- $blog->setSelectedCategoryByName($catname);
+ * Parse text
+ */
+ function parse_text($which) {
+ // constant($which) only available from 4.0.4 :(
+ if (defined($which)) {
+ eval("echo $which;");
+ }
+ }
+
+ /**
+ * Parse ticket
+ */
+ function parse_ticket() {
+ global $manager;
+ $manager->addTicketHidden();
+ }
+
+ /**
+ * Parse skinvar todaylink
+ * A link to the today page (depending on selected blog, etc...)
+ */
+ function parse_todaylink($linktext = '') {
+ global $blog, $CONF;
+ if ($blog)
+ echo $this->_link(createBlogidLink($blog->getID(),$this->linkparams), $linktext);
else
- $blog->setSelectedCategory($catid);
+ echo $this->_link($CONF['SiteUrl'], $linktext);
}
- function _preBlogContent($type, &$blog) {
- global $manager;
- $manager->notify('PreBlogContent',array('blog' => &$blog, 'type' => $type));
+ /**
+ * Parse vars
+ * When commentform is not used, to include a hidden field with itemid
+ */
+ function parse_vars() {
+ global $itemid;
+ echo '<input type="hidden" name="itemid" value="'.$itemid.'" />';
}
- function _postBlogContent($type, &$blog) {
- global $manager;
- $manager->notify('PostBlogContent',array('blog' => &$blog, 'type' => $type));
+ /**
+ * Parse skinvar version
+ * (include nucleus versionnumber)
+ */
+ function parse_version() {
+ global $nucleus;
+ echo 'Nucleus CMS ' . $nucleus['version'];
}
}
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* The code for the Nucleus admin area
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ADMIN.php,v 1.13 2007-02-03 06:00:04 kimitake Exp $
- * @version $NucleusJP: ADMIN.php,v 1.12 2007/01/31 10:02:58 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: ADMIN.php,v 1.14 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: ADMIN.php,v 1.13 2007/02/03 06:00:04 kimitake Exp $
*/
require_once "showlist.php";
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* PHP class responsible for ban-management.
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: BAN.php,v 1.6 2006-07-20 08:01:52 kimitake Exp $
- * $NucleusJP: BAN.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: BAN.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: BAN.php,v 1.6 2006/07/20 08:01:52 kimitake Exp $
*/
class BAN {
}
-?>
+?>
\ No newline at end of file
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* on the screen
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: BLOG.php,v 1.6 2006-08-31 20:58:50 kimitake Exp $
- * $NucleusJP: BLOG.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: BLOG.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: BLOG.php,v 1.6 2006/08/31 20:58:50 kimitake Exp $
*/
// temporary: dirt way to separe class ITEMACTIONS from BLOG
'self' => $CONF['Self']
));
}
+
+ /**
+ * Shows a list of all blogs in the system using a given template
+ */
+ function showBlogList($template, $bnametype) {
+ global $CONF, $manager;
+
+ $template =& $manager->getTemplate($template);
+
+ $query = 'SELECT bnumber, bname, bshortname, bdesc, burl FROM '.sql_table('blog').' ORDER BY bnumber ASC';
+ $res = sql_query($query);
+
+ while ($data = mysql_fetch_assoc($res)) {
+
+ $list = array();
+
+ $list['bloglink'] = createLink('blog', array('blogid' => $data['bnumber']));
+
+ $list['blogdesc'] = $data['bdesc'];
+
+ if ($bnametype=='shortname') {
+ $list['blogname'] = $data['bshortname'];
+ }
+ else { // all other cases
+ $list['blogname'] = $data['bname'];
+ }
+
+ echo TEMPLATE::fill((isset($template['BLOGLIST_LISTITEM']) ? $template['BLOGLIST_LISTITEM'] : null), $list);
+
+ }
+
+ mysql_free_result($res);
+ }
/**
* Blogsettings functions
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* A class to parses plugin calls inside items
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: BODYACTIONS.php,v 1.2 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: BODYACTIONS.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: BODYACTIONS.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
*/
class BODYACTIONS extends ITEMACTIONS {
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* It should never be used on it's own
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: BaseActions.php,v 1.2 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: BaseActions.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: BaseActions.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
*/
class BaseActions {
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* A class representing a single comment
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: COMMENT.php,v 1.4 2006-07-17 20:03:44 kimitake Exp $
- * $NucleusJP: COMMENT.php,v 1.3 2005/03/12 06:19:05 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: COMMENT.php,v 1.5 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: COMMENT.php,v 1.4 2006/07/17 20:03:44 kimitake Exp $
*/
class COMMENT {
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* of the License, or (at your option) any later version.
* (see nucleus/documentation/index.html#license for more info)
*/
-
/**
* This class is used when parsing comment templates
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: COMMENTACTIONS.php,v 1.2 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: COMMENTACTIONS.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: COMMENTACTIONS.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
*/
class COMMENTACTIONS extends BaseActions {
);
}
- function setParser(&$parser) { $this->parser =& $parser; }
- function setCommentsObj(&$commentsObj) {$this->commentsObj =& $commentsObj; }
- function setTemplate($template) { $this->template =& $template; }
+ function setParser(&$parser) {
+ $this->parser =& $parser;
+ }
+
+ function setCommentsObj(&$commentsObj) {
+ $this->commentsObj =& $commentsObj;
+ }
+
+ function setTemplate($template) {
+ $this->template =& $template;
+ }
+
function setCurrentComment(&$comment) {
global $manager;
if ($comment['memberid'] != 0) {
echo $blog->getURL();
}
- function parse_commentcount() { echo $this->commentsObj->commentcount; }
+ function parse_commentcount() {
+ echo $this->commentsObj->commentcount;
+ }
+
function parse_commentword() {
if ($this->commentsObj->commentcount == 1)
echo $this->template['COMMENTS_ONE'];
)
);
}
- function parse_itemid() { echo $this->commentsObj->itemid; }
+
+ function parse_itemid() {
+ echo $this->commentsObj->itemid;
+ }
+
function parse_itemtitle($maxLength = 0) {
if ($maxLength == 0)
$this->commentsObj->itemActions->parse_title();
function parse_date($format = '') {
echo formatDate($format, $this->currentComment['timestamp'], $this->template['FORMAT_DATE'], $this->commentsObj->itemActions->blog);
}
+
function parse_time($format = '') {
echo strftime(
($format == '') ? $this->template['FORMAT_TIME'] : $format,
);
}
- function parse_commentid() { echo $this->currentComment['commentid']; }
- function parse_body() { echo $this->highlight($this->currentComment['body']); }
- function parse_memberid() { echo $this->currentComment['memberid']; }
- function parse_timestamp() { echo $this->currentComment['timestamp']; }
- function parse_host() { echo $this->currentComment['host']; }
- function parse_ip() { echo $this->currentComment['ip']; }
- function parse_blogid() { echo $this->currentComment['blogid']; }
+ function parse_commentid() {
+ echo $this->currentComment['commentid'];
+ }
+
+ function parse_body() {
+ echo $this->highlight($this->currentComment['body']);
+ }
+
+ function parse_memberid() {
+ echo $this->currentComment['memberid'];
+ }
+
+ function parse_timestamp() {
+ echo $this->currentComment['timestamp'];
+ }
+
+ function parse_host() {
+ echo $this->currentComment['host'];
+ }
+
+ function parse_ip() {
+ echo $this->currentComment['ip'];
+ }
+
+ function parse_blogid() {
+ echo $this->currentComment['blogid'];
+ }
- function parse_user() { echo $this->currentComment['user']; }
- function parse_userid() { echo $this->currentComment['userid']; }
+ function parse_user() {
+ echo $this->currentComment['user'];
+ }
+
+ function parse_userid() {
+ echo $this->currentComment['userid'];
+ }
+
function parse_email() {
$email = $this->currentComment['email'];
$email = str_replace('@', ' (at) ', $email);
$email = str_replace('.', ' (dot) ', $email);
echo $email;
}
- function parse_userlinkraw() { echo $this->currentComment['userlinkraw']; }
+
+ function parse_userlinkraw() {
+ echo $this->currentComment['userlinkraw'];
+ }
+
function parse_userlink() {
if ($this->currentComment['userlinkraw']) {
echo '<a href="'.$this->currentComment['userlinkraw'].'" rel="nofollow">'.$this->currentComment['user'].'</a>';
function parse_excerpt() {
echo stringToXML(shorten($this->currentComment['body'], 60, '...'));
}
+
function parse_short() {
$tmp = strtok($this->currentComment['body'],"\n");
$tmp = str_replace('<br />','',$tmp);
if ($tmp != $this->currentComment['body'])
$this->parser->parse($this->template['COMMENTS_CONTINUED']);
}
+
function parse_authtext() {
if ($this->currentComment['memberid'] != 0)
$this->parser->parse($this->template['COMMENTS_AUTH']);
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* A class representing the comments (all of them) for a certain post on a ceratin blog
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: COMMENTS.php,v 1.6 2006-07-17 20:03:44 kimitake Exp $
- * $NucleusJP: COMMENTS.php,v 1.5 2005/03/12 06:19:05 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: COMMENTS.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: COMMENTS.php,v 1.6 2006/07/17 20:03:44 kimitake Exp $
*/
// temporary: dirt way to separe class COMMENTACTIONS from COMMENTS
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Part of the code for the Nucleus admin area
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ENCAPSULATE.php,v 1.2 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: ENCAPSULATE.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: ENCAPSULATE.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
*/
class ENCAPSULATE {
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* A class representing an item
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ITEM.php,v 1.6 2006-07-20 08:01:52 kimitake Exp $
- * $NucleusJP: ITEM.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: ITEM.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: ITEM.php,v 1.6 2006/07/20 08:01:52 kimitake Exp $
*/
-
class ITEM {
var $itemid;
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* This class to parse item templates
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: ITEMACTIONS.php,v 1.2 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: ITEMACTIONS.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: ITEMACTIONS.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
*/
-
class ITEMACTIONS extends BaseActions {
// contains an assoc array with parameters that need to be included when
);
}
-
-
- function setLastVisit($lastVisit) { $this->lastVisit = $lastVisit; }
- function setParser(&$parser) { $this->parser =& $parser; }
- function setCurrentItem(&$item) { $this->currentItem =& $item; }
- function setBlog(&$blog) { $this->blog =& $blog; }
- function setTemplate($template) { $this->template =& $template; }
- function setShowComments($val) { $this->showComments = $val; }
+ function setLastVisit($lastVisit) {
+ $this->lastVisit = $lastVisit;
+ }
+
+ function setParser(&$parser) {
+ $this->parser =& $parser;
+ }
+
+ function setCurrentItem(&$item) {
+ $this->currentItem =& $item;
+ }
+
+ function setBlog(&$blog) {
+ $this->blog =& $blog;
+ }
+
+ function setTemplate($template) {
+ $this->template =& $template;
+ }
+
+ function setShowComments($val) {
+ $this->showComments = $val;
+ }
// methods used by parser to insert content
- function parse_blogid() { echo $this->blog->getID(); }
- function parse_body() { $this->highlightAndParse($this->currentItem->body); }
- function parse_more() { $this->highlightAndParse($this->currentItem->more); }
- function parse_itemid() { echo $this->currentItem->itemid; }
- function parse_category() { echo $this->currentItem->category; }
- function parse_categorylink() { echo createLink('category', array('catid' => $this->currentItem->catid, 'name' => $this->currentItem->category)); }
- function parse_catid() { echo $this->currentItem->catid; }
- function parse_authorid() { echo $this->currentItem->authorid; }
+ function parse_blogid() {
+ echo $this->blog->getID();
+ }
+
+ function parse_body() {
+ $this->highlightAndParse($this->currentItem->body);
+ }
+
+ function parse_more() {
+ $this->highlightAndParse($this->currentItem->more);
+ }
+
+ function parse_itemid() {
+ echo $this->currentItem->itemid;
+ }
+
+ function parse_category() {
+ echo $this->currentItem->category;
+ }
+
+ function parse_categorylink() {
+ echo createLink('category', array('catid' => $this->currentItem->catid, 'name' => $this->currentItem->category));
+ }
+
+ function parse_catid() {
+ echo $this->currentItem->catid;
+ }
+
+ function parse_authorid() {
+ echo $this->currentItem->authorid;
+ }
+
function parse_authorlink() {
echo createLink(
'member',
)
);
}
- function parse_query() { echo $this->strHighlight; }
+
+ function parse_query() {
+ echo $this->strHighlight;
+ }
+
function parse_itemlink() {
echo createLink(
'item',
)
);
}
- function parse_blogurl() { echo $this->blog->getURL(); }
- function parse_closed() { echo $this->currentItem->closed; }
- function parse_relevance() { echo round($this->currentItem->score,2);}
+
+ function parse_blogurl() {
+ echo $this->blog->getURL();
+ }
+
+ function parse_closed() {
+ echo $this->currentItem->closed;
+ }
+
+ function parse_relevance() {
+ echo round($this->currentItem->score,2);
+ }
function parse_title($format = '') {
switch ($format) {
$args = explode('|',implode($args,', '));
call_user_func_array(array(&$this,'createImageCode'),$args);
}
+
function parse_popup() {
// image/popup calls have arguments separated by |
$args = func_get_args();
$args = explode('|',implode($args,', '));
call_user_func_array(array(&$this,'createPopupCode'),$args);
}
+
function parse_media() {
// image/popup calls have arguments separated by |
$args = func_get_args();
}
}
-/**
- * A class to parse plugin calls inside items
- */
-class BODYACTIONS extends ITEMACTIONS {
-
- function getDefinedActions() {
- return array('image','media','popup','plugin');
- }
-
- function parse_plugin($pluginName) {
- global $manager;
-
- // only continue when the plugin is really installed
- if (!$manager->pluginInstalled('NP_' . $pluginName)) {
- return;
- }
-
- $plugin =& $manager->getPlugin('NP_' . $pluginName);
- if (!$plugin) return;
-
- // get arguments
- $params = func_get_args();
-
- // remove plugin name
- array_shift($params);
-
- // add item reference (array_unshift didn't work)
- $params = array_merge(array(&$this->currentItem),$params);
-
- call_user_func_array(array(&$plugin,'doItemVar'), $params);
- }
-}
?>
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Class representing the karma votes for a certain item
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: KARMA.php,v 1.5 2006-07-17 20:03:44 kimitake Exp $
- * $NucleusJP: KARMA.php,v 1.4 2005/08/13 07:33:02 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: KARMA.php,v 1.6 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: KARMA.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
*/
class KARMA {
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* active at all times. The object can be requested using MANAGER::instance()
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: MANAGER.php,v 1.6 2006-07-20 08:01:52 kimitake Exp $
- * $NucleusJP: MANAGER.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: MANAGER.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: MANAGER.php,v 1.6 2006/07/20 08:01:52 kimitake Exp $
*/
class MANAGER {
}
-?>
+?>
\ No newline at end of file
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Media classes for nucleus
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: MEDIA.php,v 1.5 2006-07-17 20:03:44 kimitake Exp $
- * $NucleusJP: MEDIA.php,v 1.4 2005/08/13 07:33:02 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: MEDIA.php,v 1.6 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: MEDIA.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
*/
* (date prefix should be already added here)
*/
function addMediaObject($collection, $uploadfile, $filename) {
- global $DIR_MEDIA;
+ global $DIR_MEDIA, $manager;
+
+ $manager->notify('PreMediaUpload',array('collection' => &$collection, 'uploadfile' => $uploadfile, 'filename' => &$filename));
// don't allow uploads to unknown or forbidden collections
if (!MEDIA::isValidCollection($collection))
@chmod($mediadir . $filename, 0644);
umask($oldumask);
+ $manager->notify('PostMediaUpload',array('collection' => $collection, 'mediadir' => $mediadir, 'filename' => $filename));
+
return '';
}
return ($a->timestamp > $b->timestamp) ? -1 : 1;
}
-?>
\ No newline at end of file
+?>
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* A class representing site members
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: MEMBER.php,v 1.6 2006-07-17 20:03:44 kimitake Exp $
- * $NucleusJP: MEMBER.php,v 1.5 2005/08/13 07:33:02 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: MEMBER.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: MEMBER.php,v 1.6 2006/07/17 20:03:44 kimitake Exp $
*/
class MEMBER {
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* message can be sent (e.g. comment or karma vote notification).
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: NOTIFICATION.php,v 1.6 2006-07-17 20:03:44 kimitake Exp $
- * $NucleusJP: NOTIFICATION.php,v 1.5 2006/07/12 07:11:47 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: NOTIFICATION.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: NOTIFICATION.php,v 1.6 2006/07/17 20:03:44 kimitake Exp $
*/
class NOTIFICATION {
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: PAGEFACTORY.php,v 1.6 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: PAGEFACTORY.php,v 1.5 2005/08/13 07:33:02 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: PAGEFACTORY.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: PAGEFACTORY.php,v 1.6 2006/07/12 07:11:47 kimitake Exp $
*/
/**
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: PARSER.php,v 1.5 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: PARSER.php,v 1.4 2005/08/13 07:33:02 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: PARSER.php,v 1.6 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: PARSER.php,v 1.5 2006/07/12 07:11:47 kimitake Exp $
*/
// temporary: dirt way to separe class BaseActions from PARSER
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* plugins.html file that is included with the Nucleus documenation
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: PLUGIN.php,v 1.6 2006-12-07 03:18:33 kmorimatsu Exp $
- * $NucleusJP: PLUGIN.php,v 1.5 2006/07/12 07:11:47 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: PLUGIN.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: PLUGIN.php,v 1.6 2006/12/07 03:18:33 kmorimatsu Exp $
*/
class NucleusPlugin {
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* code to make it easier to create plugin admin areas
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: PLUGINADMIN.php,v 1.5 2006-07-12 07:11:47 kimitake Exp $
- * $NucleusJP: PLUGINADMIN.php,v 1.4 2005/08/13 07:33:02 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: PLUGINADMIN.php,v 1.6 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: PLUGINADMIN.php,v 1.5 2006/07/12 07:11:47 kimitake Exp $
*/
global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_ENV_VARS, $HTTP_POST_FILES, $HTTP_SESSION_VARS;
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2003-2006 The Nucleus Group
+ * Copyright (C) 2003-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* http://davidaltherr.net/web/php_functions/boolean/funcs.mysql.boolean.txt
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: SEARCH.php,v 1.7 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP: SEARCH.php,v 1.6 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: SEARCH.php,v 1.8 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: SEARCH.php,v 1.7 2006/07/20 08:01:52 kimitake Exp $
*/
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Class representing a skin
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: SKIN.php,v 1.6 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP: SKIN.php,v 1.5 2006/07/12 07:11:47 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: SKIN.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: SKIN.php,v 1.6 2006/07/20 08:01:52 kimitake Exp $
*/
class SKIN {
'elseif',
'ifnot',
'elseifnot',
- 'charset'
+ 'charset',
+ 'bloglist'
);
// extra actions specific for a certain skin type
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* A class representing a template
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: TEMPLATE.php,v 1.6 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP: TEMPLATE.php,v 1.5 2006/07/12 07:11:47 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: TEMPLATE.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: TEMPLATE.php,v 1.6 2006/07/20 08:01:52 kimitake Exp $
*/
class TEMPLATE {
}
-?>
+?>
\ No newline at end of file
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Based on code in phpBB (http://phpBB.sourceforge.net)
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: backup.php,v 1.6 2006-12-11 22:23:49 kmorimatsu Exp $
- * $NucleusJP: backup.php,v 1.5 2006/07/17 20:03:44 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: backup.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: backup.php,v 1.6 2006/12/11 22:23:49 kmorimatsu Exp $
*/
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
-* @version $Id: globalfunctions.php,v 1.11 2007-02-03 06:03:57 kimitake Exp $
- * $NucleusJP: globalfunctions.php,v 1.10 2007/01/31 10:02:58 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: globalfunctions.php,v 1.12 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: globalfunctions.php,v 1.11 2007/02/03 06:03:57 kimitake Exp $
*/
// needed if we include globalfunctions from install.php
include($DIR_LIBS . 'SKIN.php');
include($DIR_LIBS . 'TEMPLATE.php');
include($DIR_LIBS . 'BLOG.php');
+include($DIR_LIBS . 'BODYACTIONS.php');
include($DIR_LIBS . 'COMMENTS.php');
include($DIR_LIBS . 'COMMENT.php');
//include($DIR_LIBS . 'ITEM.php');
* Checks if email address is valid
*/
function isValidMailAddress($address) {
- if (preg_match('/^[a-zA-Z0-9\._-]+@[a-zA-Z0-9\._-]+\.[A-Za-z]{2,5}$/', $address) ) {
+ if (preg_match('/^[a-zA-Z+0-9\._-]+@[a-zA-Z0-9\._-]+\.[A-Za-z]{2,5}$/', $address)) {
return 1;
} else {
return 0;
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: mysql.php,v 1.2 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP$
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: mysql.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: mysql.php,v 1.2 2006/07/20 08:01:52 kimitake Exp $
*/
/*
-?>
+?>
\ No newline at end of file
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Functions to create lists of things inside the admin are
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: showlist.php,v 1.4 2006-11-13 00:36:39 kimitake Exp $
- * @version $NucleusJP: showlist.php,v 1.3 2006/07/20 08:01:52 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: showlist.php,v 1.5 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: showlist.php,v 1.4 2006/11/13 00:36:39 kimitake Exp $
*/
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* exporting Nucleus skins: SKINIMPORT and SKINEXPORT
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: skinie.php,v 1.6 2006-07-20 08:01:52 kimitake Exp $
- * @version $NucleusJP: skinie.php,v 1.5 2006/07/12 07:11:47 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: skinie.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: skinie.php,v 1.6 2006/07/20 08:01:52 kimitake Exp $
*/
class SKINIMPORT {
}
}
-?>
+?>
\ No newline at end of file
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: vars4.0.6.php,v 1.9 2006-12-18 20:30:48 kmorimatsu Exp $
- * @version $NucleusJP: vars4.0.6.php,v 1.8 2006/07/20 08:01:52 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: vars4.0.6.php,v 1.10 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: vars4.0.6.php,v 1.9 2006/12/18 20:30:48 kmorimatsu Exp $
*/
/**
$HTTP_POST_VARS['oldaction'] = $value;
}
-?>
+?>
\ No newline at end of file
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*/
/**
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: vars4.1.0.php,v 1.9 2006-12-18 20:31:08 kmorimatsu Exp $
- * @version $NucleusJP: vars4.1.0.php,v 1.8 2006/07/20 08:01:52 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: vars4.1.0.php,v 1.10 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: vars4.1.0.php,v 1.9 2006/12/18 20:31:08 kmorimatsu Exp $
*/
function getVar($name) {
$_POST['oldaction'] = $value;
}
-?>
+
+?>
\ No newline at end of file
<?php
// by Edd Dumbill (C) 1999-2002
// <edd@usefulinc.com>
-// $Id: xmlrpcs.inc.php,v 1.8 2007-01-31 10:02:58 kimitake Exp $
-// $NucleusJP: xmlrpcs.inc.php,v 1.7 2006/07/12 07:11:47 kimitake Exp $
+// $Id: xmlrpcs.inc.php,v 1.9 2007-02-04 06:28:46 kimitake Exp $
+// $NucleusJP: xmlrpcs.inc.php,v 1.8 2007/01/31 10:02:58 kimitake Exp $
// Copyright (c) 1999,2000,2002 Edd Dumbill.
// All rights reserved.
$_xh[$parser]['stack']=array();
$_xh[$parser]['sp'] = 0;
$_xh[$parser]['valuestack'] = array();
+ $_xh[$parser]['vsp'] = 0;
$_xh[$parser]['method']='';
// decompose incoming XML into request structure
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* passed through to the add-item form (linkto, popupimg or inline img)
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: media.php,v 1.6 2006-07-17 20:01:39 kimitake Exp $
- * $NucleusJP: media.php,v 1.5 2005/08/13 07:33:45 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: media.php,v 1.7 2007-02-04 06:28:45 kimitake Exp $
+ * $NucleusJP: media.php,v 1.6 2006/07/17 20:01:39 kimitake Exp $
*
*/
/* ==========================================================================================
* Nucleus SkinFiles Plugin
*
- * Copyright 2005 by Jeff MacMichael and Niels Leenheer
+ * Copyright 2005-2007 by Jeff MacMichael and Niels Leenheer
*
- * @version $Id: NP_SkinFiles.php,v 1.3 2006-07-17 20:03:45 kimitake Exp $
- * @version $NucleusJP: NP_SkinFiles.php,v 1.1.2.5 2006/01/25 09:58:54 kimitake Exp $
+ * @version $Id: NP_SkinFiles.php,v 1.4 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: NP_SkinFiles.php,v 1.3 2006/07/17 20:03:45 kimitake Exp $
*
* ==========================================================================================
* This program is free software and open source software; you can redistribute
}
}
-?>
\ No newline at end of file
+?>
<?php
/*
- * @version $Id: english.php,v 1.2 2007-01-29 22:07:42 kimitake Exp $
- * @version $NucleusJP: index.php,v 1.5.2.1 2005/08/25 07:04:13 kimitake Exp $
+ * @version $Id: english.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: english.php,v 1.2 2007/01/29 22:07:42 kimitake Exp $
*/
define('_SKINFILES_TITLE', 'Skin Files');
-\<?php
+<?php
/* ==========================================================================================
* Nucleus SkinFiles Plugin
*
- * Copyright 2005 by Jeff MacMichael and Niels Leenheer
+ * Copyright 2005-2007 by Jeff MacMichael and Niels Leenheer
*
- * @version $Id: index.php,v 1.4 2007-01-31 10:02:58 kimitake Exp $
- * @version $NucleusJP: index.php,v 1.3 2007/01/29 22:07:42 kimitake Exp $
+ * @version $Id: index.php,v 1.5 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: index.php,v 1.4 2007/01/31 10:02:58 kimitake Exp $
*
* ==========================================================================================
* This program is free software and open source software; you can redistribute
<?php
/*
- * @version $Id: japanese-euc.php,v 1.2 2007-01-29 22:07:42 kimitake Exp $
- * @version $NucleusJP: index.php,v 1.5.2.1 2005/08/25 07:04:13 kimitake Exp $
+ * @version $Id: japanese-euc.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: japanese-euc.php,v 1.2 2007/01/29 22:07:42 kimitake Exp $
*/
define('_SKINFILES_TITLE', '¥¹¥¥ó¥Õ¥¡¥¤¥ë');
<?php
/*
- * @version $Id: japanese-utf8.php,v 1.2 2007-01-29 22:07:42 kimitake Exp $
- * @version $NucleusJP: index.php,v 1.5.2.1 2005/08/25 07:04:13 kimitake Exp $
+ * @version $Id: japanese-utf8.php,v 1.3 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: japanese-utf8.php,v 1.2 2007/01/29 22:07:42 kimitake Exp $
*/
define('_SKINFILES_TITLE', 'スキンファイル');
<?php
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2005 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* of the License, or (at your option) any later version.
* (see nucleus/documentation/index.html#license for more info)
*
- * $Id: index.php,v 1.7 2006-07-17 20:03:45 kimitake Exp $
- * $NucleusJP: index.php,v 1.6 2006/07/12 07:11:49 kimitake Exp $
+ * $Id: index.php,v 1.8 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: index.php,v 1.7 2006/07/17 20:03:45 kimitake Exp $
*/
include('upgrade.functions.php');
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2005 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
*
* Some functions common to all upgrade scripts
*
- * $Id: upgrade.functions.php,v 1.6 2006-07-12 07:11:49 kimitake Exp $
- * $NucleusJP: upgrade.functions.php,v 1.5 2005/03/19 07:20:50 kimitake Exp $
+ * $Id: upgrade.functions.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: upgrade.functions.php,v 1.6 2006/07/12 07:11:49 kimitake Exp $
*/
include('../../config.php');
<?php
/**
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2005 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* of the License, or (at your option) any later version.
* (see nucleus/documentation/index.html#license for more info)
*
- * $Id: upgrade.php,v 1.4 2006-07-12 07:11:49 kimitake Exp $
- * $NucleusJP: upgrade.php,v 1.3 2005/03/17 08:57:28 kimitake Exp $
+ * $Id: upgrade.php,v 1.5 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: upgrade.php,v 1.4 2006/07/12 07:11:49 kimitake Exp $
*/
include('upgrade.functions.php');
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* This file contains definitions for the methods in the Blogger API
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: api_blogger.inc.php,v 1.5 2006-07-17 20:03:45 kimitake Exp $
- * $NucleusJP: api_blogger.inc.php,v 1.4 2005/04/20 07:02:31 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: api_blogger.inc.php,v 1.6 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: api_blogger.inc.php,v 1.5 2006/07/17 20:03:45 kimitake Exp $
*/
);
-?>
\ No newline at end of file
+?>
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* This file contains definitions for the methods of the metaWeblog API
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: api_metaweblog.inc.php,v 1.5 2006-07-17 20:03:45 kimitake Exp $
- * $NucleusJP: api_metaweblog.inc.php,v 1.4 2005/04/20 07:02:31 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: api_metaweblog.inc.php,v 1.6 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: api_metaweblog.inc.php,v 1.5 2006/07/17 20:03:45 kimitake Exp $
*/
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* Wouter Demuynck 2003-08-31
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * $NucleusJP: api_mt.inc.php,v 1.4 2005/04/20 07:02:31 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * $NucleusJP: api_mt.inc.php,v 1.5 2006/07/17 20:03:45 kimitake Exp $
*/
// mt.supportedMethods
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* NOTE: These functions are deprecated and will most likely be removed!
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: api_nucleus.inc.php,v 1.5 2006-07-17 20:03:45 kimitake Exp $
- * $NucleusJP: api_nucleus.inc.php,v 1.4 2005/04/20 07:02:31 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: api_nucleus.inc.php,v 1.6 2007-02-04 06:28:46 kimitake Exp $
+ * $NucleusJP: api_nucleus.inc.php,v 1.5 2006/07/17 20:03:45 kimitake Exp $
*/
// nucleus.addItem
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* mt.supportedMethods
*
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: server.php,v 1.6 2006-07-17 20:03:45 kimitake Exp $
- * @version $NucleusJP: server.php,v 1.5 2005/08/13 07:25:03 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: server.php,v 1.7 2007-02-04 06:28:46 kimitake Exp $
+ * @version $NucleusJP: server.php,v 1.6 2006/07/17 20:03:45 kimitake Exp $
*/
$CONF = array();
include("../../config.php"); // include Nucleus libs and code
selectSkin('xml/rsd');
selector();
-?>
+?>
\ No newline at end of file
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
- * Copyright (C) 2002-2006 The Nucleus Group
+ * Copyright (C) 2002-2007 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
/**
* Nucleus RSS syndication channel skin
* @license http://nucleuscms.org/license.txt GNU General Public License
- * @copyright Copyright (C) 2002-2006 The Nucleus Group
- * @version $Id: xml-rss2.php,v 1.7 2006-07-17 19:59:46 kimitake Exp $
- * $NucleusJP: xml-rss2.php,v 1.6 2006/07/12 07:11:45 kimitake Exp $
+ * @copyright Copyright (C) 2002-2007 The Nucleus Group
+ * @version $Id: xml-rss2.php,v 1.8 2007-02-04 06:28:44 kimitake Exp $
+ * $NucleusJP: xml-rss2.php,v 1.7 2006/07/17 19:59:46 kimitake Exp $
*/
-header("Pragma: no-cache");
+header('Pragma: no-cache');
$CONF = array();
-$CONF['Self'] = "xml-rss2.php";
+$CONF['Self'] = 'xml-rss2.php';
include('./config.php');
if (!$CONF['DisableSite']) {
+
// get feed into $feed
ob_start();
- selectSkin('feeds/rss20');
- selector();
+ selectSkin('feeds/rss20');
+ selector();
$feed = ob_get_contents();
ob_end_clean();
// create ETAG (hash of feed)
// (HTTP_IF_NONE_MATCH has quotes around it)
- $eTag = '"'.md5($feed).'"';
- header('Etag: '.$eTag);
+ $eTag = '"' . md5($feed) . '"';
+ header('Etag: ' . $eTag);
// compare Etag to what we got
- if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
- header("HTTP/1.0 304 Not Modified");
+ if ($eTag == serverVar('HTTP_IF_NONE_MATCH') ) {
+ header('HTTP/1.0 304 Not Modified');
header('Content-Length: 0');
} else {
header("Content-Type: application/xml");
// output empty RSS file...
// (because site is disabled)
- echo '<' . '?xml version="1.0" encoding="ISO-8859-1"?' . '>';
+ echo '<' . '?xml version="1.0" encoding="' . _CHARSET . '"?' . '>';
?>
<rss version="2.0">
- <channel>
- <title><?php echo htmlspecialchars($CONF['SiteName'])?></title>
- <link><?php echo htmlspecialchars($CONF['IndexURL'])?></link>
- <description></description>
- <docs>http://backend.userland.com/rss</docs>
- </channel>
+ <channel>
+ <title><?php echo htmlspecialchars($CONF['SiteName']); ?></title>
+ <link><?php echo htmlspecialchars($CONF['IndexURL']); ?></link>
+ <description></description>
+ <docs>http://backend.userland.com/rss</docs>
+ </channel>
</rss>
<?php
}
-?>
+?>
\ No newline at end of file