Bonjour à tous !
Voilà j'ai un site phpbb avec un portail et j'ai un mod dessus qui me génère automatiquement un fichier rss mais je ne comprends pas quelques trucs :
- Dans ce fichier il remplace tout les accents par des points d'intérogation, pourquoi?
- Comment puis-je faire pour fournir un code à insérer directement pour ceux qui veulent mettre mes news sur leur site?
Voici l'adresse du fichier : http://xenderillimited.free.fr/news_rss.php
Je pense qu'il faut rajouter une ligne de code qui permet de dire que la page est au format français en non anglais mais je ne sais pas comment faire :
<?xml version="1.0" encoding="ISO-8859-1"?>
Voici le fichier php :
Voici le fichier tlp :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57 <?php /*************************************************************************** * news_rss.php * ------------------- * begin : Monday, January 13th 2003 * email : webmaster@codemonkeyx.net * * ***************************************************************************/ // // Set up for phpBB intergration. // define('IN_PHPBB', true); $phpbb_root_path = './'; // // phpBB related files // include_once( $phpbb_root_path . 'extension.inc' ); include_once( $phpbb_root_path . 'common.' . $phpEx ); include_once ($phpbb_root_path . 'includes/news.' . $phpEx ); if( $board_config['allow_rss'] != 1 ) { echo 'RSS has been disabled for this site'; return; } header("Content-type: text/xml"); // // Start session management // $userdata = session_pagestart( $user_ip, PAGE_INDEX, $session_length ); init_userprefs( $userdata ); // // End session management // // Tell the template class which template to use. $template->set_filenames( array( 'news' => 'news_200_rss_body.tpl' ) ); $content =& new NewsModule( $phpbb_root_path ); $content->setVariables( array( 'L_INDEX' => $lang['Index'], 'L_CATEGORIES' => $lang['Categories'], 'L_ARCHIVES' => $lang['Archives'] ) ); $content->renderSyndication( ); $content->display( ); $content->clear( ); ?>
Merci beaucoup de votre aide !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36 <rss version="2.0"> <channel> <title>{TITLE}</title> <link>{URL}</link> <!-- BEGIN image --> <image> <title>{TITLE}</title> <description>{image.IMAGE_TITLE}</description> <url>{image.IMAGE}</url> <link>{URL}</link> </image> <!-- END image --> <description>{DESC}</description> <language>{LANGUAGE}</language> <copyright>{COPY_RIGHT}</copyright> <pubDate>{LAST_BUILD}</pubDate> <docs>http://backend.userland.com/rss</docs> <generator>{GENERATOR}</generator> <category>{CATEGORY}</category> <managingEditor>{EDITOR}</managingEditor> <webMaster>{WEBMASTER}</webMaster> <ttl>{TTL}</ttl> <!-- BEGIN articles --> <item> <title>{articles.L_TITLE}</title> <pubDate>{articles.RFC_POST_DATE}</pubDate> <link>{INDEX_FILE}?topic_id={articles.ID}</link> <category>{articles.FORUM_NAME}</category> <description> <![CDATA[{articles.BODY}]]> </description> <comments>{articles.U_COMMENTS}</comments> </item> <!-- END articles --> </channel> </rss>
A bienôt
Partager