Jump to content
natewlew

News Blog V1.0

Recommended Posts

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!

 

I've got the same problem. Installed the contri to the letter today, but Tools->News only displays an empty page with the word News and an empty drop-down box under "Go back to: categories/products" (also empty).

 

Any help is welcome!!

 

Tnx, Frederik

Share this post


Link to post
Share on other sites

Besides being multi=lingual, could you highlight why it would be better to use this blogging package and not e.g. integrating wordpress into osCommerce ?


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

One issue I'm having with the contrib as with a couple of previous posters......breadcrumb reads NAVBAR_TITLE rather than News, should there be a 'define' entry somwhere that I missed?

Share this post


Link to post
Share on other sites

I'm curious to see News Blog in action before I install it on my site. Would someone who's already successfully installed it be so kind to post a link to your site.

 

TIA / c24

 

http://www.confero24.com

Edited by c24

Share this post


Link to post
Share on other sites

Help i get this error code.

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /var/www/vhosts/prueba.com/httpdocs/admin/includes/functions/database.php:13) in /var/www/vhosts/prueba.com/httpdocs/admin/includes/functions/database.php on line 25

Share this post


Link to post
Share on other sites
I've got the same problem. Installed the contri to the letter today, but Tools->News only displays an empty page with the word News and an empty drop-down box under "Go back to: categories/products" (also empty).

 

Any help is welcome!!

 

Tnx, Frederik

 

I think you guys have added the functions to the wrong file. There are two genreal.php's

catalog/admin/includes/functions/general.php

 

is not

 

catalog/includes/functions/general.php

 

have alook. I did the same thing. I think it must be something derren browny to do with the typoe in the text file ;)

 

I also made the same mistake with the

 

Open /catalog/admin/includes/languages/english.php

Open /catalog/admin/includes/filenames.php

 

entries.

 

Incidentally -

when you try to post a reply it says you must login, but if you click the link to the login page it doesnt work....any ideas?

Edited by Pensive

Share this post


Link to post
Share on other sites

I forgot to tick "email notification" - sorry. A bug in the forum!!!! Or a spammer DOS protection routine...who can say?

Share this post


Link to post
Share on other sites
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

 

I am intersted in both of these points! NAVBAR_TITLE most importantly - any takers?

Share this post


Link to post
Share on other sites

Abject apologies ofr the spam - it wont let me edit now either.... :(

 

I have checked the Heading_TItle in news.php - it reads correctly....what on earth is wrong? I've looked everywhere

Share this post


Link to post
Share on other sites

I just downloaded the contrib and at first it looked great, but then a couple of issues emerged.

 

1. There is no "create_rss.php" included in the distribution.

2. The breadcrumb trail is messed up, I get NAVBAR_TITLE

3. In IE7 I get an error message stating that the rss feed contains erroneous code. In FF i get the feed, but the swedish characters is messed up.

 

Problem #1 is solved by downloading this code from http://shiplinux.com/extra/create_rss.php.txt and saving it to a file named create_rss.php in your /catalog

<?php
require('includes/application_top.php');

  //$filename = DIR_FS_DOCUMENT_ROOT . FILENAME_RSS;
//if (is_writable($filename)) {

 // open a file pointer to an RSS file
 $fp = fopen (DIR_FS_DOCUMENT_ROOT . FILENAME_RSS, "w");

 // Now write the header information
 fwrite ($fp, "<?xml version='1.0' ?><rss version='2.0'><channel>”);

 fwrite ($fp, “<title>Your Title</title>");

 fwrite ($fp, "<link>" . HTTP_SERVER . "</link>");

 fwrite ($fp, "<description>Your description</description>");

 fwrite ($fp, "<language>en-us</language>");

 fwrite ($fp, "<docs>" . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_RSS . "</docs>");

  $news_query_raw = tep_db_query("select * from " . TABLE_NEWS . " order by id desc limit 10");
   while ($content_rec = tep_db_fetch_array($news_query_raw)) {
	fwrite ($fp, "<item>");

	$headline = $content_rec['name'];
	$date = 'Date: ' . tep_date_short($content_rec['date_created']);
	$content_1 = substr($content_rec['content'], 0, 250);
	$content = strip_tags($content_1);
	if (strlen($content_rec['content']) > 250) {
		$content = $content . "....";
	}
	fwrite ($fp, "<title>$headline</title>");
	fwrite ($fp, "<pubDate>$date</pubDate>");
	fwrite ($fp, "<description>$content</description>");
	$item_link = HTTP_SERVER . DIR_WS_CATALOG . FILENAME_NEWS . "?article=" . $content_rec['id'];
	fwrite ($fp, "<link>$item_link</link>");

	fwrite ($fp, "</item>");
}

   fwrite ($fp, "</channel></rss>");
fclose ($fp);

  tep_redirect(tep_href_link(FILENAME_NEWS, 'update=true'));
// } else {
  // tep_redirect(tep_href_link(FILENAME_NEWS, 'update=false'));
// }

?>

 

Problem #2 is solved by adding the line "define('NAVBAR_TITLE', 'News');" to your shops language files

 

Now edit the following files on your server:

Open /catalog/includes/languages/english.php and add this line at the bottom, right above: ?>

define('VIEW_ALL', 'View All');
define('NEWS', 'News');
define('NAVBAR_TITLE', 'News');

 

See the navbar_title in the end? That does it.

 

Is there anyone that has problems with the RSS feed? I downloaded the News blog 1.4 update wich is supposed to solve the RSS feed problems but didn´t get any other result than the issue above.

 

I hope that this helps someone, and I would really appreciate if anyone could help me with the rssfeed problem.

 

/Mattias

Edited by mrhandley

Share this post


Link to post
Share on other sites

I just realized that natewlew stated in the instructions: "It has a static automatic RSS feed function. When you write a new article all you have to do click "Create RSS" and your done." on the contributions webpage.

 

Thats odd, I do not have a "create rss" button/link either in admin or in the shop. Anyone else that has it?

 

/Mattias

Share this post


Link to post
Share on other sites

Sorry for the triple posting, but I cant edit my posts, guess it is the forum sttings.

 

Anyway, feedvalidator.org got me going in the right direction. The feed error messages shows up when there are swedish characters in the rss feed.

 

Here is the error message from feedvalidator.org:

line 11, column 46: 'utf8' codec can't decode bytes in position 430-432: invalid data (maybe a high-bit character?) [help]

 

Since utf8 isn´t really compatible with swedish characters I guess that there is where the problem comes from.

 

How do I change from utf8 to something that supports swedish (international) characters?

 

The admin and user interfaces sure are multilingual, but the rss feed isn´t...

 

/Mattias

Share this post


Link to post
Share on other sites

My question is a bit more simple....the RSS feed is rather confusing to me. Is there a way for me to have a section on my homepage that shows the first paragraph of a new article, and then an option to "Click here to keep reading"? I understand that is how an RSS works, but I don't know how to integrate an RSS feed from my news.php page into my index.php page.

 

Thanks.

Edited by Snoboreders

Share this post


Link to post
Share on other sites

I havent looked in to the integrating possibilities with news blog, but one idea is to integrate an rss reader and show it there.

 

Look at:

http://www.oscommerce.com/community/contributions,2787/

http://www.oscommerce.com/community/contri...ns,3081/page,13

http://www.oscommerce.com/community/contri...ns,3657/page,13

 

For some rss readers. They will let you take the feed from any rss source and put it in an infobox on your site

 

/Mattias

Share this post


Link to post
Share on other sites

Hi, does anyone know how to change the number of post titles that show up on the main page? Right now it shows 10 blog/news posts I just want it to show around 5. I looked through the files and I can't seem to find the place to change it. Please help, I would really appreciate it. Thanks,

Danny

Share this post


Link to post
Share on other sites

I just downloaded the contrib and at first it looked great, but then a couple of issues emerged.

 

2. The breadcrumb trail is messed up, I get NAVBAR_TITLE

 

Adding the NAVBAR title define() to includes/languages/english/news.php wasn't enough to fix this issue for me, I had to change the order of 2 lines in /news.php:

 

/* swap order of lines...

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEWS, '', 'SSL'));

*/

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWS);

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_NEWS, '', 'SSL'));

?>

 

And that did it.

 

Anybody else find the 'Edit' button on the admin panel confusing? I changed it to 'Save'.

 

Sean

Share this post


Link to post
Share on other sites

Great contribution, but I have 2 issues.

 

1. When soomeone posts a reply, they get the following message:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/a/g/i/agiftwithin/html/argento/templates/agiftwithin/main_page.tpl.php:3) in /home/content/a/g/i/agiftwithin/html/argento/includes/functions/general.php on line 57

 

Does anyone know why?

 

2. If you re fresh the error page, it keeps adding the same comment on to the post, but when I go in the admin to delete the extra replies, it deletes the post itself.

 

I'm stumped. Anyone?

Share this post


Link to post
Share on other sites

For this module, what is the address I'd type into an RSS reader I installed in order for the reader to pick up everything I type in my News Blog?

Share this post


Link to post
Share on other sites

How would I insert my feed into this link of code..the code comes from this RSS Readerhttp://www.oscommerce.com/community/contributions,2787/:

 

src="http://convert.rss-to-javascript.com/scroll/?desc=1&font=Times New Roman&src=http%3A%2F%2Fwww.jamaica-gleaner.com%2Ffeed%2Frss.xml&target=-blank&rss_title=rss&pause=1&type=1">

 

Because I'm using the News Blog V 1.4 wouldn't it be mysite.com/news/rss.xml?

 

Thanks for the help,

Chris

Share this post


Link to post
Share on other sites

I think I got the rest working, but I see to have a new problem now. When someone submits a reply, they get a blank page.

 

If I go to news.php, it looks fine, but after replying, it's blank. The url shows this: /news.php?action=reply&article=4

 

is that correct?

 

I did have to edit a lot because I am using BTS. But does anyone know why it shows blank?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×