Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13799
Modified Files:
serendipity_config_local.tpl serendipity_functions.inc.php
Log Message:
- Introduce a variable enablePopup governing the use of
window.open and target= in Comment-(Link) and for the
Comments and Trackback windows (default is enabled, to
be compatible).
- Fix newspaper layout (Illegal syntax, missing '}', introduce
use of fetchLimit parameter, make layout capable of 3 column
layout, make layout variable width (previously statically 750px,
- Delete spurious windows line endings, fix indentation
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- serendipity_functions.inc.php 24 Mar 2004 12:45:23 -0000 1.236
+++ serendipity_functions.inc.php 24 Mar 2004 20:02:16 -0000 1.237
@@ -856,16 +856,18 @@
if (!isset($serendipity['GET']['id'])) {
$label = $entry['comments'] == 1 ? COMMENT : COMMENTS;
echo ' | <a href="' . $serendipity['serendipityHTTPPath'] . 'comment.php?serendipity[entry_id]=' . $entry['id'] . '&serendipity[type]=comments"';
- echo ' onclick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">';
- echo $label . ' (' . $entry['comments'] . ')</a>';
+ if ($serendipity['enablePopup'])
+ echo ' onclick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;"';
+ echo '>' . $label . ' (' . $entry['comments'] . ')</a>';
}
}
if (serendipity_db_bool($entry['allow_comments']) || !isset($entry['allow_comments']) || $entry['trackbacks'] > 0) {
$label = $entry['trackbacks'] == 1 ? TRACKBACK : TRACKBACKS;
echo ' | <a href="' . $serendipity['serendipityHTTPPath'] . 'comment.php?serendipity[entry_id]=' . $entry['id'] . '&serendipity[type]=trackbacks"';
- echo ' onclick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">';
- echo $label . ' (' . $entry['trackbacks'] . ')</a>';
+ if ($serendipity['enablePopup'])
+ echo ' onclick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;"';
+ echo '>' . $label . ' (' . $entry['trackbacks'] . ')</a>';
}
if ($_SESSION['serendipityAuthedUser'] === true) {
@@ -2325,24 +2327,24 @@
}
);
config<?php echo $jsname; ?>.toolbar.push([ "image_selector"]);
- config<?php echo $jsname; ?>.toolbar = [
- [ "fontname", "space",
- "fontsize", "space",
- "formatblock", "space",
- "bold", "italic", "underline", "strikethrough", "separator",
- "subscript", "superscript", "separator",
- "copy", "cut", "paste", "space", "undo", "redo" ],
-
- [ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
- "lefttoright", "righttoleft", "separator",
- "insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator",
- "forecolor", "hilitecolor", "separator",
- "inserthorizontalrule", "createlink", "insertimage", "image_selector", "inserttable", "htmlmode", "separator",
+ config<?php echo $jsname; ?>.toolbar = [
+ [ "fontname", "space",
+ "fontsize", "space",
+ "formatblock", "space",
+ "bold", "italic", "underline", "strikethrough", "separator",
+ "subscript", "superscript", "separator",
+ "copy", "cut", "paste", "space", "undo", "redo" ],
+
+ [ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator",
+ "lefttoright", "righttoleft", "separator",
+ "insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator",
+ "forecolor", "hilitecolor", "separator",
+ "inserthorizontalrule", "createlink", "insertimage", "image_selector", "inserttable", "htmlmode", "separator",
"popupeditor", "separator", "showhelp", "about" ]
];
editor<?php echo $jsname; ?>.generate();
editor<?php echo $jsname; ?>._textArea.className = 'serendipity_entry';
- }
+ }
</script>
<?php
}
@@ -2461,6 +2463,9 @@
{
global $serendipity;
+ if ($serendipity['enablePopup'] != true)
+ return "";
+
if ($serendipity['XHTML11']) {
return ' onclick="window.open(this.href, \'target' . time() . '\'); return false;" ';
} else {
Index: serendipity_config_local.tpl
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config_local.tpl,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- serendipity_config_local.tpl 23 Mar 2004 15:49:25 -0000 1.34
+++ serendipity_config_local.tpl 24 Mar 2004 20:02:15 -0000 1.35
@@ -35,6 +35,7 @@
$serendipity['extCSS'] = '{External Stylesheet|extCSS|string|none}'; // You can define a stylesheet uri here, aditionally to the settings adjustable in the admin interface (enter 'none' if you don't need this)
$serendipity['wysiwyg'] = '{Use WYSIWYG editor|wysiwyg|bool|1}'; // Do you want to use the WYSIWYG editor? (Only works on IE5+, Mozilla 1.3+)
$serendipity['XHTML11'] = '{Force XHTML 1.1 compliance|XHTML11|bool|0}'; // Do you want to force XHTML 1.1 compliance (may cause problems for back-/frontend on older 4th generation browsers)
+$serendipity['enablePopup'] = '{Enable use of popup windows for comments, trackbacks et al|enablePopup|bool|1}'; // Do you want to use the blog to use popup windows for comments, trackbacks et al?
$serendipity['embed'] = '{Is serendipity embedded?|embed|bool|0}'; // If you want to embed serendipity within a regular page, set to true to discard any headers and just print the contents. You can make use of the indexFile option to use a wrapper class where you put your normal webpage headers. See the INSTALL file for more information!
$serendipity['blockReferer'] = '{Blocked Referers|blockReferer|string|;}'; // Are there any special hosts you want not to show up in the referers list? Separate the list of hostnames with ';' and note that the host is blocked by substring matches!
$serendipity['rewrite'] = '{URL Rewriting|rewrite|list|none=>Disable URL Rewriting,errordocs=>Use Apache errorhandling,rewrite=>Use Apache mod_rewrite}'; // Select which rules you wish to use when generating URLs. Enabling rewrite rules will make pretty URLs for your blog and make it better indexable for spiders like google. The webserver needs to support either mod_rewrite or "AllowOverride All" for your serendipity dir. The default setting is auto-detected.
|