developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #1063: meta_ticket_1063.diff

File meta_ticket_1063.diff, 4.0 KB (added by foxmask, 11 years ago)

le meme avec modif du CREDITS

  • lib/jelix/CREDITS

    diff -r 9ade6f00e052 lib/jelix/CREDITS
    a b  
    1717 - improvements in jInstallChecker.class.php (#1022)
    1818 - tpl plugin hook (#1019)
    1919 - tpl plugin gravatar (#993)
     20 - meta supplementaires (author,generator) (#1063)
    2021
    2122Mickaël Fradin (aka mike/kewix)
    2223 - improvements in the jtpl plugin: formcontrols (#223)
  • lib/jelix/core/response/jResponseHtml.class.php

    diff -r 9ade6f00e052 lib/jelix/core/response/jResponseHtml.class.php
    a b  
    44* @subpackage  core_response
    55* @author      Laurent Jouanneau
    66* @contributor Yann (description and keywords), Dominique Papin
    7 * @contributor Warren Seine, Alexis Métaireau, Julien Issler
     7* @contributor Warren Seine, Alexis Métaireau, Julien Issler, Olivier Demah (author,generator)
    88* @copyright   2005-2009 Laurent Jouanneau, 2006 Yann, 2007 Dominique Papin
    99* @copyright   2008 Warren Seine, Alexis Métaireau
    1010* @copyright   2009 Julien Issler, Olivier Demah
     
    104104    protected $_Others  = array ();
    105105    protected $_MetaKeywords = array();
    106106    protected $_MetaDescription = array();
     107        protected $_MetaAuthor;
     108        protected $_MetaGenerator;
    107109    protected $_Link = array();
    108110    /**#@-*/
    109111
     
    399401    final public function addMetaDescription ($content){
    400402        $this->_MetaDescription[] = $content;
    401403    }
    402 
     404    /**
     405     * add author(s) in a author meta tag
     406     * @author olivier demahol
     407     * @param string $content author(s)
     408     * @since 1.1
     409     */
     410        final public function addMetaAuthor($content){
     411                $this->_MetaAuthor = $content;
     412        }
     413    /**
     414     * add generator a generator meta tag
     415     * @author olivier demahol
     416     * @param string $content generator
     417     * @since 1.1
     418     */         
     419        final public function addMetaGenerator($content){
     420                $this->_MetaGenerator = $content;
     421        }
    403422    /**
    404423     * generate the doctype. You can override it if you want to have your own doctype, like XHTML+MATHML.
    405424     * @since 1.1
     
    438457            $keywords = implode(',',$this->_MetaKeywords);
    439458            echo '<meta name="keywords" content="'.htmlspecialchars($keywords).'" '.$this->_endTag;
    440459        }
    441 
     460                if(!empty($this->_MetaGenerator)){
     461                        echo '<meta name="generator" content="'.htmlspecialchars($this->_MetaGenerator).'" '.$this->_endTag;
     462                }
     463                if(!empty($this->_MetaAuthor)){
     464                        echo '<meta name="author" content="'.htmlspecialchars($this->_MetaAuthor).'" '.$this->_endTag;
     465                }
    442466        // css link
    443467        foreach ($this->_CSSLink as $src=>$params){
    444468            //the extra params we may found in there.
  • lib/jelix/plugins/tpl/html/meta.html.php

    diff -r 9ade6f00e052 lib/jelix/plugins/tpl/html/meta.html.php
    a b  
    33* @package      jelix
    44* @subpackage   jtpl_plugin
    55* @author       Jouanneau Laurent
    6 * @contributor  Yann (description and keywords), Dominique Papin (ie7 support), Mickaël Fradin (style), Loic Mathaud (title)
    7 * @copyright    2005-2006 Jouanneau laurent, 2007 Dominique Papin, 2008 Mickaël Fradin, 2009 Loic Mathaud
     6* @contributor  Yann (description and keywords), Dominique Papin (ie7 support), Mickaël Fradin (style), Loic Mathaud (title), Olivier Demah (auhor,generator)
     7* @copyright    2005-2006 Jouanneau laurent, 2007 Dominique Papin, 2008 Mickaël Fradin, 2009 Loic Mathaud, 2010 Olivier Demah
    88* @link         http://www.jelix.org
    99* @licence      GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
    1010*/
     
    8585        case 'others':
    8686            $gJCoord->response->addHeadContent($param);
    8787            break;
     88                case 'author':
     89                        $gJCoord->response->addMetaAuthor($param);
     90                        break;
     91                case 'generator':
     92                        $gJCoord->response->addMetaGenerator($param);
     93                        break;                 
    8894    }
    8995}
    9096