[geeklog-cvs] geeklog: Add Configuration options to enable or disable Breadcru...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Jan 16 13:47:44 EST 2012


changeset 8475:4ed498b1e208
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/4ed498b1e208
user: Tom <websitemaster at cogeco.net>
date: Mon Jan 16 13:28:56 2012 -0500
description:
Add Configuration options to enable or disable Breadcrumbs (Topics, Articles, Plugins).

diffstat:

 language/english.php                         |   9 +++++++--
 language/english_utf-8.php                   |   9 +++++++--
 public_html/admin/install/config-install.php |   6 ++++++
 public_html/admin/install/lib-upgrade.php    |   2 ++
 public_html/docs/english/config.html         |  19 +++++++++++++++++++
 sql/updates/mssql_1.8.1_to_1.9.0.php         |  25 +++++++++++++++++++++++++
 sql/updates/mysql_1.8.1_to_1.9.0.php         |  24 ++++++++++++++++++++++++
 sql/updates/pgsql_1.8.1_to_1.9.0.php         |  24 ++++++++++++++++++++++++
 system/lib-topic.php                         |   5 +++++
 9 files changed, 119 insertions(+), 4 deletions(-)

diffs (235 lines):

diff -r 09dd0a29311e -r 4ed498b1e208 language/english.php
--- a/language/english.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/language/english.php	Mon Jan 16 13:28:56 2012 -0500
@@ -1999,7 +1999,10 @@
     'search_def_keytype' => "Default Search Method",
     'search_def_sort' => "Default Sort Order", 
     'autotag_permissions_story' => '[story: ] Permissions', 
-    'autotag_permissions_user' => '[user: ] Permissions'   
+    'autotag_permissions_user' => '[user: ] Permissions', 
+    'disable_breadcrumbs_topics' => "Disable Topic Breadcrumbs",
+    'disable_breadcrumbs_articles' => "Disable Article Breadcrumbs",
+    'disable_breadcrumbs_plugins' => "Disable Plugins Breadcrumbs"
 );
 
 $LANG_configsubgroups['Core'] = array(
@@ -2055,7 +2058,8 @@
     'fs_perm_topic' => 'Topic Default Permission',
     'fs_perm_block' => 'Block Default Permission',
     'fs_webservices' => 'Webservices',
-    'fs_autotag_permissions' => 'Autotag Usage Permissions'
+    'fs_autotag_permissions' => 'Autotag Usage Permissions', 
+    'fs_breadcrumbs' => 'Breadcrumbs'
 );
     
 $LANG_tab['Core'] = array(
@@ -2098,6 +2102,7 @@
     'tab_iplookup' => 'IP Lookup',
     'tab_permissions' => 'Permissions',
     'tab_webservices' => 'Webservices',
+    'tab_topics' => 'Topics'
 );
 
 $LANG_configselects['Core'] = array(
diff -r 09dd0a29311e -r 4ed498b1e208 language/english_utf-8.php
--- a/language/english_utf-8.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/language/english_utf-8.php	Mon Jan 16 13:28:56 2012 -0500
@@ -1999,7 +1999,10 @@
     'search_def_keytype' => "Default Search Method",
     'search_def_sort' => "Default Sort Order", 
     'autotag_permissions_story' => '[story: ] Permissions', 
-    'autotag_permissions_user' => '[user: ] Permissions'   
+    'autotag_permissions_user' => '[user: ] Permissions',
+    'disable_breadcrumbs_topics' => "Disable Topic Breadcrumbs",
+    'disable_breadcrumbs_articles' => "Disable Article Breadcrumbs",
+    'disable_breadcrumbs_plugins' => "Disable Plugins Breadcrumbs"
 );
 
 $LANG_configsubgroups['Core'] = array(
@@ -2055,7 +2058,8 @@
     'fs_perm_topic' => 'Topic Default Permission',
     'fs_perm_block' => 'Block Default Permission',
     'fs_webservices' => 'Webservices',
-    'fs_autotag_permissions' => 'Autotag Usage Permissions'
+    'fs_autotag_permissions' => 'Autotag Usage Permissions', 
+    'fs_breadcrumbs' => 'Breadcrumbs'
 );
     
 $LANG_tab['Core'] = array(
@@ -2098,6 +2102,7 @@
     'tab_iplookup' => 'IP Lookup',
     'tab_permissions' => 'Permissions',
     'tab_webservices' => 'Webservices',
+    'tab_topics' => 'Topics'
 );
 
 $LANG_configselects['Core'] = array(
diff -r 09dd0a29311e -r 4ed498b1e208 public_html/admin/install/config-install.php
--- a/public_html/admin/install/config-install.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/public_html/admin/install/config-install.php	Mon Jan 16 13:28:56 2012 -0500
@@ -413,6 +413,12 @@
     $c->add('restrict_webservices',  0, 'select', 7, 40, 0, 1850, TRUE, $me, 40);
     $c->add('atom_max_stories',     10, 'text',   7, 40, 0, 1860, TRUE, $me, 40);
     
+    $c->add('tab_topics', NULL, 'tab', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('fs_breadcrumbs', NULL, 'fieldset', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_topics', 0, 'select', 7, 45, 0, 2000, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_articles', 0, 'select', 7, 45, 0, 2010, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_plugins', 0, 'select', 7, 45, 0, 2020, TRUE, $me, 45);
+    
 }
 
 ?>
diff -r 09dd0a29311e -r 4ed498b1e208 public_html/admin/install/lib-upgrade.php
--- a/public_html/admin/install/lib-upgrade.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/public_html/admin/install/lib-upgrade.php	Mon Jan 16 13:28:56 2012 -0500
@@ -484,6 +484,8 @@
             require_once $_CONF['path'] . 'sql/updates/' . $_DB_dbms . '_1.8.1_to_1.9.0.php';
             INST_updateDB($_SQL);
             
+            update_ConfValuesFor190();
+            
             update_BlockTopicAssignmentsFor190();
             
             update_StoryTopicAssignmentsFor190();
diff -r 09dd0a29311e -r 4ed498b1e208 public_html/docs/english/config.html
--- a/public_html/docs/english/config.html	Thu Jan 12 14:19:57 2012 -0500
+++ b/public_html/docs/english/config.html	Mon Jan 16 13:28:56 2012 -0500
@@ -1620,6 +1620,25 @@
 
 <p>Also see <a href="http://wiki.geeklog.net/wiki/index.php/Using_the_Webservices">Using the Webservices</a> in the Geeklog Wiki.</p>
 
+<h3><a name="misc_ip_webservices">Miscellaneous: Topics</a></h3>
+
+<table border="1" width="100%">
+<tr><th style="width:8%">Variable</th>
+    <th style="width:29%">Default Value</th>
+    <th style="width:63%">Description</th></tr>
+<tr>
+  <td valign="top"><a name="desc_disable_breadcrumbs_topics">disable_breadcrumbs_topics</a></td>
+  <td valign="top">false</td>
+  <td valign="top">Set this to <code>true</code> to disable topic breadcrumbs.</td></tr>
+<tr>
+  <td valign="top"><a name="desc_disable_breadcrumbs_articles">disable_breadcrumbs_articles</a></td>
+  <td valign="top">false</td>
+  <td valign="top">Set this to <code>true</code> to disable article breadcrumbs.</td></tr>
+<tr>
+  <td valign="top"><a name="desc_disable_breadcrumbs_plugins">disable_breadcrumbs_plugins</a></td>
+  <td valign="top">false</td>
+  <td valign="top">Set this to <code>true</code> to disable all breadcrumbs that are displayed by plugins.</td></tr>
+</table>
 
 <h2><a name="db-config.php">db-config.php</a></h2>
 
diff -r 09dd0a29311e -r 4ed498b1e208 sql/updates/mssql_1.8.1_to_1.9.0.php
--- a/sql/updates/mssql_1.8.1_to_1.9.0.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/sql/updates/mssql_1.8.1_to_1.9.0.php	Mon Jan 16 13:28:56 2012 -0500
@@ -76,4 +76,29 @@
     
 }
 
+
+/**
+ * Add new config options
+ *
+ */
+function update_ConfValuesFor190()
+{
+    global $_CONF, $_TABLES;
+
+    require_once $_CONF['path_system'] . 'classes/config.class.php';
+
+    $c = config::get_instance();
+
+    $me = 'Core';
+    
+    // Breadcrumbs
+    $c->add('tab_topics', NULL, 'tab', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('fs_breadcrumbs', NULL, 'fieldset', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_topics', 0, 'select', 7, 45, 0, 2000, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_articles', 0, 'select', 7, 45, 0, 2010, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_plugins', 0, 'select', 7, 45, 0, 2020, TRUE, $me, 45);    
+    
+    return true;
+}
+
 ?>
diff -r 09dd0a29311e -r 4ed498b1e208 sql/updates/mysql_1.8.1_to_1.9.0.php
--- a/sql/updates/mysql_1.8.1_to_1.9.0.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/sql/updates/mysql_1.8.1_to_1.9.0.php	Mon Jan 16 13:28:56 2012 -0500
@@ -75,4 +75,28 @@
     
 }
 
+/**
+ * Add new config options
+ *
+ */
+function update_ConfValuesFor190()
+{
+    global $_CONF, $_TABLES;
+
+    require_once $_CONF['path_system'] . 'classes/config.class.php';
+
+    $c = config::get_instance();
+
+    $me = 'Core';
+    
+    // Breadcrumbs
+    $c->add('tab_topics', NULL, 'tab', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('fs_breadcrumbs', NULL, 'fieldset', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_topics', 0, 'select', 7, 45, 0, 2000, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_articles', 0, 'select', 7, 45, 0, 2010, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_plugins', 0, 'select', 7, 45, 0, 2020, TRUE, $me, 45);    
+    
+    return true;
+}
+
 ?>
diff -r 09dd0a29311e -r 4ed498b1e208 sql/updates/pgsql_1.8.1_to_1.9.0.php
--- a/sql/updates/pgsql_1.8.1_to_1.9.0.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/sql/updates/pgsql_1.8.1_to_1.9.0.php	Mon Jan 16 13:28:56 2012 -0500
@@ -77,4 +77,28 @@
     
 }
 
+/**
+ * Add new config options
+ *
+ */
+function update_ConfValuesFor190()
+{
+    global $_CONF, $_TABLES;
+
+    require_once $_CONF['path_system'] . 'classes/config.class.php';
+
+    $c = config::get_instance();
+
+    $me = 'Core';
+    
+    // Breadcrumbs
+    $c->add('tab_topics', NULL, 'tab', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('fs_breadcrumbs', NULL, 'fieldset', 7, 45, NULL, 0, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_topics', 0, 'select', 7, 45, 0, 2000, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_articles', 0, 'select', 7, 45, 0, 2010, TRUE, $me, 45);
+    $c->add('disable_breadcrumbs_plugins', 0, 'select', 7, 45, 0, 2020, TRUE, $me, 45);    
+    
+    return true;
+}
+
 ?>
diff -r 09dd0a29311e -r 4ed498b1e208 system/lib-topic.php
--- a/system/lib-topic.php	Thu Jan 12 14:19:57 2012 -0500
+++ b/system/lib-topic.php	Mon Jan 16 13:28:56 2012 -0500
@@ -1272,6 +1272,11 @@
     
     $breadcrumbs_output = '';
     
+    // see if breadcrumbs is disabled
+    if (($_CONF['disable_breadcrumbs_topics'] && $type == 'topic') || ($_CONF['disable_breadcrumbs_articles'] && $type == 'article') || ($_CONF['disable_breadcrumbs_plugins'] && $type != 'topic' && $type != 'article') ) {
+        return $breadcrumbs_output;
+    }
+    
     $breadcrumb_t = COM_newTemplate($_CONF['path_layout'] . 'breadcrumbs/');
     $breadcrumb_t->set_file (array ('breadcrumbs_t' => 'breadcrumbs.thtml',
                                     'breadcrumb_child_t' => 'breadcrumb_child.thtml',



More information about the geeklog-cvs mailing list