Display the number of links in the current category in the Category Editor. HEAD
authorDirk Haun <dirk@haun-online.de>
Sun Oct 04 21:47:24 2009 +0200 (4 months ago)
branchHEAD
changeset 736421144754222c
parent 73638b1e9b058fbd
child 736533a378b62bb0
Display the number of links in the current category in the Category Editor.
plugins/links/language/english.php
plugins/links/language/english_utf-8.php
plugins/links/templates/admin/categoryeditor.thtml
public_html/admin/plugins/links/category.php
public_html/docs/history
     1.1 --- a/plugins/links/language/english.php	Sun Oct 04 21:38:38 2009 +0200
     1.2 +++ b/plugins/links/language/english.php	Sun Oct 04 21:47:24 2009 +0200
     1.3 @@ -206,7 +206,8 @@
     1.4      57 => 'Not validated yet',
     1.5      58 => 'Validate now',
     1.6      59 => '<p>To validate all links displayed, please click on the "Validate now" link below. Please note that this might take some time depending on the amount of links displayed.</p>',
     1.7 -    60 => 'User %s tried illegally to edit category %s.'
     1.8 +    60 => 'User %s tried illegally to edit category %s.',
     1.9 +    61 => 'Links in Category'
    1.10  );
    1.11  
    1.12  $LANG_LINKS_STATUS = array(
     2.1 --- a/plugins/links/language/english_utf-8.php	Sun Oct 04 21:38:38 2009 +0200
     2.2 +++ b/plugins/links/language/english_utf-8.php	Sun Oct 04 21:47:24 2009 +0200
     2.3 @@ -206,7 +206,8 @@
     2.4      57 => 'Not validated yet',
     2.5      58 => 'Validate now',
     2.6      59 => '<p>To validate all links displayed, please click on the "Validate now" link below. Please note that this might take some time depending on the amount of links displayed.</p>',
     2.7 -    60 => 'User %s tried illegally to edit category %s.'
     2.8 +    60 => 'User %s tried illegally to edit category %s.',
     2.9 +    61 => 'Links in Category'
    2.10  );
    2.11  
    2.12  $LANG_LINKS_STATUS = array(
     3.1 --- a/plugins/links/templates/admin/categoryeditor.thtml	Sun Oct 04 21:38:38 2009 +0200
     3.2 +++ b/plugins/links/templates/admin/categoryeditor.thtml	Sun Oct 04 21:47:24 2009 +0200
     3.3 @@ -23,6 +23,10 @@
     3.4                  <td>{topic_selection}<td>
     3.5              </tr>
     3.6              <tr>
     3.7 +                <td align="right">{lang_num_links}:</td>
     3.8 +                <td>{num_links}<td>
     3.9 +            </tr>
    3.10 +            <tr>
    3.11                  <td colspan="2"><hr{xhtml}></td>
    3.12              </tr>
    3.13              <tr>
     4.1 --- a/public_html/admin/plugins/links/category.php	Sun Oct 04 21:38:38 2009 +0200
     4.2 +++ b/public_html/admin/plugins/links/category.php	Sun Oct 04 21:47:24 2009 +0200
     4.3 @@ -274,6 +274,16 @@
     4.4      $T->set_var('topic_selection', '<select name="tid">' . $alltopics
     4.5                                     . $topics . '</select>');
     4.6  
     4.7 +    if (empty($cid)) {
     4.8 +        $num_links = $LANG_ADMIN['na'];
     4.9 +    } else {
    4.10 +        $nresult = DB_query("SELECT COUNT(*) AS count FROM {$_TABLES['links']} WHERE cid='{$cid}'" . COM_getPermSQL('AND'));
    4.11 +        $N = DB_fetchArray($nresult);
    4.12 +        $num_links = $N['count'];
    4.13 +    }
    4.14 +    $T->set_var('lang_num_links', $LANG_LINKS_ADMIN[61]);
    4.15 +    $T->set_var('num_links', COM_numberFormat($num_links));
    4.16 +
    4.17      // user access info
    4.18      $T->set_var('lang_accessrights', $LANG_ACCESS['accessrights']);
    4.19      $T->set_var('lang_owner', $LANG_ACCESS['owner']);
     5.1 --- a/public_html/docs/history	Sun Oct 04 21:38:38 2009 +0200
     5.2 +++ b/public_html/docs/history	Sun Oct 04 21:47:24 2009 +0200
     5.3 @@ -88,6 +88,8 @@
     5.4  
     5.5  Links Plugin
     5.6  ------------
     5.7 +- Display the number of links in the current category in the Category Editor.
     5.8 +  Note: Does not (yet) count links in sub-categories [Dirk]
     5.9  - Link titles in autotags showed up with backslashes before quotes (bug
    5.10    #0000986) [Dirk]
    5.11