Last change
on this file since 556 was
30,
checked in by sebas, 17 years ago
|
nueva importacion del codigo del esqueleto de redcta con los plugins
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | $p = explode(basename(_DIR_PLUGINS)."/",str_replace('\\','/',realpath(dirname(__FILE__)))); |
---|
3 | define('_DIR_PLUGIN_ARTICLE_PDF',(_DIR_PLUGINS.end($p))); |
---|
4 | |
---|
5 | function pdf_first_clean($texte) |
---|
6 | { |
---|
7 | // $texte = ereg_replace("<p class[^>]*>", "<P>", $texte); |
---|
8 | //Translation des codes iso |
---|
9 | // PB avec l'utilisation de <code> |
---|
10 | $trans = get_html_translation_table(HTML_ENTITIES); |
---|
11 | $trans = array_flip($trans); |
---|
12 | $trans["<br />\n"] = "<BR>"; // Pour éviter que le \n ne se tranforme en espace dans les <DIV class=spip_code> (TT, tag SPIP : code) |
---|
13 | $trans['°'] = "°"; |
---|
14 | $trans["œ"] = "oe"; |
---|
15 | $trans["–"] = "-"; |
---|
16 | $trans["‘"] = "'"; |
---|
17 | $trans["’"] = "'"; |
---|
18 | $trans["“"] = "\""; |
---|
19 | $trans["”"] = "\""; |
---|
20 | $trans["…"] = "..."; |
---|
21 | $trans["€"] = "Euros"; |
---|
22 | $trans["û"] = "û"; |
---|
23 | $trans['->'] = '-»'; |
---|
24 | $trans['<-'] = '«-'; |
---|
25 | $trans[' '] = ' '; |
---|
26 | $texte = strtr($texte, $trans); |
---|
27 | |
---|
28 | $texte = unicode2charset(charset2unicode($texte), 'iso-8859-1'); // repasser tout dans un charset acceptable par export PDF |
---|
29 | |
---|
30 | return $texte; |
---|
31 | } |
---|
32 | |
---|
33 | |
---|
34 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.