Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NewsDesk v1.48 Support


241

Recommended Posts

Steve, I just tried upgrading newsdesk_v_1.48.1b to newsdesk_v_1.48.2. I only noticed the sql add " newsdesk_article_url_name varchar(255) default NULL, " which I added in the correct position.

 

Now I have on my article listing 2 dates in the listing

 

before - Headline, Date

now- Headline, Date, Date

 

Was that the only sql change? and of course I copied the new files over.

I am trying this on my local server first.

If you go to my site, click united states and just visualize 2 date collums being listed.

I'm not a coder just a splicer.

Link to comment
Share on other sites

  • Replies 548
  • Created
  • Last Reply

Top Posters In This Topic

Steve, I just tried upgrading newsdesk_v_1.48.1b to newsdesk_v_1.48.2.

there was an issue with v1.48.2 you should use v1.48.2b

 

before - Headline, Date

now-    Headline, Date, Date

 

do you have two Date in the header bar and/or two columns with the date.

did you do a file compare and update or a straight swap.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I have just found three issues in admin/includes/languages/english/newsdesk.php

 

a double define which can be removed from line #26

define('TEXT_NEWSDESK_CONTENT', 'Content:');

 

a double define which can be removed from line #31

define('TEXT_NEWSDESK_DATE_AVAILABLE', 'Date Available:');

 

and comment out line #47

define('TEXT_NEWSDESK_ADDED_LINK', '<a href="http://%s" target="blank"><u>' . $newslink . '</u></a>');

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Sorry it is 1.48.2b, I read the version # inside the \newsdesk_v_1.48.2b\newsdesk_v_1.48.2

 

do you have two Date in the header bar and/or two columns with the date.

 

2 dates in the header bar and 2 collums of dates

 

I think it may be with the data in the db newsdesk_article_url_name data reads Null in the record field when it should be blank.

 

How would you write the script just to upgrade the db I have too much entries there to wipe it out.

 

Also I did not install the other languages except english.

 

Yes I did a straight swap.

Edited by RI Downlink

I'm not a coder just a splicer.

Link to comment
Share on other sites

Hello Steve,

 

I have finally got it working by commenting out

a total of THREE functions redeclared in the

newsdesk_general.php which were already in the

general.php.

 

I had to keep looking at the logs to eleminate one by one

 

 

I guess this must be the problem with Terrencel

as well.

 

Many thanks for the help and for the nice enhancement

to the contribution

 

I shall copy this on the forum

Link to comment
Share on other sites

Hello Steve,

 

I have finally got it working by commenting out

a total of THREE functions redeclared in the

newsdesk_general.php which were already in the

general.php.

 

I had to keep looking at the logs to eleminate one by one

 

 

I guess this must be the problem with Terrencel

as well.

 

Many thanks for the help and for the nice enhancement

to the contribution

 

I shall copy this on the forum

can you post the functions so as to benefit others and so that I can see if these functions were added to general.php to fix issues with your previous newsdesk install.

 

I have been unable to replicate this issue from taking the contribution and installing it to a fresh cart, so my thinking is that this must be an addition the general.php to fix issues with the previos install of newsdesk

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

HEre are the three FUNCTIONS with only ONE ERROR

message (from E mail ) as i don't get them any more

which were already declared in general.php

 

[[Thu Jun 24 08:36:40 2004] [error] PHP Fatal error: Cannot redeclare tep_get_uploaded_file() (previously declared in /home/affili43/affili43-www/catalog/admin/includes/functions/general.php:778) in /home/affili43/affili43-www/catalog/admin/includes/functions/newsdesk_general.php on line 490

 

+++++++++++++++++++++++++++++++

// -----------------------------------------------------------------------

// upload file function

// -----------------------------------------------------------------------

/* function tep_get_uploaded_file($filename) {

if (isset($_FILES[$filename])) {

$uploaded_file = array(

'name' => $_FILES[$filename]['name'],

'type' => $_FILES[$filename]['type'],

'size' => $_FILES[$filename]['size'],

'tmp_name' => $_FILES[$filename]['tmp_name']

);

} elseif (isset($GLOBALS['HTTP_POST_FILES'][$filename])) {

global $HTTP_POST_FILES;

 

$uploaded_file = array(

'name' => $HTTP_POST_FILES[$filename]['name'],

'type' => $HTTP_POST_FILES[$filename]['type'],

'size' => $HTTP_POST_FILES[$filename]['size'],

'tmp_name' => $HTTP_POST_FILES[$filename]['tmp_name']

);

} else {

$uploaded_file = array(

'name' => $GLOBALS[$filename . '_name'],

'type' => $GLOBALS[$filename . '_type'],

'size' => $GLOBALS[$filename . '_size'],

'tmp_name' => $GLOBALS[$filename]

);

}

 

return $uploaded_file;

} */

// -----------------------------------------------------------------------

 

 

// -----------------------------------------------------------------------

// return a local directory path (without trailing slash)

// -----------------------------------------------------------------------

/* function tep_get_local_path($path) {

if (substr($path, -1) == '/') $path = substr($path, 0, -1);

return $path;

} */

// -----------------------------------------------------------------------

 

 

// -----------------------------------------------------------------------

// the $filename parameter is an array with the following elements:

// name, type, size, tmp_name

// -----------------------------------------------------------------------

/* function tep_copy_uploaded_file($filename, $target) {

if (substr($target, -1) != '/') $target .= '/';

$target .= $filename['name'];

move_uploaded_file($filename['tmp_name'], $target);

chmod($target, 0777);

} */

// -----------------------------------------------------------------------

 

 

/*

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Link to comment
Share on other sites

HEre are the three FUNCTIONS with only ONE ERROR

message (from E mail ) as i don't get them any more

which were already declared in general.php

Thank you for posting those function, from this information I have worked out that these are not functions that are in general.php as default but that they are additional functions added to general.php to resolve issues with previous versions of Newsdesk.

 

So therefore the issues are not with the contribution, which I have set out to make independent to the default files, but rather the issues have been brought about by resolves to issues with previous versions.

 

If you have had a previous version of newsdesk installed then my advice remains the same to remove the previous version of newsdesk prior to install of my version, unfortunately as you have found out there were resolves made with the previous version where code was placed in the general.php.

 

I believe that this code should never have been placed in the general.php in the first instance and that it should have been placed in to the newsdesk_general.php which was provided by the contribution.

 

Hopefully with your resolving your issue it will aid others.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Sorry it is 1.48.2b, I read the version # inside the \newsdesk_v_1.48.2b\newsdesk_v_1.48.2

 

do you have two Date in the header bar and/or two columns with the date.

 

2 dates in the header bar and 2 collums of dates

 

I think it may be with the data in the db newsdesk_article_url_name data reads Null in the record field when it should be blank.

 

How would you write the script just to upgrade the db I have too much entries there to wipe it out.

 

Also I did not install the other languages except english.

 

Yes I did a straight swap.

I have just setup a fresh cart and installed the contribution as posted to the contributions area this went without issue, therefore there must be a mistake with the setup that you have.

 

I have only the one date header and date column.

 

Before you can have two columns with dates there would be a requirement for two calls to that function and information.

 

You say that you had information in your database that you did not wish to write over with the new sql but that you wish to have the additional database entries for the url naming part, this would just require addition of the fields for the url part of the sql.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

hi.

 

I have other problem, which is....

 

after installing all is OK but when I try to add review to News it is not showned in page.

 

In admin it is but there is no NEWS that it is connected with ... so after approval nothing changes on client page. No new reviews added.

 

I have to change

newsdesk_id

for

reviews_id

in table

 newsdesk_reviews

AND THEN ALL IS OK.

 

 

can you help me ... or at least try what may be wrong ??

Link to comment
Share on other sites

helpONline

 

Is it the same issue as here http://www.oscommerce.com/forums/index.php?sho...ndpost&p=392945

 

Which version are you using is it v1.48.2

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

v1.48.2b

and the answer to my question about the issue is it the same.

 

Please read the forum rules in regards to advertising external site links in your signature.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

OK I missed a line update for the catalog/newsdesk_reviews_write.php

line #112 the product_id should be newsdesk_id so that the code looks like this

<?php echo tep_draw_form('newsdesk_reviews_write', tep_href_link(FILENAME_NEWSDESK_REVIEWS_WRITE, 'action=process&newsdesk_id=' . $HTTP_GET_VARS['newsdesk_id']), 'post', 'onSubmit="return checkForm();"'); ?>

 

I will ammend the file an update the contributions section.

 

thank you for pointing this out to me, the issue had been resolved previos, however I had missed a line update in the files posted to the contributions area.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Hi, I have just installed the newsdesk 1.48b on one of the latest version of CVS oscommerce dated June 9th 2004. I have two problems:

 

1. when I go to write reviews, I get an empty page coming up!! nothing shows up when I click on write reviews botton!!

 

I can read reviews fine!!

 

Is this possibly because people have to be logged in, in order to write reviews??? why does blank page come up!!

 

2. when I click on any of the links in the "news Category" box in the right column (the ones that do have article in them), page comes up with NOTHING in the middle, and the left column (looking normal), with right column showing up in the middle of the page of the screen!! it doesn't load the categories!!!

 

 

for category box problem, the following link does not work:

http://www.???.com/catalog/newsdesk_index.php?newsPath=10

 

for the review writing, the following link does not work:

 

http://www.???.com/catalog/newsdesk_review...p?newsdesk_id=4

 

Please help. I need to get this going real fast.

 

thanks very much.

 

I'd appreciate your help.

Link to comment
Share on other sites

Hi, I have just installed the newsdesk 1.48b on one of the latest version of CVS oscommerce dated June 9th 2004. I have two problems:

 

1. when I go to write reviews, I get an empty page coming up!! nothing shows up when I click on write reviews botton!!

 

I can read reviews fine!!

 

Is this possibly because people have to be logged in, in order to write reviews??? why does blank page come up!!

 

2. when I click on any of the links in the "news Category" box in the right column (the ones that do have article in them), page comes up with NOTHING in the middle, and the left column (looking normal), with right column showing up in the middle of the page of the screen!! it doesn't load the categories!!!

 

 

for category box problem, the following link does not work:

http://www.???.com/catalog/newsdesk_index.php?newsPath=10

 

for the review writing, the following link does not work:

 

http://www.???.com/catalog/newsdesk_review...p?newsdesk_id=4

 

Please help. I need to get this going real fast.

 

thanks very much.

 

I'd appreciate your help.

To put this in the most simple terms the contribution was made compatible as an update from an earlier version of the osCommerce to be workable on an 2.2MS2 version this would have more backwards compatability than forwards compatability.

 

the cvs versions have new code such as search friendly urls to which this contribution was not written also there have been changes to some of the functions.

 

Therefore the conclusion is that this contribution has not been forwrds compatible coded and would require some rewritten code to function to the latest cvs.

 

I see no point in doing this as if any rewrite were to be undertaken it would be to commit to version 3 leaving this version of the contribution to 2.2MS2

 

I have hardly gotten this contribution up to running on 2.2MS2 so have no plans to even try to make it work on cvs versions.

 

Having said that I have gotten it to work on the latest snapshot with some recode but have no plans to take it further as I am commited to working on other contributions.

 

If you place your cvs version in debug mode with errors switched on you will be able to see the function calls that are not working.

 

cvs versions are for developers not for normal users.

Edited by 241

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

well, thank you for the note! it's better than no note!

having said that, you mentioned that you have gotten it to work on the latest version! that's great! In fact if you read my problem with installation of the newsdesk, you'll see that it has also worked fine for me also except two sections of it!! even the sticky function and all the rest work fine!! So, I'd greatly appreciate your help, as I'm VERY interested in this contribution.

 

HERE IS one of the errors I get (debug on) when I click on the "news categories" box clicking the link called stickies (1)..... ===>

 

 

Warning: array_map(): The first argument, 'tep_string_to_int', should be either NULL or a valid callback in \catalog\includes\functions\newsdesk_general.php on line 43

 

and this was my problem with it==>

 

2. when I click on any of the links in the "news Category" box in the right column (the ones that do have article in them), page comes up with NOTHING in the middle, and the left column (looking normal), with right column showing up in the middle of the page of the screen!! it doesn't load the categories!!!

 

 

SECOND ERROR MESSAGE:

Fatal error: Call to undefined function: tep_session_is_registered() in c:\SP\artwww\health\shops\newsdesk_reviews_write.php on line 5

 

and here was the original problem with it===>

1. when I go to write reviews, I get an empty page coming up!! nothing shows up when I click on write reviews botton!!

 

I can read reviews fine!!

 

Is this possibly because people have to be logged in, in order to write reviews??? why does blank page come up!!

 

 

HOPE this helps.

 

You mentioned that you did get a version of it to work in the latest cvs. So, I'd greatly appreciate your help. The above are the only two problems I have! it's close to working!

 

email me to: [email protected] if you wish. thanks

Link to comment
Share on other sites

a quick addon to my previous comment please:

 

here's the "/includes/functions/newsdesk_general.php" error line 43:

 

$newsPath_array = array_map('tep_string_to_int', explode('_', $newsPath));

 

and here's the writing review error in "/catalog/newsdesk_reviews_write.php" line 5:

 

if (!tep_session_is_registered('customer_id')) {

 

 

no clue about the first one, but it seems that in the second error (review writing) the newsdesk is requiring the customer to be logged in?? and if not it's giving an empty page in response!? yes/no?

 

well, I tried to provide as much info for you guys, now from this point I'm just awaiting for your replies if any... support appreciated.

 

thanks

Link to comment
Share on other sites

please follow up with my last two comments as they're just continuing informations!! :)

 

Well, it turns up that when I commented out the line 5 and around it, of review write.php and pressed to write a review, it would work (at least the page for writing a review comes up) don't know if it will go through yet but...

 

so have I this way solved the requirement for a customer having to be logged on otherwise blank page???

 

is there a way to still require them to log in in order to write a review rather than a blank page if they're not logged on?

 

the other issue still remains! could that other issue be a sql problem??

Link to comment
Share on other sites

ok tried writing some comments after commenting out around line 5 of newsdesk_reviews_write.php ..... and it didn't work! it didn't get posted since I think I was not logged in as anybody..... so it's still a problem!

 

at least we know where it is right!

 

So Steve help!!!!

Link to comment
Share on other sites

Has anyone of you guys tried to install NewsDesk v.1.48 with the latest BTS and the fancy 32-final theme. I cannot allign the toolbars of the NewsDesk contribution. Any ideas. I tried editing the 32-final content dir by making the appropriate file changes but still no result. Thanks for the time and consideration.

 

Regards,

Vladimir

---------------------------

One OS to fool them all

One browser to find them

One email client to bring them all

And through security holes, blind them...

Link to comment
Share on other sites

a quick addon to my previous comment please:

 

here's the "/includes/functions/newsdesk_general.php" error line 43:

 

$newsPath_array = array_map('tep_string_to_int', explode('_', $newsPath));

 

and here's the writing review error in "/catalog/newsdesk_reviews_write.php" line 5:

 

if (!tep_session_is_registered('customer_id')) {

 

 

no clue about the first one, but it seems that in the second error (review writing) the newsdesk is requiring the customer to be logged in??  and if not it's giving an empty page in response!? yes/no? 

 

well, I tried to provide as much info for you guys, now from this point I'm just awaiting for your replies if any... support appreciated.

 

thanks

Firstly I have already stated that I do not intend to make changes for cvs versions.

 

I will however answer the two posted questions and that is all.

 

ANSWER 1:

 

The reason for the right column appearing in the middle is due to the array map call not being filled thus the array is collapsed taking away the information that would fill the center pushing the right column to the right.

 

This has been replaced by the code below

 

// Parse and secure the newsPath parameter values
function newsdesk_parse_category_path($newsPath) {
// make sure the category IDs are integers
$newsPath_array = tep_array_filter(explode('_', $newsPath), 'is_numeric');

 

ANSWER 2:( reason is that customer is required login in order to get customer id or name for the review)

 

tep_session_is_registered is now replaced by the code below.

 

<?php

require('includes/application_top.php');

   if ($check_session == true) {
     if ( ($osC_Customer->isLoggedOn() == false) || ($id != $osC_Customer->id) ) {
       return 0;
     }
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}

 

Be warned that this is only part of the issue and that you may encounter more issues with the review write side of things due to using the cvs version.

 

the code changes I have given are based on the latest snapshot

oscommerce_snapshot-20040705

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

I noticed a missing piece of code for the admin newsdesk.

The missing piece of code means that no back button, new category button or new news item button was made available when creating a new news category.

 

Admin/newsdesk.php

 

Lines# 1742 to 1745

 

  } else { // create category/news info
	 $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');
	 $contents[] = array('text' => sprintf(TEXT_NO_CHILD_CATEGORIES_OR_story, $parent_categories_name));
 }

 

replace with this code

 

  } else { // create category/news info
	 $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');
// Wolfen added buttons BOF
 if ($cPath) $contents[] = array(
 'align' => 'center',
 'text' => '<a href="' . tep_href_link(FILENAME_NEWSDESK, $cPath_back . '&cID=' . $current_category_id) . '">' . 
tep_image_button('button_back.gif', IMAGE_BACK) . '</a> ');
if (!$HTTP_GET_VARS['search']) $contents[] = array(
 'align' => 'center',
 'text' =>'<a href="' . tep_href_link(FILENAME_NEWSDESK, 'cPath=' . $cPath . '&action=new_category') . '">' . tep_image_button('button_new_category.gif', 
IMAGE_NEW_CATEGORY) . '</a> <a href="' . tep_href_link(FILENAME_NEWSDESK, 'cPath=' . $cPath . '&action=new_product') . '">' . tep_image_button('button_new_news_item.gif', IMAGE_NEW_STORY) . '</a>');
// Wolfen added buttons EOF
	 $contents[] = array('text' => sprintf(TEXT_NO_CHILD_CATEGORIES_OR_story, $parent_categories_name));
 }

 

I have made an updated version available in the contributions area here:

 

NewsDesk Updated v1.48.2b

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

******NewsDesk v1.48.1 update******

 

I have now release NewsDesk v1.48.1 update to the contributions area.

 

This is the complete package.

 

- updated code and fixed a lot of bugs.

- fixed the I.E.6 crash issue.

 

Hello Steve,

 

I love this contribution but my IE crashes sometimes when adding an article. I have an old version with several modifications so is difficult for me to update. How did you manage to avoid IE crashing?? o at least where can I search the problem??

 

Thanks in advance.

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...