[geeklog-cvs] geeklog: Hide meta tag entry fields from Polls editor when meta ...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Tue Dec 1 03:51:02 EST 2009


changeset 7508:930d9df2ff7e
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/930d9df2ff7e
user: Dirk Haun <dirk at haun-online.de>
date: Mon Nov 30 11:37:02 2009 +0100
description:
Hide meta tag entry fields from Polls editor when meta tag support is disabled

diffstat:

 plugins/polls/templates/admin/polleditor.thtml |  4 ++--
 public_html/admin/plugins/polls/index.php      |  9 +++++++--
 public_html/docs/history                       |  5 +++++
 3 files changed, 14 insertions(+), 4 deletions(-)

diffs (58 lines):

diff -r c0b0eb21591d -r 930d9df2ff7e plugins/polls/templates/admin/polleditor.thtml
--- a/plugins/polls/templates/admin/polleditor.thtml	Mon Nov 30 11:03:31 2009 +0100
+++ b/plugins/polls/templates/admin/polleditor.thtml	Mon Nov 30 11:37:02 2009 +0100
@@ -10,11 +10,11 @@
                                             <td align="right" valign="top">{lang_topic}:</td>
                                             <td><input type="text" name="topic" value="{poll_topic}" size="50" maxlength="255"{xhtml}><br{xhtml}>{poll_topic_info}</td>
                                         </tr>
-                                        <tr>
+                                        <tr{hide_meta}>
                                             <td valign="top" align="right">{lang_metadescription}:</td>
                                         <td><textarea name="meta_description" style="width:100%" rows="2">{meta_description}</textarea></td>
                                         </tr>
-                                        <tr>
+                                        <tr{hide_meta}>
                                             <td valign="top" align="right">{lang_metakeywords}:</td>
                                             <td><textarea name="meta_keywords" style="width:100%" rows="2">{meta_keywords}</textarea></td>
                                         </tr>                                          
diff -r c0b0eb21591d -r 930d9df2ff7e public_html/admin/plugins/polls/index.php
--- a/public_html/admin/plugins/polls/index.php	Mon Nov 30 11:03:31 2009 +0100
+++ b/public_html/admin/plugins/polls/index.php	Mon Nov 30 11:37:02 2009 +0100
@@ -430,7 +430,8 @@
     $poll_templates->set_var('poll_topic', htmlspecialchars ($T['topic']));
     $poll_templates->set_var('lang_mode', $LANG25[1]);
     
-    $poll_templates->set_var('lang_metadescription', $LANG_ADMIN['meta_description']);
+    $poll_templates->set_var('lang_metadescription',
+                             $LANG_ADMIN['meta_description']);
     $poll_templates->set_var('lang_metakeywords', $LANG_ADMIN['meta_keywords']);
     if (!empty($T['meta_description'])) {
         $poll_templates->set_var('meta_description', $T['meta_description']);
@@ -438,7 +439,11 @@
     if (!empty($T['meta_keywords'])) {
         $poll_templates->set_var('meta_keywords', $T['meta_keywords']);        
     }
-    
+    if (($_CONF['meta_tags'] > 0) && ($_PO_CONF['meta_tags'] > 0)) {
+        $poll_templates->set_var('hide_meta', '');
+    } else {
+        $poll_templates->set_var('hide_meta', ' style="display:none;"');
+    }
 
     $poll_templates->set_var('status_options', COM_optionList ($_TABLES['statuscodes'], 'code,name', $T['statuscode']));
     $poll_templates->set_var('comment_options', COM_optionList($_TABLES['commentcodes'],'code,name',$T['commentcode']));
diff -r c0b0eb21591d -r 930d9df2ff7e public_html/docs/history
--- a/public_html/docs/history	Mon Nov 30 11:03:31 2009 +0100
+++ b/public_html/docs/history	Mon Nov 30 11:37:02 2009 +0100
@@ -12,6 +12,11 @@
   renamed our JavaScript remove() function to gl_cfg_remove() but forgot to
   update the dynamically created function calls (cf. bug #0000681) [Dirk]
 
+Polls Plugin
+------------
+- Hide meta tag entry fields from Polls editor when meta tag support is
+  disabled [Dirk]
+
 Static Pages Plugin 1.6.2
 -------------------
 - Hide meta tag entry fields from Static Page editor when meta tag support is



More information about the geeklog-cvs mailing list