phpDocumentor lodel
[ class tree: lodel ] [ index: lodel ] [ all elements ]

Procedural File: textfunc.php

Source Location: /lodel/scripts/textfunc.php

Page Details

Fichier utilitaire proposant des fonctions sur les textes dans Lodel

PHP versions 4 et 5

LODEL - Logiciel d'Edition ELectronique.

Copyright (c) 2001-2002, Ghislain Picard, Marin Dacos Copyright (c) 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot Copyright (c) 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou Copyright (c) 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou Copyright (c) 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse

Home page: http://www.lodel.org

E-Mail: lodel@lodel.org

All Rights Reserved

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Author:  Jean Lamy
Author:  Ghislain Picard
Version:  CVS:$Id:
Copyright:  2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
Copyright:  2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
Includes
require_once ("textfunc_local.php") [line 45]

Fichier utilitaire proposant des fonctions sur les textes dans Lodel

PHP versions 4 et 5

LODEL - Logiciel d'Edition ELectronique.

Copyright (c) 2001-2002, Ghislain Picard, Marin Dacos Copyright (c) 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot Copyright (c) 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou Copyright (c) 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou Copyright (c) 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse

Home page: http://www.lodel.org

E-Mail: lodel@lodel.org

All Rights Reserved

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

Information Tags:
Author:  Jean Lamy
Author:  Ghislain Picard
Version:  CVS:$Id:
Copyright:  2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse
Copyright:  2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou
[ Top ]


Functions
couper  [line 86]

void couper( $texte, $long  )
Parameters:
   $texte: 
   $long: 

API Tags:
Deprecated:  Ne plus utiliser en 0.8


[ Top ]
couperpara  [line 140]

void couperpara( $texte, $long  )
Parameters:
   $texte: 
   $long: 


[ Top ]
cuttext  [line 94]

void cuttext( $text, $length  )

Cut text keeping whole words

Parameters:
   $text: 
   $length: 


[ Top ]
cut_without_tags  [line 119]

void cut_without_tags( $text, $length  )
Parameters:
   $text: 
   $length: 


[ Top ]
defaultvalue  [line 765]

void defaultvalue( $var1, $var2  )

Return the value in parameter if the variable si empty/null

Parameters:
   $var1: 
   $var2: 


[ Top ]
eq  [line 491]

void eq( $str, $texte  )
Parameters:
   $str: 
   $texte: 


[ Top ]
falsefunction  [line 399]

void falsefunction( $text, $text2  )

Return the second argument if the first is false

Parameters:
   $text: 
   $text2: 


[ Top ]
format  [line 556]

void format( $text, [ $creationmethod = ""], [ $creationinfo = ""]  )

function to format the text given the creationmethod field

Parameters:
   $text: 
   $creationmethod: 
   $creationinfo: 


[ Top ]
formateddate  [line 246]

void formateddate( $date, $format  )
Parameters:
   $date: 
   $format: 


[ Top ]
formatedtime  [line 251]

void formatedtime( $time, $format  )
Parameters:
   $time: 
   $format: 


[ Top ]
formatstring  [line 736]

void formatstring( $text, $format  )

Bootstrap pour sprintf

affiche l'argument selon le format

Parameters:
   $text: 
   $format: 


[ Top ]
getFileMime  [line 1150]

void getFileMime( string $filename  )

renvoie le type mime d'un fichier, soit par l'extension PEAR fileinfo, soit par le système

Parameters:
string   $filename:  le nom du fichier

Information Tags:
Author:  Bruno Cénou

[ Top ]
getImageCredits  [line 1132]

void getImageCredits( string $text, string $source  )

Récupère les crédits d'une image lorsque ceux-là se trouvent au dessous de celle-ci

Parameters:
string   $text:  le texte à parser
string   $source:  le nom du fichier image

Information Tags:
Author:  Bruno Cénou

[ Top ]
getImageDesc  [line 1113]

void getImageDesc( string $text, string $source  )

Récupère la légende d'une image lorsque celle-là se trouve au dessous de celle-ci

Parameters:
string   $text:  le texte à parser
string   $source:  le nom du fichier image

Information Tags:
Author:  Bruno Cénou

[ Top ]
getImageTitle  [line 1053]

void getImageTitle( string $text, mixed $source, [string $titlePos = 'up'], [integer $posi = '0']  )

Récupère le titre d'une image lorsque celui-là se trouve au dessus ou au dessous de celle-ci

Parameters:
string   $text:  le texte à parser
mixed   $source:  le nom du fichier image ou sa position dans le texte
string   $titlePos:  la position du titre de l'image dans le doc stylé
integer   $posi:  position de l'image suivante

Information Tags:
Author:  Bruno Cénou
Author:  Pierre-Alain Mignot

[ Top ]
hasbeencut  [line 135]

void hasbeencut( )


[ Top ]
hideifearlier  [line 639]

void hideifearlier( $text, $date  )

Retourne le texte si la date est dépassée, sinon retourne une chaine vide.

Parameters:
   $text: 
   $date: 


[ Top ]
humandate  [line 256]

void humandate( $s  )
Parameters:
   $s: 


[ Top ]
humanlang  [line 619]

void humanlang( $text  )

Renvoie la lang "human reading"

Parameters:
   $text: 


[ Top ]
iconifier  [line 1001]

void iconifier( string $text, [integer $width = 150], [string $titlePos = 'up'], [integer $max = 640], [integer $min = 400]  )

Extrait les images au sein du texte pour en faire une version petite taille et fournir un lien vers une version haute résolution dans un popup

Parameters:
string   $text:  le texte à parser
integer   $width:  la largeur souhaitée pour les images dans le texte
string   $titlePos:  la position du titre de l'image dans le doc stylé
integer   $max:  la largeur maximale du popup
integer   $min:  la largeur minimale du popup

Information Tags:
Author:  Bruno Cénou
Author:  Pierre-Alain Mignot

[ Top ]
imageheight  [line 665]

void imageheight( $image  )

Retourne la hauteur de l'image.

Parameters:
   $image: 


[ Top ]
imagewidth  [line 652]

void imagewidth( $image  )

Retourne la largeur de l'image.

Parameters:
   $image: 


[ Top ]
isabsolute  [line 597]

void isabsolute( $lien  )

Permet de savoir si un lien est absolu

Parameters:
   $lien: 


[ Top ]
isadate  [line 464]

void isadate( $text  )

Fonction qui dit si une date est vide ou non

Parameters:
   $text: 


[ Top ]
ishtml  [line 746]

void ishtml( $text  )

Detect if the document is HTML

Bad heursitic

Parameters:
   $text: 


[ Top ]
isrelative  [line 585]

void isrelative( $lien  )

Permet de savoir si un lien est relatif

Parameters:
   $lien: 


[ Top ]
lettrine  [line 56]

void lettrine( $texte  )
Parameters:
   $texte: 


[ Top ]
lodeltextcolor  [line 755]

void lodeltextcolor( $status  )
Parameters:
   $status: 


[ Top ]
majuscule  [line 69]

void majuscule( $texte  )

Upercase the first letter of Texte

Parameters:
   $texte: 


[ Top ]
multilingue  [line 351]

void multilingue( $text, $lang  )
Parameters:
   $text: 
   $lang: 


[ Top ]
nbsp  [line 61]

void nbsp( $texte  )
Parameters:
   $texte: 


[ Top ]
nicefilesize  [line 679]

void nicefilesize( $lien  )

Renvoie la taille d'un fichier, mais formate joliment

avec des kilo et mega

Parameters:
   $lien: 


[ Top ]
no  [line 486]

void no( $texte  )
Parameters:
   $texte: 


[ Top ]
notes  [line 500]

void notes( $texte, $type  )

fonction pour les notes

Parameters:
   $texte: 
   $type: 


[ Top ]
notesmarginales  [line 861]

void notesmarginales( &$texte, string $coupe, string $texte  )

Filtre pour l'ajout des notes marginales

Ajoute un <div class="textandnotes"> et encapsule les notes dans une liste : <ul class="sidenotes"> <li> ... </li> </ul> contient le numéro de la note et celle-ci tronquée (si trop longue) à 100 caractères.

Le seul paramètre sera le seuil d'affichage des notes

Parameters:
string   $texte:  le texte à numéroter passé par référence
string   $coupe:  un entier (définit dans le template)
   &$texte: 

Information Tags:
Author:  Mickael Sellapin

[ Top ]
paranumber  [line 798]

void paranumber( &$texte, [string $styles = 'texte'], string $texte  )

Filtre de numerotation des paragraphes

Ajoute un <span class="paranumber"> contenant une ancre avec le numero du paragraphe aux paragraphes ayant le style texte par défaut.

Les paramètres sont modifiables dans le template et écrasent les paramètres par défaut.

Parameters:
string   $texte:  le texte à numéroter passé par référence
string   $styles:  chaine contenant les styles par défaut ou s'applique la numerotation (les styles sont separes par des ";")
   &$texte: 

Information Tags:
Author:  Mickael Sellapin

[ Top ]
pluriel  [line 51]

void pluriel( $texte  )
Parameters:
   $texte: 


[ Top ]
propre  [line 241]

void propre( $letexte  )
Parameters:
   $letexte: 


[ Top ]
removeendnotes  [line 416]

void removeendnotes( $text  )

Supprimer les appels de notes de fin de document.

Parameters:
   $text: 


[ Top ]
removefootnotes  [line 408]

void removefootnotes( $text  )

Supprimer les appels de notes de pied de page d'un texte.

Parameters:
   $text: 


[ Top ]
removeimages  [line 434]

void removeimages( $text  )

Fonction qui enleve les images

Parameters:
   $text: 


[ Top ]
removelinks  [line 456]

void removelinks( $text  )

Fonction permettant de supprimer les liens.

Parameters:
   $text: 


[ Top ]
removenotes  [line 425]

void removenotes( $text  )

Fonction permettant de supprimer les appels de notes d'un texte.

Parameters:
   $text: 


[ Top ]
removespace  [line 726]

void removespace( $text  )

Remove space for xml elements

Parameters:
   $text: 


[ Top ]
removetags  [line 443]

void removetags( $text, $tags  )

Fonction qui enleve les tags spécifiés

Parameters:
   $text: 
   $tags: 


[ Top ]
replacement  [line 775]

void replacement( $arg0, $arg1, $arg2, $arg3, $arg4, $count  )

Fonction utilisée ci dessous pour la numérotation des paragraphes

Parameters:
   $arg0: 
   $arg1: 
   $arg2: 
   $arg3: 
   $arg4: 
   $count: 


[ Top ]
replacequotationmark  [line 472]

void replacequotationmark( $text  )

Fonction qui remplace les guillemets d'un texte par leur name d'entité (&quot;)

Parameters:
   $text: 


[ Top ]
sizeattributs  [line 382]

void sizeattributs( $text  )
Parameters:
   $text: 


[ Top ]
spip  [line 150]

void spip( $letexte  )
Parameters:
   $letexte: 


[ Top ]
strip_tags_keepnotes  [line 606]

void strip_tags_keepnotes( $text, [ $keeptags = &quot;&quot;]  )

Enleve les tags HTML qui garde les footnotes et les endnotes de OpenOffice

Parameters:
   $text: 
   $keeptags: 


[ Top ]
textebrut  [line 74]

void textebrut( $letexte  )
Parameters:
   $letexte: 


[ Top ]
tocable  [line 317]

string tocable( string $text, [int $level = 10]  )

Transform headings into toc relative links

Parameters:
string   $text:  the text to transform
int   $level:  an integer representing the max level which will be transformed

API Tags:
Return:  the transformed text


[ Top ]
tocss  [line 533]

void tocss( $text, [ $options = &quot;&quot;]  )

fonctions pour le nettoyage de base des champs importes

Parameters:
   $text: 
   $options: 


[ Top ]
today  [line 630]

void today( )

Retourne la date courante sous la forme YYYY-MM-JJ



[ Top ]
truefunction  [line 391]

void truefunction( $text, $text2  )

Return the second argument if the first is true

Parameters:
   $text: 
   $text2: 


[ Top ]
vignette  [line 357]

void vignette( $text, $width  )
Parameters:
   $text: 
   $width: 


[ Top ]
wiki  [line 708]

void wiki( $text  )

Bootstrap Lodel pour WikiRender

Assure la conversion texte Wiki en xhtml

Parameters:
   $text: 


[ Top ]
yes  [line 481]

void yes( $texte  )
Parameters:
   $texte: 


[ Top ]


Documentation generated on Wed, 29 Aug 2007 14:30:03 +0200 by phpDocumentor 1.4.0a2