Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

News Blog V1.0


natewlew

Recommended Posts

Hey guys...working on adding the v1.5 of this contribution, getting the following error when trying to access the news.php:

 

Parse error: syntax error, unexpected $end in /home/content/j/m/c/jmcadoo32/html/news.php on line 343

 

Any idea? I am stumped, probably something simple looking me in the face.

Link to comment
Share on other sites

Hey guys...working on adding the v1.5 of this contribution, getting the following error when trying to access the news.php:

 

Parse error: syntax error, unexpected $end in /home/content/j/m/c/jmcadoo32/html/news.php on line 343

 

Any idea? I am stumped, probably something simple looking me in the face.

3 posts above

Edited by alexflasher

Sorry for my english...

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

I just got this contrib to work, but im still having 1 issue....When you click the News link...my site goes white but still shows all my links on homepage...and when you click on the artical title link...it takes you back to the site news page to comment on it. it seems it should be doing this to begin with....any ideas on how to fix this?

Link to comment
Share on other sites

Hy Guys!

 

Im a german user and i want to use this contrib! I've installed it correctly but when i click on "News" in the Admin panel i got the message: "The requested URL was not found on this server." Can anyone help me why this error occurs? Thx 4 Help!

 

cu

Link to comment
Share on other sites

  • 4 weeks later...

I just got this contrib to work, but im still having 1 issue....When you click the News link...my site goes white but still shows all my links on homepage...and when you click on the artical title link...it takes you back to the site news page to comment on it. it seems it should be doing this to begin with....any ideas on how to fix this?

 

Hope it can help you.

 

About you 2nd question,open news.php in /catalog,find this line: <td class="smallText" align="right" colspan="2"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?>    </td>

 

you'll see there is only one } right below it,add one } before ?>,it looks like:

<?php

}

}

?>

 

Hi bryn28,

hi petlv,

 

the solution for the "Unexpected End of File"-Problem (see petlv an his post above) ist not good. The art like you, petlv, have done it causes the problem with the broken all-news-view.

I have found the problem. Please delete the second "}" (see petlv's solution) and add it instead after this code (about line 60-65):

 

<?php
   if ($HTTP_GET_VARS['article'] == true) {
   $id = (int)tep_db_prepare_input($HTTP_GET_VARS['article']);
   $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 . "'");

   $news = tep_db_fetch_array($news_query);

 

So the right code is:

 

<?php
   if ($HTTP_GET_VARS['article'] == true) {
   $id = (int)tep_db_prepare_input($HTTP_GET_VARS['article']);
   $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 . "'");

   $news = tep_db_fetch_array($news_query);
 }
?>

 

If you have any quastions, please ask... I will help you if I can ;)

 

By the way - I hope, my english is not to bad...

Best regards

 

Paul

[

Link to comment
Share on other sites

  • 1 month later...

Hello everyone,

 

I've installed this contribution succesfully and it's working perfect. There's just one thing, I really would like to use seo urls with it. I've installed Ultimate SEO Urls and tried to add a line to .htaccess to get seo urls for news blog too. This is what I've tried:

 

RewriteRule ^(.*)-blog-(.*).html$ news.php?article=$2&%{QUERY_STRING}

 

But unfortunatly it's not working this way. Does anyone know what to do or another solution?

Link to comment
Share on other sites

I have done everything as told in this addon setup but however I get these two errors at the admin panel,please help,I used "NEWS BLOG V1.5+" addon

 

"News Article Title

Fatal error: Call to undefined function tep_get_news_name() in C:\wamp\www\catalog\admin\news.php on line 195"

 

 

"Replies: 0

Fatal error: Call to undefined function tep_reply() in C:\wamp\www\catalog\admin\news.php on line 315"

 

 

Any suggestions what should i do to get rid of these errors,please mail me if possible.

Link to comment
Share on other sites

I have got this installed on Cre Loaded version of oscommerce. It all seems to have gone ok and I have box installed in the right column which shows the latest post with link.

 

The trouble is that when you click the link to open the news.php it just opens a blank page... I get the impression it is because I am using a template system and have placed the box file inside the template/boxes area. to be honest though that may not be the issue at all as I am not good with php.

 

Does anyone have any ideas why this would happen?

Link to comment
Share on other sites

  • 2 weeks later...

Hi all,

 

I have this contribution working 100% after a bit of work and persistence, there is a problem here that is people upload the packages with bugs in, the } in news.php alone took me 2hours to figure out, and the answer is in this thread.

 

Regarding the rss.php i took my time to learn more about feeds stuff, here are some links i really advise for people who are starting on this like me:

 

-> Hot to make a feed basics

 

-> Feed Validating Org

 

According to feedvalidator.org i made this small changes to the echo of rss.php:

lines 30-35

 

echo "<?xml version='1.0' encoding='iso-8859-1'?> 
 <rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
 <channel>\n

    <title>" . NEWS_TITLE . "</title>\n";

 

after this is done you can copy paste your feedlink to field validator and if it's 100% compliant you can also get a nifty logo for your feeds certifications and insert it in your news.php near the feed button.

 

How to check if your feed is valid: www.feedvalidator.org -> insert http://www.YOURSITE.COM/catalog/rss.php and click the Validate button.

 

I'm going to stick to this contribution, because i have tested most rss articles contribs and this is the more stable and complete imo)

 

And by the way: The feed is showing properly in IE don't blame Microsoft this time(this is an exception to the rule)

 

To-Do-List to be considered for this contribution:

-> Going to sanitize the code (you can do it if you have Sam's sanitize contrib) and change all $HTTP_GET_VARS for $_GET and same with POST (avoinding querystring attacks)

-> Going to install (kissMT and USU5 contribs) in news.php and if possible in articles (the last one perhaps is tricky)

 

 

Question now is how to insert this bit right before <channel> in rss.php to make the code 100% cool according to www.feedvalidator.org:

<atom:link href="http://dallas.example.com/rss.xml" rel="self" type="application/rss+xml" />

Link to comment
Share on other sites

Hi all,

 

I have this contribution working 100% after a bit of work and persistence

 

Question now is how to insert this bit right before <channel> in rss.php to make the code 100% cool according to www.feedvalidator.org:

<atom:link href="http://dallas.example.com/rss.xml" rel="self" type="application/rss+xml" />

 

im referring to News Blog V 1.0 http://addons.oscommerce.com/info/4808/v,22

 

Thanks in advance

Link to comment
Share on other sites

Hello,

 

Is there any way to insert recaptcha to news blog? I'm using the Recaptcha module for oscommerce, but I can't seem to make it work... Did anyone figure this out? I hope so, because I'm getting a lot of spam (I don't want to moderate/make users login first)

Edited by helllen
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hi,

I get this error when I press tools/news

 

"/admin/FILENAME_FORBIDEN"

 

What can this be ?

 

M@rio

 

Check your file permissions, and check also catalog/includes/filenames.php, catalog/admin/includes/filenames.php

 

In the meanwhile i'm going to post here some

 

List of BUGS not sorted in this contribution:

 

-> usage of HTTP_POST_VARS and HTTP_GET_VARS

 

-> E_NOTICE Error Count: 5

Error: Undefined index: action

File: news.php

Line: 26

Error: Undefined index: article

File: news.php

Line: 70

Error: Undefined variable: news

File: news.php

Line: 82

Error: Undefined variable: news

File: news.php

Line: 83

Error: Undefined variable: news

File: news.php

Line: 84

 

-> The breadcrumbs of News Blog, are showing in other unrelated pages of the website (bad parameter passing), for instance in contact_us.php

 

Note: If you want to install a product RSS Feed like RSS Feeds v2.2 you can just rename the following from this contribution:

 

catalog/includes/filenames.php FILENAMES_RSS change to FILENAMES_RSS_NEWS

catalog/includes/languages/yourlanguage.php

BOX_INFORMATION_RSS change to BOX_INFORMATION_RSS_NEWS

in catalog/ rss.php change to rss_news.php

Link to comment
Share on other sites

Hi Francys.

I checked the authority of the files, which looks o.k.

 

When I try to open the news.php I get:

"Parse error: syntax error, unexpected $end in /var/www/virtual/suspensus.de/htdocs/vinyl/news.php on line 342" (which is the last statment of the php)

 

Filenames.php look ok to me.

 

The link in the admin tries to open "http://xx.de/admin/news.php?osCAdminID=6ed812fcd219b04a81c27e5febdb88bd"

which ends in a

"admin/FILENAME_FORBIDEN?osCAdminID=6ed812fcd219b04a81c27e5febdb88bd"

 

File not found

Link to comment
Share on other sites

Hi analogixx,

Well this contribution has many bugs, the instructions aren't all accurate, and i think there isn't much support, the constants for instance return many errors in kissErrorHandler and i even renamed them because i am using rss.php for another contribution, so in conclusion you can check it with one of the contribution posters or have another contribution that basically does the same or resolve usingKissErrorHandler.

cheers

Link to comment
Share on other sites

Hi Francys.

I checked the authority of the files, which looks o.k.

 

When I try to open the news.php I get:

"Parse error: syntax error, unexpected $end in /var/www/virtual/suspensus.de/htdocs/vinyl/news.php on line 342" (which is the last statment of the php)

 

Filenames.php look ok to me.

 

The link in the admin tries to open "http://xx.de/admin/news.php?osCAdminID=6ed812fcd219b04a81c27e5febdb88bd"

which ends in a

"admin/FILENAME_FORBIDEN?osCAdminID=6ed812fcd219b04a81c27e5febdb88bd"

 

File not found

 

I have installed this contribution but i am getting the same error :

 

Parse error: syntax error, unexpected $end in /home/www/web298/html/news.php  on line 343

 

After some search i have noticed that there is a if statement on line 60 but a closing bracket is forgotten on line 65. After closing it, it works.

Edited by kahlenberg
Link to comment
Share on other sites

  • 2 weeks later...

Just a quick question. I'm not sure if I should if I should post it here or in General Support but since it involves 'News Blog' here goes:

 

I've changed the look of my '/catalog/news.php/' file to look like this:

 

2lduk3d.jpg

 

All of my individual articles/posts have a picture.

 

Is there a way I can get the corresponding the article picture to display within that orange image placeholder on the 'news.php/' page?

Link to comment
Share on other sites

  • 4 weeks later...

I have installed the News Blog add-on and have a few problems. I have followed the instructions to the letter, and uploaded all the necessary files. When I click on tools > news.....I have no link to create a new article. it shows the test article, but nothing else. Also, on the front end, when I click article 1 it displays 'no page found'. Everything seems to be working except these two functions.

 

Any help would be greatly appreciated. This add-on seems perfect for what I need, just can't get it to work properly.

 

the site URL is http://tinyurl.com/2f6b3je

 

screenshot.png

Link to comment
Share on other sites

I have installed this contribution without too much trouble. i have tested adding, replying to articles, etc and all seems to work ok. However, when i open the page that lists all news articles i get this comment at the top of the page:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ......../includes/functions/database.php on line 99

 

Any ideas what this means?

 

Ta,

Richard

Link to comment
Share on other sites

I have installed this contribution without too much trouble. i have tested adding, replying to articles, etc and all seems to work ok. However, when i open the page that lists all news articles i get this comment at the top of the page:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in ......../includes/functions/database.php on line 99

 

Any ideas what this means?

 

Ta,

Richard

 

 

disregard. i've figured it out!

Link to comment
Share on other sites

Sorry guys, but i have found 2 new problems.

1) Even though i have more than 1 News/Article, there is only 1 rss feed icon displayed in the page that shows the list of news/articles (in /news.php). If i click on the rss feed icon it does send me to the article susbcription page, but it only shows the first article that i added to the site.

Should i have an rss feed displayed for each article? or how do i get it to work so each article can be subscribed to?

 

2) On the main page where all of the news/articles are displayed (/news.php) there is a 'view all' button. however, when i press it the page doesn't display any news/articles. Any ideas?

 

Cheers,

 

Richard

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...