Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9362
Modified Files:
serendipity_config_local.tpl serendipity_functions.inc.php
Log Message:
Prototypical implementation of Top Links as text, optional as links
(configuration setting included).
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.310
retrieving revision 1.311
diff -u -d -r1.310 -r1.311
--- serendipity_functions.inc.php 4 Jul 2004 15:55:49 -0000 1.310
+++ serendipity_functions.inc.php 5 Jul 2004 06:28:14 -0000 1.311
@@ -2960,16 +2960,25 @@
LIMIT $limit";
}
+ $link = serendipity_get_config_var('top_as_links', false, true);
$rows = serendipity_db_query($query);
echo "<span class='serendipityReferer'>";
if (is_array($rows)) {
foreach ($rows as $row) {
- printf(
- '<a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)<br />',
- $row['scheme'],
- $row['host'],
- $row['total']
- );
+ if ($link) {
+ printf(
+ '<a href="%1$s://%2$s" title="%2$s" >%2$s</a> (%3$s)<br />',
+ $row['scheme'],
+ $row['host'],
+ $row['total']
+ );
+ } else {
+ printf(
+ '%1$s (%2$s)<br />',
+ $row['host'],
+ $row['total']
+ );
+ }
}
}
echo "</span>";
Index: serendipity_config_local.tpl
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_config_local.tpl,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- serendipity_config_local.tpl 21 Jun 2004 14:55:32 -0000 1.40
+++ serendipity_config_local.tpl 5 Jul 2004 06:28:14 -0000 1.41
@@ -37,6 +37,7 @@
$serendipity['XHTML11'] = '{INSTALL_XHTML11|XHTML11|bool|0|255}'; // INSTALL_XHTML11_DESC
$serendipity['enablePopup'] = '{INSTALL_POPUP|enablePopup|bool|1|255}'; // INSTALL_POPUP_DESC
$serendipity['embed'] = '{INSTALL_EMBED|embed|bool||255}'; // INSTALL_EMBED_DESC
+$serendipity['top_as_links'] = '{INSTALL_TOP_AS_LINKS|top_as_links|bool||0|255}'; // INSTALL_TOP_AS_LINKS_DESC
$serendipity['blockReferer'] = '{INSTALL_BLOCKREF|blockReferer|string|;|255}'; // INSTALL_BLOCKREF_DESC
$serendipity['rewrite'] = '{INSTALL_REWRITE|rewrite|list|none=>Disable URL Rewriting,errordocs=>Use Apache errorhandling,rewrite=>Use Apache mod_rewrite|255}'; // INSTALL_REWRITE_DESC
|