Code: Select all
$board_url = generate_board_url();
Code: Select all
$cleaning = array(
"/\[url\=(.*?)\:(.*?)\](.*?)\[img\:(.*?)\](.*?)\[\/img\:(.*?)\](.*?)\[\/url\:(.*?)\]/is" => "<a href=\"$5\" target=\"_new\">image</a>",
"/\[img\:(.*?)\](.*?)\[\/img\:(.*?)\]/is" => "<a href=\"$2\" target=\"_new\">image</a>",
"/<img src=\"\{SMILIES_PATH\}\//is" => "<img src=\"$board_url/images/smilies/"
);
Code: Select all
$topic_link = $board_url."/viewtopic.".$phpEx."?f=".$forumid."&t=".$topicid;
Code: Select all
$tptxt = $row['post_text'];
$tptxt = preg_replace(array_keys($cleaning), array_values($cleaning), $tptxt);
Code: Select all
$description = $user->lang['POST_BY_AUTHOR']." ".$row['topic_last_poster_name']."
Code: Select all
$row['post_text']
Code: Select all
$tptxt
Code: Select all
/**
* @ignore
*/
Code: Select all
// Use cached file or not
$cache_time = 180; // Time in seconds before new feed is generated
$cache_filename = 'cache/rsscache'; // Location to lookup or store cached file
// Check to see if this file has already been cached
// If it has get the file creation time and compare with cache_time
if (file_exists($cache_filename) &&
(time() - $cache_time < filemtime($cache_filename)))
{
header('Content-type: application/rss+xml; charset=UTF-8');
readfile($cache_filename);
echo "<!-- Cache generated at ".date(DATE_RFC822, filemtime($cache_filename))."-->";
exit;
}
ob_start(); // Turns on output buffering
//end caching
Code: Select all
$db->sql_freeresult($result);
Code: Select all
// write output to cache_filename
file_put_contents($cache_filename, ob_get_contents());
ob_end_flush();
//end write output
Are installation instructions not similar?deepan wrote:Friends i use serenity green style can some one tell me how to add rss for this style...
Please help me![]()
hug3 wrote:for subsilver2 template
****************************************************************************************************************************Code: Select all
File Copy Copy: root/rss.php To: root/rss.php Copy: root/styles/prosilver/theme/images/icon_rss.gif To: root/styles/subsilver2/theme/images/icon_rss.gif
Code: Select all
Open: styles/subsilver2/template/overall_header.html Find Code: <td class="genmed" align="{S_CONTENT_FLOW_END}"> Add on the next line Code: <a href="{U_RSS}"><img src="{T_THEME_PATH}/images/icon_rss.gif" width="12" height="13" alt="*" />{L_RSS_EXPLAIN}</a>
Code: Select all
Open: language/en/common.php Find Code: 'EXTENSION_DISABLED_AFTER_POSTING' => 'The extension <strong>%s</strong> has been deactivated and can no longer be displayed.', Add on the next line Code: //rss feed code 'RSS_EXPLAIN' =>'RSS ', 'RSS_READ_TOPIC' =>'Read Main Topic', 'RSS_COPYRIGHT' =>'Copyright by', 'RSS_FAILURE' =>'Failed to get latest topics',
***************************************************************************************************************************Code: Select all
Open: includes/functions.php Find Code: 'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '', Add on the next line Code: //rss feed code 'U_RSS' =>append_sid("{$phpbb_root_path}rss.$phpEx"),
save the files re-upload them,
refresh the template and go get it
Could you give a link to your forum?daGrevis wrote:Can some one can help me with my problem? (Higher!)
In the code you placed here, it saysdeepan wrote:I tried following this method below for my serenity green style:
but i was not able to see the rss icon and the feed was also not working...please help![]()
![]()
Did you adjust the overal_header.html in styles/serenitygreen/template too?Open: styles/subsilver2/template/overall_header.html
i had copied the file icon file to root/styles/serenitygreen/theme/images/icon_rss.gifAntheii wrote:Hi,In the code you placed here, it saysdeepan wrote:I tried following this method below for my serenity green style:
but i was not able to see the rss icon and the feed was also not working...please help![]()
Did you adjust the overal_header.html in styles/serenitygreen/template too?Open: styles/subsilver2/template/overall_header.html
Hans