| |
|
| :: |
| Author |
Message |
arkantos

Joined: 13 Feb 2007 Posts: 26 Location: Dark Side of Tha World
|
Posted: Sun Mar 04, 2007 8:38 pm Post subject: Just one prob with RSS |
|
|
hyo, just little problem with RSS, ive been testing this on my server and doesnt seem to work.
Thise because ive tried on my board and a normal board install and i get this error with the RSS:
| Code: | Warning: sprintf() [function.sprintf]: Too few arguments in /home/site/mx_ggsitemaps/includes/rss_forum.php on line 206
Warning: Cannot modify header information - headers already sent by (output started at /home/site/mx_ggsitemaps/includes/rss_forum.php:206) in /home/site/mx_ggsitemaps/includes/ggs_functions.php on line 485
Warning: Cannot modify header information - headers already sent by (output started at /home/site/mx_ggsitemaps/includes/rss_forum.php:206) in /home/site/mx_ggsitemaps/includes/ggs_functions.php on line 488
Warning: Cannot modify header information - headers already sent by (output started at /home/site/mx_ggsitemaps/includes/rss_forum.php:206) in /home/site/mx_ggsitemaps/includes/ggs_functions.php on line 489
Warning: Cannot modify header information - headers already sent by (output started at /home/site/mx_ggsitemaps/includes/rss_forum.php:206) in /home/site/mx_ggsitemaps/includes/ggs_functions.php on line 490
Warning: Cannot modify header information - headers already sent by (output started at /home/site/mx_ggsitemaps/includes/rss_forum.php:206) in /home/site/mx_ggsitemaps/includes/ggs_functions.php on line 491
Warning: Cannot modify header information - headers already sent by (output started at /home/site/mx_ggsitemaps/includes/rss_forum.php:206) in /home/site/mx_ggsitemaps/includes/ggs_functions.php on line 492
Warning: Cannot modify header information - headers already sent by (output started at /home/site/mx_ggsitemaps/includes/rss_forum.php:206) in /home/site/mx_ggsitemaps/includes/ggs_functions.php on line 493
¢“™ ÜMÊðàÉK7„w…"!=‹ ÎãÂdTƒ¤¡û¤¾½ ]³QðdÆûte{Vs ¿/¢. ‹‚S*5*ÅÊv©V}°êüÅšQ>m|ÿâ±!¸WÎ@Šsø c3³03êGÒaR‹Àã/`·¾~‘x°|[ñ¡-â#vã¬ì@_Gû‡\‹µÎÍ8Ь·ô˜5PåJ¥–„³Ø8÷4•ËÕÊöœÓTªµ*•Vm{ÅiÂýtä³Þé¯ÿøs¤Â¿àšÎtÔ=£¹›ßpÇ tœà^Y&‘Œ“œ¡ø8±6ó.e!÷ºòòƒÏ<Áú‘9øŽ7äy $ìòÿ™êÂ)ý9Ìð lpáj~ø›C.Ù÷<z óù1ŽÂ÷Ã˲w»»ù|^GšP2H®Íã1ëFÂç:Ç` Ÿ ·åå?}˜ïl.@@€#£#œ”të —¿ÓaLZDþ$ɵ0ö-r`ƒq '|Ñ¢Ì0ó•& «Oâ K\—œUúKô›Šƒ<Àî-Æ-ä0Œ©G…2¸¹i9- >1ú¶÷ïßomÔ(Â(2ÐSàåo Oeå]Š–pTF6¨M7üz-ó~d
ìºA&ì÷}á>ùÃãB 5üª!{yò‚a=f\Ö¡€ÉúŒóårµQcš"Q.1ý³
je¼_Ó |
Thos for vanilla install and my other board.
As far as ive seen this is the only error in all the RSS, greets. |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
|
| Back to top |
|
 |
arkantos

Joined: 13 Feb 2007 Posts: 26 Location: Dark Side of Tha World
|
Posted: Fri Mar 16, 2007 8:41 pm Post subject: Re: Just one prob with RSS |
|
|
Still Having the same problem with the RSS for forums, its just that RSS page.
Mmm are this RSS in UTF-8? maybe is for this code added in my .htaccess:
| Code: | AddCharset ISO-8859-1 .xml
AddCharset ISO-8859-1 .php |
But i dont know if its because of that. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
Posted: Sat Mar 17, 2007 11:48 am Post subject: Re: Just one prob with RSS |
|
|
well the error occurs before we deal with charset, so I doubt it could be this.
| Code: | | Warning: sprintf() [function.sprintf]: Too few arguments in /home/site/mx_ggsitemaps/includes/rss_forum.php on line 206 |
This error suggest that there aren't enough var passed to sprintf() (used to parse the data in the rss tags.
I really think this is due to messing in between several versions of the mod.
Have you tried re uploading all files from the last one (1.2.0RC2) ?
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
arkantos

Joined: 13 Feb 2007 Posts: 26 Location: Dark Side of Tha World
|
Posted: Sat Mar 17, 2007 7:01 pm Post subject: Re: Just one prob with RSS |
|
|
Yep i uploaded new file version ones and still the same error.
I have globals ON in that server, PHP4.x, MySQL 4.x., Zend PHP, Apache 1.3x
Maybe could be those ones but dunno what happens, i do not even understand the error hehehe |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
|
| Back to top |
|
 |
arkantos

Joined: 13 Feb 2007 Posts: 26 Location: Dark Side of Tha World
|
Posted: Mon Mar 19, 2007 7:02 pm Post subject: Re: Just one prob with RSS |
|
|
| Quote: | // Is it a general rss feed call or a forum rss feed call
if ( $this->actions['action'] === 'forum' ) {
//If so check for dupes and build channel header
$rss_list_url = $this->path_config['rss_url'] . (($this->mod_r_config['mod_rewrite']) ? "forum-rss" . $this->mod_r_config['extra_params'] .".xml" . $this->ext_config['gzip_ext_out'] : 'rss.'.$phpEx . '?forum' . $this->mod_r_config['extra_params']);
$this->seo_kill_dupes($rss_list_url);
// Forum stats
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$l_total_post_s = ( $total_posts >= 0 ) ? $lang['Posted_articles_total'] : $lang['Posted_article_total'];
$l_total_user_s = ( $total_users >= 0 ) ? $lang['Registered_users_total'] : $lang['Registered_user_total'];
$forum_stats = sprintf($l_total_user_s, $total_users) . ' || ' . sprintf($l_total_post_s, $total_posts);
// Chan info
$chan_title = htmlspecialchars($board_config['sitename'] . $this->rss_config['extra_title']);
$chan_desc = htmlspecialchars($board_config['site_desc'] . ' : <hr/><br/> ' . $forum_stats);
$forum_image = sprintf($this->style_config['rsschan_img_tpl'], $chan_title, $this->rss_config['rss_image'], $rss_list_url);
$chan_time = gmdate('D, d M Y H:i:s \G\M\T', $this->output_data['last_mod_time']);
$this->output_data['data'] .= sprintf($this->style_config['rsschan_tpl'], $chan_title, $rss_list_url, $chan_desc, $chan_time, $forum_image);
$this->output_data['data'] .= sprintf($this->style_config['rss_tpl'], htmlspecialchars($board_config['sitename']), $this->path_config['phpbb_url'], $this->output_data['last_mod_time'], $chan_time, $chan_desc, $rss_list_url, $chan_title, $this->path_config['phpbb_url']);
$this->output_data['url_sofar']++;
$this->output_data['url_sofar']++;
}
// Build sql components
$forum_sql1 = "f.forum_id, f.forum_name, f.forum_desc, ";
$forum_sql2 = FORUMS_TABLE . " AS f, ";
$forum_sql3 = $not_in_id_sql . "f.auth_view = 0 AND f.auth_read = 0 AND t.forum_id = f.forum_id";
if ($this->rss_config['limit_time'] > 0 ) {
$time_limit = ($this->output_data['time'] - $this->rss_config['limit_time']);
$time_limit_sql = " p.post_time > " . $time_limit . " AND ";
$time_limit_sql_ptc = " WHERE post_time > " . $time_limit;
} else {
$time_limit_sql = "";
$time_limit_sql_ptc = "";
}
$sql = "SELECT COUNT(post_id) AS post
FROM " . POSTS_TABLE . "
$time_limit_sql_ptc";
if ( !($result = $db->sql_query($sql)) ) {
$this->mx_sitemaps_message_die(GENERAL_ERROR, 'Could not obtain limited posts count information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$item_count = ( $row['post'] ) ? $row['post'] : 1;
}
// Build sql components all remaining cases
if ( $this->rss_config['msg_out'] ) {
$msg_sql1 = "p.*, pt.*";
$msg_sql2 = ", " . POSTS_TEXT_TABLE . " as pt";
$msg_sql3 = " AND t.topic_last_post_id = pt.post_id";
} else {
$msg_sql1 = "p.poster_id, p.post_time, p.post_username";
$msg_sql2 = "";
$msg_sql3 = "";
}
if($this->rss_config['rss_first']) {
$msg_sql1 .= ", pF.post_id as post_idF, pF.poster_id as poster_idF, pF.post_time as post_timeF, pF.post_username as post_usernameF, pF.post_edit_time as post_edit_timeF, pF.enable_sig as enable_sigF, pF.enable_smilies as enable_smiliesF, pF.enable_bbcode as enable_bbcodeF, pF.enable_html as enable_htmlF";
$msg_sql2 .= ", " . POSTS_TABLE . " as pF";
$msg_sql3 .= " AND t.topic_first_post_id = pF.post_id";
if ( $this->rss_config['msg_out'] ) {
$msg_sql1 .= ", ptF.bbcode_uid as bbcode_uidF, ptF.post_subject as post_subjectF, ptF.post_text as post_textF";
$msg_sql2 .= ", " . POSTS_TEXT_TABLE . " as ptF";
$msg_sql3 .= " AND t.topic_first_post_id = ptF.post_id";
}
}
$sql_first = "SELECT $forum_sql1 t.topic_id, t.topic_title, t.topic_type, t.topic_status, t.topic_replies, t.topic_first_post_id, t.topic_last_post_id, $msg_sql1
FROM $forum_sql2 " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p$msg_sql2
WHERE $time_limit_sql
$forum_sql3
AND t.topic_status <> " . TOPIC_MOVED . "
AND t.topic_last_post_id = p.post_id $msg_sql3
ORDER BY t.topic_last_post_id " . $this->rss_config['rss_sort'];
// Absolute limit
$topic_sofar = 0;
$topics = array();
// Define censored word matches
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
$paginated = $board_config['posts_per_page'];
// Do the loop
while( ( $topic_sofar < $item_count ) && ($this->output_data['url_sofar'] < $this->rss_config['rss_url_limit']) ) {
$result = "";
$sql = $sql_first . " LIMIT $topic_sofar," . $this->rss_config['rss_sql_limit'];
if ( !($result = $db->sql_query($sql)) ) {
$this->mx_sitemaps_message_die(GENERAL_ERROR, "Could not obtain topic data", '', __LINE__, __FILE__, $sql);
}
$topics = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
if ( !empty($topics) ) {
foreach ($topics as $topic) {
$pages = ceil($topic['topic_replies'] / $paginated);
$topic['topic_title'] = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, $this->un_htmlspecialchars($topic['topic_title'])) : $this->un_htmlspecialchars($topic['topic_title']);
// Since ' is not HTML, but is XML convert.
$topic['topic_title'] = str_replace("’", "'", $topic['topic_title']);
$topic_stats = $lang['rss_item_stats'] . ($topic['topic_replies'] + 1) . ' ' . (($topic['topic_replies'] >= 1) ? $lang['rss_answers'] : $lang['rss_answer'] );
// In case we are looking for more than one forum
$forum_id = isset($topic['forum_id']) ? $topic['forum_id'] : $forum_id;
// In case we are going to output forum data many times, let's build this once
if (!isset($item_opt[$forum_id])) {
// Set mod rewrite & type
$item_opt[$forum_id]['forum_name_ok'] = $phpbb_seo->format_url($topic['forum_name'], $phpbb_seo->seo_static['forum']) ;
$item_opt[$forum_id]['forum_url'] = $this->path_config['phpbb_url'] . (($this->mod_r_config['forum_pre'] !='') ? $this->mod_r_config['forum_pre'] . $forum_id . $this->mod_r_config['ext'] : $item_opt[$forum_id]['forum_name_ok'] . $this->mod_r_config['forum_anchor'] . $forum_id . $phpbb_seo->seo_ext['forum']);
$item_opt[$forum_id]['forum_name'] = $topic['forum_name'];
}
$topic_url = $this->path_config['phpbb_url'] . (($this->mod_r_config['topic_pre'] !='') ? $this->mod_r_config['topic_pre'] . $topic['topic_id'] : $phpbb_seo->format_url($topic['topic_title'], $phpbb_seo->seo_static['topic']) . $phpbb_seo->seo_delim['topic'] . $topic['topic_id']);
$has_reply = ($topic['topic_last_post_id'] > $topic['topic_first_post_id']) ? TRUE : FALSE;
$item_time = gmdate('D, d M Y H:i:s \G\M\T', $topic['post_time']);
// Do we output the topic URL
if( $has_reply && $this->rss_config['rss_first']) {
$topic_urlF = $topic_url . $phpbb_seo->seo_ext['topic'];
// With the msg content
if ($this->rss_config['msg_out']) {
$first_message = $this->format_rss_txt($topic['post_subjectF'], $topic['post_textF'], $this->rss_config['msg_sumarize'], $topic_urlF, $topic['bbcode_uidF'], $topic['enable_smiliesF'], $topic['enable_htmlF'] );
}
$item_title = htmlspecialchars($topic['topic_title']);
$item_desc = htmlspecialchars( '<div class="item_sub_title">' . $item_opt[$forum_id]['forum_name'] . ' : ' . $topic['topic_title'] . ' </div><hr/> ' . $first_message. ' <hr/><br/> ' . $topic_stats);
$this->output_data['data'] .= sprintf($this->style_config['rss_tpl'], $item_title, $topic_urlF, $topic['post_time'], $item_time, $item_desc, $item_opt[$forum_id]['forum_url'], htmlspecialchars($item_opt[$forum_id]['forum_name']), $topic_urlF);
$this->output_data['url_sofar']++;
}
// Do we output the last post URL
if ( $this->rss_config['rss_last'] || !$has_reply) {
$start = ($pages > 1) ? $this->mod_r_config['start'] . $paginated * ($pages-1) : '';
if ($pages > 1) {
$start = $this->mod_r_config['start'] . $paginated * ($pages-1);
$post_num = '#' . $topic['topic_last_post_id'];
} else {
$start = $post_num = "";
}
$topic_url .= $start . $phpbb_seo->seo_ext['topic'] . $post_num;
// With the msg content
if ($this->rss_config['msg_out']) {
$last_message = $this->format_rss_txt($topic['post_subject'], $topic['post_text'], $this->rss_config['msg_sumarize'], $topic_url, $topic['bbcode_uid'], $topic['enable_smilies'], $topic['enable_html'] );
}
$item_title = htmlspecialchars(($has_reply) ? 'RE : ' . $topic['topic_title'] : $topic['topic_title']);
$item_desc = htmlspecialchars('<div class="item_sub_title">' . $item_opt[$forum_id]['forum_name'] . ' : ' . $topic['topic_title'] . ' </div><hr/> ' . $last_message . ' <hr/><br/> ' . $topic_stats);
$this->output_data['data'] .= sprintf($this->style_config['rss_tpl'], $item_title, $topic_url, $topic['post_time'], $item_time, $item_desc, $item_opt[$forum_id]['forum_url'], htmlspecialchars($item_opt[$forum_id]['forum_name']), $topic_url);
$this->output_data['url_sofar']++;
}
}// End topic loop
}
// Used to separate query
$topic_sofar = $topic_sofar + $this->rss_config['rss_sql_limit'];
unset($topics);
unset($topic);
}// End Query limit loop
} |
Nop, this problem is on live enviroment so far. And just for the forum rss.
Maybe some mod? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
Posted: Mon Mar 19, 2007 11:06 pm Post subject: Re: Just one prob with RSS |
|
|
All right, it looks like the problem is here :
| Code: |
$l_total_post_s = ( $total_posts >= 0 ) ? $lang['Posted_articles_total'] : $lang['Posted_article_total'];
$l_total_user_s = ( $total_users >= 0 ) ? $lang['Registered_users_total'] : $lang['Registered_user_total'];
$forum_stats = sprintf($l_total_user_s, $total_users) . ' || ' . sprintf($l_total_post_s, $total_posts); |
Have you changed the phpBB language files ?
These language entries are the original ones :
| Code: |
//
// Stats block text
//
$lang['Posted_articles_zero_total'] = 'Our users have posted a total of <b>0</b> articles'; // Number of posts
$lang['Posted_articles_total'] = 'Our users have posted a total of <b>%d</b> articles'; // Number of posts
$lang['Posted_article_total'] = 'Our users have posted a total of <b>%d</b> article'; // Number of posts
$lang['Registered_users_zero_total'] = 'We have <b>0</b> registered users'; // # registered users
$lang['Registered_users_total'] = 'We have <b>%d</b> registered users'; // # registered users
$lang['Registered_user_total'] = 'We have <b>%d</b> registered user'; // # registered users
$lang['Newest_user'] = 'The newest registered user is <b>%s%s%s</b>'; // a href, username, /a |
From language/lang_english/lang_main.php, if you've modified these, you can safely add them in the lang_gss_main.php file (the original ones as they are) it won't affect your previous modding and will work
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
arkantos

Joined: 13 Feb 2007 Posts: 26 Location: Dark Side of Tha World
|
Posted: Wed Mar 28, 2007 12:45 am Post subject: Re: Just one prob with RSS |
|
|
Ok this worked perfectly, yes it was a mod that modifies just one line of languaje.
Im worried kus this a several error and just for one variable, instead showing the argument not found it leads to a path disclosure or similar.
Maybe you can put some protections for this in the final version.
Greets. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
Posted: Wed Mar 28, 2007 10:05 pm Post subject: Re: Just one prob with RSS |
|
|
Well, I'm not sure a mod should bypass the phpBB settings as far as error reporting.
It is generally advised to turn them off on live domains, at the server level, and to deal directly with error logs instead.
But you can as well turn them off for all the forum in common.php :
| Code: | | error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables |
If you replace it with :
| Code: |
error_reporting (0); // This will NOT report errors |
You should be done.
Because if you only cut it for a module, errors would still show up on regular phpBB pages.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|