Problem importing news from feed Hi. I have some problems importing a news item from a feed, as it is getting truncated. I've looked at esselbach_st_downloadqueue, esselbach_st_stories, esselbach_st_storyqueue to check for columns that may truncate the items but still can't figure out why it happens. Also I see some websites running ST now have better search engine friendly URLs (like Major Geeks, and NTCompatible, like this http://www.ntcompatible.com/CDCheck_3.1.5.0_s48671.html) How do they do that? The SE friendly templates you released only allow changing the extension to html to get rid of the parameters.
Problem importing news from feed Yeah, that search engine friendly URL is something I have been needing for a while... having-the-title-of-the-story in the URL is great for search engines. When can we expect to get this? I really hope this is released before 2.0.
Problem importing news from feed The title or the story text? Can you give me an example. This work with mod_rewrite as well. Here the mod_rewrite rules for .htaccess: Code: RewriteRule ^(.*)_s([0-9]+).html$ /story.php?id=$2 RewriteRule ^(.*)_p([0-9]+).html$ /printer.php?id=$2 Then add the following to the php part of your story/news templates: Code: $stitle = htmlentities($insert[story_title]); $stitles = $stitle."_s".$insert[story_id].".html"; $stitlep = $stitle."_p".$insert[story_id].".html"; and replace in the HTML part the link to the story page with $stitles and to the printer page with $stitlep. Here an example: Code: Posted by $insert[story_author] on: $insert[story_time] in category: $insert[story_category] [ <a href="$stitlep">Print</a> | <a href="$stitlel">Permalink / $insert[story_comments] Comment(s)</a > ]<br />
Problem importing news from feed I think it was a line break or whitespace problem, because after erasing some blank lines and tidying text up a bit, it comes out just fine. Weird, really. And thank you for this providing the new templates for SEF URLs. Also, I was wondering/hoping: will you do a beta release for ST 2.0 so we can see which way it's headed?
Problem importing news from feed I must be thick as I cannot get this to work... Does this replace or go below the following in the existing .htaccess file: RewriteRule ^story.html$ story.php?id=1 RewriteRule ^story([0-9]+).html$ story.php?id=$1 RewriteRule ^story([0-9]+)-1.html$ story.php?id=$1 RewriteRule ^print([0-9]+).html$ printer.php?id=$1 ? Below the lines: <?php global $insert; in the template such as story template? Tried that, but the values didn't seem to go through.... which templates exactly do I need to change? Currently, for Read More in the news_more template I have: <?php global $insert; $EST_TEMPLATE = <<<TEMPLATE <br /><br /><a href="story$insert[story_id].html">Read more</a> TEMPLATE; ?> What would that change to?
Problem importing news from feed Can you post an example feed? Yes, a beta test is planned. I will post an announcement as soon it getting closer. It go below It should be $stitle = htmlentities(str_replace(" ","_",$insert[story_title])); and not $stitle = htmlentities($insert[story_title]); Here the code based on your example: Code: <?php global $insert; $stitle = htmlentities(str_replace(" ","_",$insert[story_title])); $stitles = $stitle."_s".$insert[story_id].".html"; $EST_TEMPLATE = <<<TEMPLATE <br /><br /><a href="$stitles">Read more</a> TEMPLATE; ?>
Problem importing news from feed Originally posted by Philipp: Tried that, but when I view the news page all of the news listings have gone and looking at the HTML : and then ends abruptly. Is there a mistake in the code you posted?
Problem importing news from feed Please verify that there is no whitespace character after $EST_TEMPLATE = <<<TEMPLATE
Problem importing news from feed I did check, honestly...ahem..found one ... so that's fixed! Thanks Two things - It doesn't seem to cope with ? question marks in headlines - such as this? Secondly - how easy is it to change the _ (underscore) in the headlines to a - (dash) Instead of Philipp_is_a_genius_s971.html to Philipp-is-a-genius-s971.html This is probably the most amazing modification to this script... love it thanks again!
Problem importing news from feed This should work: Code: $stitle = str_replace(" ","-",$insert[story_title]); $stitle = str_replace("?","",$stitle); $stitle = htmlentities($stitle); $stitles = $stitle."_s".$insert[story_id].".html";
Problem importing news from feed It would be great if you posted a set of modified templates with this. I'm kinda stuck trying to adapt it so it works with the download pages.
Problem importing news from feed Not with the default configuration because mod_rewrite is only available for Apache. However, there are similar URL rewriting extensions available for IIS: ISAPI_Rewrite - http://www.isapirewrite.com IIS Rewrite - http://www.qwerksoft.com/products/iisrewrite/
Problem importing news from feed Originally posted by Philipp: Cool, I'll look in to those.. I hate missing out on features..
Problem importing news from feed Here an example for the download and review section Review Add the following to your mod_rewrite .htaccess file: Code: RewriteRule ^(.*)_r([0-9]+).html$ /review.php?id=$2 Open the template review_list in the template editor and add after: Code: <?php global $insert; the following: Code: $stitle = str_replace(" ","-",$insert[review_title]); $stitle = str_replace("?","",$stitle); $stitle = htmlentities($stitle); $stitler = $stitle."_r".$insert[review_id].".html"; Then replace: Code: <li><a href="review.php?id=$insert[review_id]">$insert[review_title]</a><br /> with: Code: <li><a href="$stitler">$insert[review_title]</a><br /> and save the template Download Add the following rule to your .htaccess file: Code: RewriteRule ^(.*)_d([0-9]+).html$ /download.php?det=$2 Now open the template download_cat_page in the template editor and add after: Code: <?php global $insert; the following: Code: $stitle = str_replace(" ","-",$insert[download_title]); $stitle = str_replace("?","",$stitle); $stitle = htmlentities($stitle); $stitled = $stitle."_d".$insert[download_id].".html"; Next replace: Code: <li><a href="download.php?det=$insert[download_id]">$insert[download_title]</a><br /> with: Code: <li><a href="$stitled">$insert[download_title]</a><br /> and save the template
Problem importing news from feed What would be the codes for the latest comments and search templates? Btw - thanks so much for the above !
Problem importing news from feed Originally posted by Philipp: Thank you Philipp. I haven't sent you that feed sample because like I said it worked out in the end.
Problem importing news from feed Search: Open the template search_list_news in the template editor and add after: Code: <?php global $insert; the following: Code: $stitle = str_replace(" ","-",$insert[story_title]); $stitle = str_replace("?","",$stitle); $stitle = htmlentities($stitle); $stitles = $stitle."_s".$insert[story_id].".html"; Then replace: Code: <li><a href="story.php?id=$insert[story_id]">$insert[story_title]</a> ($insert[story_time])<br /> with: Code: <li><a href="$stitles">$insert[story_title]</a> ($insert[story_time])<br /> Comments: This requires a code modification in comments.php Find: Code: $insert[comment_url] = "story.php?id=$insert[comment_story]"; and replace with: Code: $stitle = str_replace(" ","-",$story); $stitle = str_replace("?","",$stitle); $stitle = htmlentities($stitle); $insert[comment_url] = $stitle."_s".$insert[comment_story].".html";