[geeklog-cvs] geeklog: Added a config option to enable/disable clickable links

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Apr 20 08:13:50 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c9bf3ef501e3
changeset: 6974:c9bf3ef501e3
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Apr 19 21:45:18 2009 +0200
description:
Added a config option to enable/disable clickable links

diffstat:

6 files changed, 24 insertions(+), 4 deletions(-)
public_html/admin/install/config-install.php |    3 ++-
public_html/docs/english/config.html         |    5 +++++
public_html/docs/history                     |    4 +++-
public_html/lib-common.php                   |    6 ++++++
sql/updates/mssql_1.5.2_to_1.6.0.php         |    5 ++++-
sql/updates/mysql_1.5.2_to_1.6.0.php         |    5 ++++-

diffs (90 lines):

diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php	Sun Apr 19 19:56:11 2009 +0200
+++ b/public_html/admin/install/config-install.php	Sun Apr 19 21:45:18 2009 +0200
@@ -313,7 +313,8 @@
     $c->add('notification',array(),'%text',7,31,NULL,800,TRUE);
     $c->add('cron_schedule_interval',0,'text',7,31,NULL,860,TRUE);
     $c->add('disable_autolinks',0,'select',7,31,0,1750,TRUE);
-    $c->add('compressed_output',0,'select',7,31,1,1755,TRUE);
+    $c->add('clickable_links',1,'select',7,31,1,1753,TRUE);
+    $c->add('compressed_output',0,'select',7,31,1,1757,TRUE);
 
     $c->add('fs_debug', NULL, 'fieldset', 7, 32, NULL, 0, TRUE);
     $c->add('rootdebug',FALSE,'select',7,32,1,520,TRUE);
diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/docs/english/config.html
--- a/public_html/docs/english/config.html	Sun Apr 19 19:56:11 2009 +0200
+++ b/public_html/docs/english/config.html	Sun Apr 19 21:45:18 2009 +0200
@@ -1353,6 +1353,11 @@
   <td valign="top">If set to 1, disables the autolinks. I.e. links using the
     [story:] etc. syntax are not interpreted any more.</td></tr>
 <tr>
+  <td valign="top"><a name="desc_clickable_links">clickable_links</a></td>
+  <td valign="top">true</td>
+  <td valign="top">Whether or not URLs in plain-text posting should
+    automatically be turned into clickable links.</td></tr>
+<tr>
   <td valign="top"><a name="desc_compressed_output">disable_compressed_output</a></td>
   <td valign="top">false</td>
   <td valign="top">If enabled and supported by both the browser and the
diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/docs/history
--- a/public_html/docs/history	Sun Apr 19 19:56:11 2009 +0200
+++ b/public_html/docs/history	Sun Apr 19 21:45:18 2009 +0200
@@ -11,7 +11,9 @@
 + Comment moderation and editable comments, by Jared Wenerd
 
 Other changes:
-- Changed some default settings:
+- Added a config option to enable/disable automatically turning URLs in text
+  postings into clickable URLs [Dirk]
+- Changed some default settings [Dirk]:
   * Webservices are now disabled
   * Cronjob emulation is off
   * Default sort for topics is alphabetically
diff -r f0f43376dda6 -r c9bf3ef501e3 public_html/lib-common.php
--- a/public_html/lib-common.php	Sun Apr 19 19:56:11 2009 +0200
+++ b/public_html/lib-common.php	Sun Apr 19 21:45:18 2009 +0200
@@ -5742,6 +5742,12 @@
 */
 function COM_makeClickableLinks( $text )
 {
+    global $_CONF;
+
+    if (! $_CONF['clickable_links']) {
+        return $text;
+    }
+
     // These regular expressions will work for this purpuse, but
     // they should NOT be used for validating links.
 
diff -r f0f43376dda6 -r c9bf3ef501e3 sql/updates/mssql_1.5.2_to_1.6.0.php
--- a/sql/updates/mssql_1.5.2_to_1.6.0.php	Sun Apr 19 19:56:11 2009 +0200
+++ b/sql/updates/mssql_1.5.2_to_1.6.0.php	Sun Apr 19 21:45:18 2009 +0200
@@ -128,8 +128,11 @@
     // cookie to store name of anonymous commenters
     $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE);
 
+    // enable/disable clickable links
+    $c->add('clickable_links',1,'select',7,31,1,1753,TRUE);
+
     // experimental: compress output before sending it to the browser
-    $c->add('compressed_output',0,'select',7,31,1,1755,TRUE);
+    $c->add('compressed_output',0,'select',7,31,1,1757,TRUE);
 
     return true;
 }
diff -r f0f43376dda6 -r c9bf3ef501e3 sql/updates/mysql_1.5.2_to_1.6.0.php
--- a/sql/updates/mysql_1.5.2_to_1.6.0.php	Sun Apr 19 19:56:11 2009 +0200
+++ b/sql/updates/mysql_1.5.2_to_1.6.0.php	Sun Apr 19 21:45:18 2009 +0200
@@ -114,8 +114,11 @@
     // cookie to store name of anonymous commenters
     $c->add('cookie_anon_name','anon_name','text',7,30,NULL,577,TRUE);
 
+    // enable/disable clickable links
+    $c->add('clickable_links',1,'select',7,31,1,1753,TRUE);
+
     // experimental: compress output before sending it to the browser
-    $c->add('compressed_output',0,'select',7,31,1,1755,TRUE);
+    $c->add('compressed_output',0,'select',7,31,1,1757,TRUE);
 
     return true;
 }



More information about the geeklog-cvs mailing list