Changeset 8314


Ignore:
Timestamp:
Dec 27, 2010, 5:13:53 PM (13 years ago)
Author:
patdenice
Message:

Add [redirect] tag.
Move history to changelog.txt.

Location:
extensions/ExtendedDescription
Files:
1 added
1 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • extensions/ExtendedDescription/language/cs_CZ/help.html

    r7936 r8314  
    8484- fotografie potom nebude viditelná mezi náhledy<br>
    8585- ale zůstane viditelná při prohlížení kategorie</p>
     86
     87<!-- TODO -->
     88<h3>Redirected category</h3>
     89
     90<ul>
     91  <li><b>[redirect http://piwigo.org]</b></li>
     92</ul>
     93<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     94
     95<ul>
     96  <li><b>[redirect img=xx]</b></li>
     97</ul>
     98<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     99
     100<ul>
     101  <li><b>[redirect cat=xx]</b></li>
     102</ul>
     103<p>Redirect to a category of your gallery where xx the category identifier.</p>
     104
     105<ul>
     106  <li><b>[redirect search=xx]</b></li>
     107</ul>
     108<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/cs_CZ/plugin.lang.php

    r7936 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Používat elementy rozšířeného popisu......';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/de_DE/help.html

    r7020 r8314  
    8181- diese wird nicht mehr auf der Vignettenseite angezeigt<br>
    8282- bleibt weiterhin ersichtlich in der Kategorie</p>
     83
     84<!-- TODO -->
     85<h3>Redirected category</h3>
     86
     87<ul>
     88  <li><b>[redirect http://piwigo.org]</b></li>
     89</ul>
     90<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     91
     92<ul>
     93  <li><b>[redirect img=xx]</b></li>
     94</ul>
     95<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     96
     97<ul>
     98  <li><b>[redirect cat=xx]</b></li>
     99</ul>
     100<p>Redirect to a category of your gallery where xx the category identifier.</p>
     101
     102<ul>
     103  <li><b>[redirect search=xx]</b></li>
     104</ul>
     105<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/de_DE/plugin.lang.php

    r4847 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Benützen der HTML-Tags Extended Description...';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/en_UK/help.html

    r7015 r8314  
    8585- it won't be displayed on the thumbnails page<br>
    8686- it remains visible inside the category</p>
     87
     88<h3>Redirected category</h3>
     89
     90<ul>
     91  <li><b>[redirect http://piwigo.org]</b></li>
     92</ul>
     93<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     94
     95<ul>
     96  <li><b>[redirect img=xx]</b></li>
     97</ul>
     98<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     99
     100<ul>
     101  <li><b>[redirect cat=xx]</b></li>
     102</ul>
     103<p>Redirect to a category of your gallery where xx the category identifier.</p>
     104
     105<ul>
     106  <li><b>[redirect search=xx]</b></li>
     107</ul>
     108<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/en_UK/plugin.lang.php

    r3609 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Use Extended Description tags...';
     4$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/es_ES/help.html

    r7021 r8314  
    9191- Ésta no será fijada más sobre la página de las viñetas<br>
    9292- Queda sin embargo visible en el seno de la categoría</p>
     93
     94<!-- TODO -->
     95<h3>Redirected category</h3>
     96
     97<ul>
     98  <li><b>[redirect http://piwigo.org]</b></li>
     99</ul>
     100<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     101
     102<ul>
     103  <li><b>[redirect img=xx]</b></li>
     104</ul>
     105<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     106
     107<ul>
     108  <li><b>[redirect cat=xx]</b></li>
     109</ul>
     110<p>Redirect to a category of your gallery where xx the category identifier.</p>
     111
     112<ul>
     113  <li><b>[redirect search=xx]</b></li>
     114</ul>
     115<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/es_ES/plugin.lang.php

    r3609 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Utilizar las balizas de...';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/fr_FR/help.html

    r7015 r8314  
    9191- celle-ci ne sera plus affichée sur la page des vignettes<br>
    9292- elle reste néanmoins visible au sein de la catégorie</p>
     93
     94<h3>Catégorie redirigée</h3>
     95
     96<ul>
     97  <li><b>[redirect http://piwigo.org]</b></li>
     98</ul>
     99<p>Insérez cette balise dans la description d'une catégorie afin de la rediriger vers l'URL de votre choix.</p>
     100
     101<ul>
     102  <li><b>[redirect img=xx]</b></li>
     103</ul>
     104<p>Redirige vers une image de votre galerie où xx est l'identifiant de l'image; vous pouvez également préciser l'identifiant de la catégorie après le numéro de l'image: <code>xx.ccc</code>.</p>
     105
     106<ul>
     107  <li><b>[redirect cat=xx]</b></li>
     108</ul>
     109<p>Redirige vers une catégorie de votre galerie où xx est l'identifiant de la catégorie.</p>
     110
     111<ul>
     112  <li><b>[redirect search=xx]</b></li>
     113</ul>
     114<p>Redirige vers une page de recherche de votre galerie où xx est l'identifiant de la page de recherche.</p>
  • extensions/ExtendedDescription/language/fr_FR/plugin.lang.php

    r3609 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Utiliser les balises d\'Extended Description...';
     4$lang['This category is redirected to %s'] = 'Cette catégorie est redirigée vers %s';
    45
    56?>
  • extensions/ExtendedDescription/language/hu_HU/help.html

    r7393 r8314  
    8585- nem fog megjelenni a bélyegkép oldalon<br>
    8686- továbbra is megjelenik a kategóriában</p>
     87
     88<!-- TODO -->
     89<h3>Redirected category</h3>
     90
     91<ul>
     92  <li><b>[redirect http://piwigo.org]</b></li>
     93</ul>
     94<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     95
     96<ul>
     97  <li><b>[redirect img=xx]</b></li>
     98</ul>
     99<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     100
     101<ul>
     102  <li><b>[redirect cat=xx]</b></li>
     103</ul>
     104<p>Redirect to a category of your gallery where xx the category identifier.</p>
     105
     106<ul>
     107  <li><b>[redirect search=xx]</b></li>
     108</ul>
     109<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/hu_HU/plugin.lang.php

    r7393 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Bővített leírás címkék használatával...';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/it_IT/help.html

    r7688 r8314  
    9191- L'immagine non viene più visualizzata sulla pagina delle miniature<br>
    9292- L'immagine rimane visibile nella categoria</p>
     93
     94<!-- TODO -->
     95<h3>Redirected category</h3>
     96
     97<ul>
     98  <li><b>[redirect http://piwigo.org]</b></li>
     99</ul>
     100<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     101
     102<ul>
     103  <li><b>[redirect img=xx]</b></li>
     104</ul>
     105<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     106
     107<ul>
     108  <li><b>[redirect cat=xx]</b></li>
     109</ul>
     110<p>Redirect to a category of your gallery where xx the category identifier.</p>
     111
     112<ul>
     113  <li><b>[redirect search=xx]</b></li>
     114</ul>
     115<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/it_IT/plugin.lang.php

    r7688 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Usare i tag di Extended Description ...';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/lv_LV/help.html

    r7419 r8314  
    8383- netiks rādīta sīkbilžu lapā<br>
    8484- paliks redzama iekšpus kategorijas</p>
     85
     86<!-- TODO -->
     87<h3>Redirected category</h3>
     88
     89<ul>
     90  <li><b>[redirect http://piwigo.org]</b></li>
     91</ul>
     92<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     93
     94<ul>
     95  <li><b>[redirect img=xx]</b></li>
     96</ul>
     97<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     98
     99<ul>
     100  <li><b>[redirect cat=xx]</b></li>
     101</ul>
     102<p>Redirect to a category of your gallery where xx the category identifier.</p>
     103
     104<ul>
     105  <li><b>[redirect search=xx]</b></li>
     106</ul>
     107<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/lv_LV/plugin.lang.php

    r7419 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Lietot Paplašinātā Apraksta iezīmes...';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/sk_SK/help.html

    r7137 r8314  
    8585- nebude zobrazené na stránke náhľadov<br>
    8686- zostane viditeľné vo vnútri kategórie</p>
     87
     88<!-- TODO -->
     89<h3>Redirected category</h3>
     90
     91<ul>
     92  <li><b>[redirect http://piwigo.org]</b></li>
     93</ul>
     94<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     95
     96<ul>
     97  <li><b>[redirect img=xx]</b></li>
     98</ul>
     99<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     100
     101<ul>
     102  <li><b>[redirect cat=xx]</b></li>
     103</ul>
     104<p>Redirect to a category of your gallery where xx the category identifier.</p>
     105
     106<ul>
     107  <li><b>[redirect search=xx]</b></li>
     108</ul>
     109<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/sk_SK/plugin.lang.php

    r7137 r8314  
    22
    33$lang['ExtendedDesc_help'] = 'Použiť rozšírený popis kľúčových slov...';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/language/zh_CN/help.html

    r7174 r8314  
    8282<br>
    8383- 它将不会在缩略图页面中显示<br>
    84 - 但它仍可在分类页面里看见</p>
     84- 但它仍可在分类页面里看见</p>
     85
     86<!-- TODO -->
     87<h3>Redirected category</h3>
     88
     89<ul>
     90  <li><b>[redirect http://piwigo.org]</b></li>
     91</ul>
     92<p>Insert this tag into a category description to redirect it to the URL of your choice.</p>
     93
     94<ul>
     95  <li><b>[redirect img=xx]</b></li>
     96</ul>
     97<p>Redirect to an image of your gallery where xx is the photo identifier; you can add the category identifier next to the photo identifier: <code>xx.ccc</code>.</p>
     98
     99<ul>
     100  <li><b>[redirect cat=xx]</b></li>
     101</ul>
     102<p>Redirect to a category of your gallery where xx the category identifier.</p>
     103
     104<ul>
     105  <li><b>[redirect search=xx]</b></li>
     106</ul>
     107<p>Redirect to a search page of your gallery where xx is the search identifier.</p>
  • extensions/ExtendedDescription/language/zh_CN/plugin.lang.php

    r7174 r8314  
    22
    33$lang['ExtendedDesc_help'] = '使用扩展描述标签...';
     4/*TODO*/$lang['This category is redirected to %s'] = 'This category is redirected to %s';
    45
    56?>
  • extensions/ExtendedDescription/main.inc.php

    r7015 r8314  
    22/*
    33Plugin Name: Extended Description
    4 Version: 2.0.g
     4Version: 2.1.e
    55Description: Add multilinguale descriptions, banner, NMB, category name, etc...
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=175
    77Author: P@t & Grum
    8 
    9 --------------------------------------------------------------------------------
    10  history
    11 
    12 | date       | release |
    13 |            | 2.0.c   | P@t
    14 | 2009-04-01 | 2.0.d   | Grum
    15 |            |         | * bug corrected, markup <!--hidden--> now works again
    16 |            |         |   on categories name
    17 |            |         | * new functionality, can use a markup <!--hidden-->
    18 |            |         |   on image's name
    19 |            |         | * new functionality, add a new parameter for the image
    20 |            |         |   markup [img=] ; possibility to show the image name
    21 |            |         |   with the "name" parameter
    22 |            |         | * new functionality, the image markup [img=] allows now
    23 |            |         |   to display more than one image
    24 | 2009-04-30 | 2.0.e   | P@t
    25 |            |         | * bug corrected, avoid errors on categories pages when
    26 |            |         |   $conf['show_thumbnail_caption'] = false
    27 | 2009-05-10 | 2.0.f   | P@t
    28 |            |         | * add possibility to remove a category from menubar
    29 |            |         |   with markup <!--mb-hidden-->
    30 | 2010-25-09 | 2.0.g   | Grum
    31 |            |         | * possibility to display the picture's name into the
    32 |            |         |   image title ('titleName' parameter) rather than under
    33 |            |         |    the picture ('name' parameter)
    34 |            |         | * add Id for image & anchor for [img=...] markup
    35 |            |         |
    36 |            |         |
    37 |            |         |
    38 
    398*/
    409
     
    9362function get_extended_desc($desc, $param='')
    9463{
    95   global $conf;
     64  global $conf, $page;
     65
     66  if (isset($page['category']) and !isset($page['image_id']) and preg_match('#\[redirect (.*?)\]#i', $desc, $m1))
     67  {
     68    if (preg_match('#^(img|cat|search)=(\d*)\.?(\d*|)$#i', $m1[1], $m2))
     69    {
     70      $url  = get_absolute_root_url();
     71      switch ($m2[1])
     72      {
     73        case 'img':
     74        $url_params = array('image_id' => $m2[2]);
     75        if (!empty($m2[3]))
     76        {
     77          $url_params['category'] = array('id' => $m2[3], 'name' => '', 'permalink' => '');
     78        }
     79        $url .= make_picture_url($url_params);
     80        break;
     81
     82        case 'cat':
     83        $url_params = array('category' => array('id' => $m2[2], 'name' => '', 'permalink' => ''));
     84        $url .= make_index_url($url_params);
     85        break;
     86
     87        case 'search':
     88        $url .= make_index_url(array('section' => 'search', 'search' => $m2[2]));
     89      }
     90    }
     91    else
     92    {
     93      $url = $m1[1];
     94    }
     95    if (is_admin())
     96    {
     97      global $header_notes;
     98      $header_notes[] = sprintf(l10n('This category is redirected to %s'), '<a href="'.$url.'">'.$url.'</a>');
     99    }
     100    else
     101    {
     102      redirect($url);
     103    }
     104  }
    96105
    97106  $desc = get_user_language_desc($desc);
     107
     108  // Remove redirect tags for subcatify_category_description
     109  $patterns[] = '#\[redirect .*?\]#i';
     110  $replacements[] = '';
    98111
    99112  // Balises [cat=xx]
Note: See TracChangeset for help on using the changeset viewer.