natewlew Posted January 24, 2007 Author Share Posted January 24, 2007 With some help I have found a problem with the /catalog/news.php. Find: $news_query = tep_db_query("select n.date_created, nd.name, nd.content from " . TABLE_NEWS . " n, " . TABLE_NEWS_DESC . " nd where n.id = $id and nd.language_id = '" . (int)$languages_id . "'"); Change it to: $news_query = tep_db_query("select n.date_created, nd.name, nd.content from " . TABLE_NEWS . " n, " . TABLE_NEWS_DESC . " nd where nd.news_id = '" . (int)$id . "' and n.id = '" . (int)$id . "' and nd.language_id = '" . (int)$languages_id . "'"); Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
asapcustoms Posted January 24, 2007 Share Posted January 24, 2007 I updated to V1.2 and everything is good now. Nice work :-) Quote Link to comment Share on other sites More sharing options...
natewlew Posted January 24, 2007 Author Share Posted January 24, 2007 (edited) Thanks! I will have a new version that does not require manual editing for the multi languages. I also found a problem with the /catalog/rss.php in V 1.2. Find: $news_query_raw = tep_db_query("select nd.name, n.date_created, nd.content, n.id from " . TABLE_NEWS . " n, " . TABLE_NEWS_DESC . " nd where nd.language_id = '" . (int)$languages_id . "' order by n.id desc limit " . NEWS_RSS_ARTICLE); Replace with: $news_query_raw = tep_db_query("select nd.name, n.date_created, nd.content, n.id from " . TABLE_NEWS . " n, " . TABLE_NEWS_DESC . " nd where nd.language_id = '" . (int)$languages_id . "' and n.id = nd.news_id order by n.id desc limit " . NEWS_RSS_ARTICLE); Edited January 24, 2007 by natewlew Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
zarren Posted January 29, 2007 Share Posted January 29, 2007 (edited) hey guys Just installed this mod and got this error in admin: Fatal error: Call to undefined function: tep_reply() in /vhost/vhost5/n/o/r/norfolklights.com/www/catalog/admin/news.php on line 315 Can anybody help?? EDIT: here is the code around lines 315: <tr class="dataTableRow"> <td class="dataTableContent"><?php echo tep_date_short($products['date_created']); ?></td> <td class="dataTableContent"><u><?php echo '<a href="' . tep_href_link(FILENAME_NEWS, 'action=edit&id=' . $products['id'] . '&page=' . $HTTP_GET_VARS['page'], 'NONSSL') . '">' . $products['name'] . '</a></u>'; ?></td> <td class="dataTableContent"><u><?php if ($products['replys'] > 0) echo '<a href="' . tep_href_link(FILENAME_NEWS, 'action=edit_reply&id=' . $products['id'] . '&page=' . $HTTP_GET_VARS['page'], 'NONSSL') . '">' . HEADING_REPLY . '</a></u>'; ?></td> <td class="dataTableContent" align="left" valign="bottom"><?php echo HEADING_REPLIES; ?> <?php echo $products['replys']; ?> <?php if (tep_reply($products['id'])) echo tep_image(DIR_WS_IMAGES . 'news.gif'); ?> </td> </tr> Edited January 29, 2007 by zarren Quote Link to comment Share on other sites More sharing options...
radders Posted January 29, 2007 Share Posted January 29, 2007 I tried the latest version but when I run it through the rss validator at feedvalidator.org it complains that the headers are incorrect. Have I missed something in the installation? Quote Link to comment Share on other sites More sharing options...
natewlew Posted January 29, 2007 Author Share Posted January 29, 2007 In the readme.txt it says: Open /catalog/admin/includes/fuctions/general.php and add this at the bottom, right above: ?> function tep_reply($news_id) { $reply_query = tep_db_query("select approved from " . TABLE_NEWS_REPLYS . " where news_id = '" . (int)$news_id . "'"); while ($reply = tep_db_fetch_array($reply_query)) { $reply_test .= $reply['approved']; } if (preg_match("/0/", $reply_test)) { return true; } else { return false; } } This will fix your error. I will be fixing the rss.php so it will validate. Thanks for bringing this to my attention. Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
natewlew Posted January 29, 2007 Author Share Posted January 29, 2007 I updated a fix for the invalid rss. I still get a "Problematical RFC 822 date-time value". I do know the time is RFC 822. I think there is a extra space after the day. This is from the php date function. Anyways the feed is now valid. Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
radders Posted January 29, 2007 Share Posted January 29, 2007 Many thanks Nate my feed is now working :-) I changed one more thing in order to get the whole feed to show- using utf8_encode to sanitize some of the special characters that didn't get picked up by htmlentities. Maybe it was just my system that needed it but I mention it here in case anyone else gets a partial feed showing up. Quote Link to comment Share on other sites More sharing options...
zarren Posted January 30, 2007 Share Posted January 30, 2007 hehehe sorry i should try to slow down a bit and READ :D the installation instructions!!!! :-" :blink: Quote Link to comment Share on other sites More sharing options...
natewlew Posted January 30, 2007 Author Share Posted January 30, 2007 (edited) Many thanks Nate my feed is now working :-)I changed one more thing in order to get the whole feed to show- using utf8_encode to sanitize some of the special characters that didn't get picked up by htmlentities. Maybe it was just my system that needed it but I mention it here in case anyone else gets a partial feed showing up. In the admin you can change the amount of characters that show in each article. The default is 250. You can also change the amount of articles that show in the feed. The default is 10. If that is what you are talking about? hehehe sorry i should try to slow down a bit and READ biggrin.gif the installation instructions!!!! whistling.gif blink.gif No big deal :) Edited January 30, 2007 by natewlew Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
zarren Posted January 31, 2007 Share Posted January 31, 2007 (edited) Hope I havent left another part of the instructions lol but I still get an error when clicking to view the blog in admin... Here is the error I get: Fatal error: Call to undefined function: tep_get_news_name() in /vhost/vhost5/x/x/x/ywzywxz.com/xxx/catalog/admin/news.php on line 195 Edited January 31, 2007 by zarren Quote Link to comment Share on other sites More sharing options...
natewlew Posted January 31, 2007 Author Share Posted January 31, 2007 (edited) This is in the same spot in the read_me.txt. Open /catalog/admin/includes/fuctions/general.php and add this at the bottom, right above: ?> function tep_get_news_name($name_id, $language_id = 0) { global $languages_id; if ($language_id == 0) $language_id = $languages_id; $name_query = tep_db_query("select name from " . TABLE_NEWS_DESC . " where news_id = '" . (int)$name_id . "' and language_id = '" . (int)$language_id . "'"); $name = tep_db_fetch_array($name_query); return $name['name']; } function tep_get_news_content($news_id, $language_id) { $news_query = tep_db_query("select content from " . TABLE_NEWS_DESC . " where news_id = '" . (int)$news_id . "' and language_id = '" . (int)$language_id . "'"); $news = tep_db_fetch_array($news_query); return $news['content']; } Edited January 31, 2007 by natewlew Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
Guest Posted February 9, 2007 Share Posted February 9, 2007 ok i installled everything as it should be done. the admin side is working fine however i want to have a link on my store that points to news.php . When i try to run news.php i get this error Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/asta/public_html/store/includes/header.php:147) in /home/asta/public_html/store/includes/boxes/categories.php on line 13 please let me know. Thanks Quote Link to comment Share on other sites More sharing options...
natewlew Posted February 9, 2007 Author Share Posted February 9, 2007 I am not sure what that is. tep_show_category() is not something I put in the news.php. Did you make any modifications? Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
jls Posted February 12, 2007 Share Posted February 12, 2007 My breadcrumb is showing "NAVBAR_TITLE" rather than "news" when I am on the news page. Does anyone know why? (It might be only for me because I corrected the typo of "replys" to "replies" on every page and instruction that I found it - I may have missed one or two.) :blush: Also, is there a way to disable users adding comments-not even showing that viewers can add comments. I would like it just as a news section for my site, without the ability of anyone to add comments. Thanksk Quote Link to comment Share on other sites More sharing options...
obsolete Posted February 14, 2007 Share Posted February 14, 2007 Hi, I installed the latest version, and while it seems I can read and post news on my site, I get an error when I try to access news in the admin control panel. When I go to tools and click on "news", I get this error: Not Found The requested URL /catalog/admin/FILENAME_NEWS was not found on this server. Any ideas why? :huh: Thanks! Quote Link to comment Share on other sites More sharing options...
natewlew Posted February 14, 2007 Author Share Posted February 14, 2007 You will find this in the read_me.txt: Open /catalog/admin/includes/filenames.php and add this line at the bottom, right above: ?> define('FILENAME_NEWS', 'news.php'); define('FILENAME_RSS', 'rss.php'); This should fix your problem. Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
obsolete Posted February 14, 2007 Share Posted February 14, 2007 Thanks! I somehow missed that page.... :rolleyes: But now when I click "news" in the admin tools, a page comes up that just has the word "News" at the top left and a blank, grayed out drop down menu at the top right. That's it. I see no options presented to change any settings. Geez, did I miss something else? Quote Link to comment Share on other sites More sharing options...
obsolete Posted February 14, 2007 Share Posted February 14, 2007 Nevermind! When I get to the news page in admin, I have to click on the "News Blog" link now under configuration. Thanks for the help and thanks for this mod! ^_^ Quote Link to comment Share on other sites More sharing options...
osokok Posted February 14, 2007 Share Posted February 14, 2007 thanks a lot, understood. looking for it for a long time. www.international-lan.com Quote Link to comment Share on other sites More sharing options...
obsolete Posted February 14, 2007 Share Posted February 14, 2007 Well, my joy was short lived- when I go to admin / configuration / news blog it works fine. But there is still nothing in admin / tools/ news. I assume this is where the admin can post news and delete/edit user posts. This might come in handy. ;) Any ideas on what might be wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
natewlew Posted February 14, 2007 Author Share Posted February 14, 2007 Did you make any changes to the admin/news.php? Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
obsolete Posted February 15, 2007 Share Posted February 15, 2007 No, I didn't make any changes- I compared it to the untouched admin/news.php freshly downloaded, and BBEdit says they are identical. Quote Link to comment Share on other sites More sharing options...
Ronny Pries Posted February 15, 2007 Share Posted February 15, 2007 Great contribution, very good install instructions, worked straight out of the box! Thanks a lot. Is there any easy way to display the latest post on the index? Ronny Quote Link to comment Share on other sites More sharing options...
natewlew Posted February 16, 2007 Author Share Posted February 16, 2007 You could try this contrib: http://www.oscommerce.com/community/contributions,3081 It displays rss news feeds in an info box. You could display your own rss feed. It doesn't add any database tables and I don't believe it will conflict with the news blog. Quote Other great Open Source (Free) programs: (Free as in free speech not free beer) The Gimp - An image program. | Firefox - All you have to do is add the Web Developer add-on to make this web browser complete. | FileZilla - An ftp program. | Inkscape - A good program to create images with. | Thunderbird - An email program. | Openoffice.org - An office suite that is compatible with MS Office. | Abiword - Another office suite. | Audacity - A sound recording tool. | ddp's Picks | Wordpress - An easy to use blogging software. | Joomla - An easy to use CMS that has ecommerce plug-ins. | Drupal - Another CMS How do I find these programs? Google Search! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.