case 'PRIMARY CATEGORY':
case 'CATEGORY':
$categories = explode("\0", $data);
+ echo '<pre>' . print_r($this->categories, true) . '</pre>';
foreach($categories AS $data) {
$data = trim($data);
$cat_found = false;
if (is_array($this->categories)) {
for ( $y=0 ; $y<sizeof($this->categories) ; $y++ ) {
+ echo '"' . $this->categories[$y]['category_name'] . '" == "' . $data . '"<br />';
if ( $this->categories[$y]['category_name'] == $data ) {
$cat_found = true;
break;
if ( !sizeof($tasks) || $force == true ) {
serendipity_db_begin_transaction();
foreach ($entries as $entry) {
+ echo '<pre>' . printR_($entry, true) . '</pre><br />';
+ continue;
if (empty($entry['authorid'])) {
$entry['authorid'] = $serendipity['authorid'];
$entry['author'] = $serendipity['realname'];
/* Hack to make sure that when the single dropdown is shown, don't have multiple selections */
last = 0;
-
+
for (i=0; i < el.options.length; i++) {
if (el.options[i].selected == true) {
selected++;
break;
}
}
-
+
el.selectedIndex = null;
if (last > 0) {
el.selectedIndex = last;
?>
return true;
}
-
+
selector_toggle['categoryselector'] = '<?php echo ($categoryselector_expanded ? 'on' : 'off'); ?>';
addLoadEvent(showItem);
</script>
if (!$serendipity['wysiwyg'] && eregi($serendipity['EditorBrowsers'], $_SERVER['HTTP_USER_AGENT']) ) {
?>
<script type="text/javascript" language="JavaScript">
- document.write('<input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<i>\',\'</i>\')" />');
- document.write('<input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<b>\',\'</b>\')" />');
+ document.write('<input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<em>\',\'</em>\')" />');
+ document.write('<input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<strong>\',\'</strong>\')" />');
document.write('<input type="button" class="serendipityPrettyButton" name="insU" value="U" accesskey="u" style="text-decoration: underline;" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<u>\',\'</u>\')" />');
document.write('<input type="button" class="serendipityPrettyButton" name="insQ" value="<?php echo QUOTE ?>" accesskey="q" style="font-style: italic" onclick="wrapSelection(document.forms[\'serendipityEntry\'][\'serendipity[body]\'],\'<blockquote>\',\'</blockquote>\')" />');
document.write('<input type="button" class="serendipityPrettyButton" name="insJ" value="img" accesskey="j" onclick="wrapInsImage(document.forms[\'serendipityEntry\'][\'serendipity[body]\'])" />');
/* Since the user has WYSIWYG editor disabled, we want to check if we should use the "better" non-WYSIWYG editor */
if (eregi($serendipity['EditorBrowsers'], $_SERVER['HTTP_USER_AGENT']) ) {
?>
- <input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<i>','</i>')" />
- <input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<b>','</b>')" />
+ <input type="button" class="serendipityPrettyButton" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<em>','</em>')" />
+ <input type="button" class="serendipityPrettyButton" name="insB" value="B" accesskey="b" style="font-weight: bold" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<strong>','</strong>')" />
<input type="button" class="serendipityPrettyButton" name="insU" value="U" accesskey="u" style="text-decoration: underline;" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<u>','</u>')" />
<input type="button" class="serendipityPrettyButton" name="insQ" value="<?php echo QUOTE ?>" accesskey="q" style="font-style: italic" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[extended]'],'<blockquote>','</blockquote>')" />
<input type="button" class="serendipityPrettyButton" name="insJ" value="img" accesskey="j" onclick="wrapInsImage(document.forms['serendipityEntry']['serendipity[extended]'])" />
<?php
if ($serendipity['wysiwyg']) {
$fields = array(
- 'body' => 'serendipity[body]',
+ 'body' => 'serendipity[body]',
'extended' => 'serendipity[extended]'
);
-
+
foreach($fields AS $f_jsname => $f_item) {
serendipity_emit_htmlarea_code($f_item, $f_jsname);
}