Jump to content
Sign in to follow this  
241

NewsDesk v1.48 Support

Recommended Posts

I have an important question: How do I give my customers a link to something in my own store? It strips out any html I give it, and the "URL to outside resource" just redirects them to my index.php page if I give them a link to anything on my own site.

Share this post


Link to post
Share on other sites

Can anyone help me to fix "newsdesk_index.php" as the file cannot generate and show my newly added news on the "HOTSNEWS" page? Any tips or ideas? What's wrong with it? Many many thanks and I really need this function to run my web. Thanks thanks!

 

Here is my link:

My Webpage

 

Below is the "newsdesk_index.php"

 

<?php

require('includes/application_top.php');

require('includes/functions/newsdesk_general.php');

 

// set application wide parameters

$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");

while ($configuration = tep_db_fetch_array($configuration_query)) {

define($configuration['cfgKey'], $configuration['cfgValue']);

}

// calculate category path

if ($HTTP_GET_VARS['newsPath']) {

$newsPath = $HTTP_GET_VARS['newsPath'];

} elseif ($HTTP_GET_VARS['newsdesk_id'] && !$HTTP_GET_VARS['manufacturers_id']) {

$newsPath = newsdesk_get_product_path($HTTP_GET_VARS['newsdesk_id']);

} else {

$newsPath = '';

}

 

if (strlen($newsPath) > 0) {

$newsPath_array = newsdesk_parse_category_path($newsPath);

$newsPath = implode('_', $newsPath_array);

$current_category_id = $newsPath_array[(sizeof($newsPath_array)-1)];

} else {

$current_category_id = 0;

}

 

if (isset($newsPath_array)) {

$n = sizeof($newsPath_array);

for ($i = 0; $i < $n; $i++) {

$categories_query = tep_db_query(

"select categories_name from " . TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " where categories_id = '" . $newsPath_array[$i]

. "' and language_id='" . $languages_id . "'"

);

if (tep_db_num_rows($categories_query) > 0) {

$categories = tep_db_fetch_array($categories_query);

$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_NEWSDESK_INDEX, 'newsPath='

. implode('_', array_slice($newsPath_array, 0, ($i+1)))));

} else {

break;

}

}

/*

} elseif ($HTTP_GET_VARS['manufacturers_id']) {

$manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $HTTP_GET_VARS['manufacturers_id'] . "'");

$manufacturers = tep_db_fetch_array($manufacturers_query);

$breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_NEWSDESK_INDEX, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']));

}

if ($HTTP_GET_VARS['newsdesk_id']) {

$model_query = tep_db_query("select products_model from " . TABLE_NEWSDESK . " where newsdesk_id = '" . $HTTP_GET_VARS['newsdesk_id'] . "'");

// $model = tep_db_fetch_array($model_query);

$breadcrumb->add($model['products_model'], tep_href_link(FILENAME_NEWSDESK_INFO, 'newsPath=' . $newsPath . '&newsdesk_id='

. $HTTP_GET_VARS['newsdesk_id']));

}

*/

}

 

 

// the following newsPath references come from application_top.php

$category_depth = 'top';

if ($newsPath) {

$category_parent_query = tep_db_query(

"select count(*) as total from " . TABLE_NEWSDESK_CATEGORIES . " where parent_id = '" . $current_category_id . "'"

);

 

$category_parent = tep_db_fetch_array($category_parent_query);

if ($category_parent['total'] > 0) {

$category_depth = 'nested'; // navigate through the categories

} else if ($category_parent['total'] == 0){

$category_depth = 'products'; // category has no products, but display the 'no products' message

}

}

 

//} // I lost track to what loop this is closing ... ugh I hate when this happens

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

// Output a form pull down menu

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

function newsdesk_show_draw_pull_down_menu($name, $values, $default = '', $params = '', $required = false) {

 

$field = '<select name="' . $name . '"';

if ($params) $field .= ' ' . $params;

$field .= '>';

for ($i=0; $i<sizeof($values); $i++) {

$field .= '<option value="' . $values[$i]['id'] . '"';

if ( ($GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) ) {

$field .= ' SELECTED';

}

$field .= '>' . $values[$i]['text'] . '</option>';

}

$field .= '</select>';

$field .= tep_hide_session_id();

 

if ($required) $field .= NEWS_TEXT_FIELD_REQUIRED;

 

return $field;

}

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

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

 

 

//$javascript = "support.js";

 

 

$content = CONTENT_NEWSDESK_INDEX;

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

 

 

<?php

/*

 

osCommerce, Open Source E-Commerce Solutions ---- http://www.oscommerce.com

Copyright © 2002 osCommerce

Released under the GNU General Public License

 

IMPORTANT NOTE:

 

This script is not part of the official osC distribution but an add-on contributed to the osC community.

Please read the NOTE and INSTALL documents that are provided with this file for further information and installation notes.

 

script name: NewsDesk

version: 1.48.2

date: 22-06-2004 (dd/mm/yyyy)

author: Carsten aka moyashi

web site: www..com

modified code by: Wolfen aka 241

*/

?>

Share this post


Link to post
Share on other sites

Hello,

 

I have a problem with my NewsDesk. If I create a New Category in Admin/NewsDesk, on my catalog side I'm getting the following error:

Fatal error: Cannot redeclare newsedsk_box_has_category_subcategories() (previously declared in /var/www/site/includes/boxes/newsdesk.php:20) in /var/www/site/includes/boxes/newsdesk.php on line 20

There is no error with New News Item, just with New Category. What's wrong with my NewsDesk? Any help would be highly appreciated.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

This forum seems to be toooo slow. Does anybody still offer any support on this contribution? It would be appreciated.

 

Thanks.

Share this post


Link to post
Share on other sites

How can I disable or remove Choose Categories and Search boxes from newsdesk_index.php? Could anybody help please?

 

Thanks.

Share this post


Link to post
Share on other sites

Can anybody point me towards how to modify the date listed in catalog/newsdesk_index.

 

where i click on a news category, it gives me a table with all the news in that category, and the date includes the time as well as the date. in my case, it's pretty irrelevant that it was published at 12:03:16, so i just want it to show the date, not the time.

 

but i can't yet figure out where the relevant code is.

 

help? any pointers?

 

thanks

rj

Share this post


Link to post
Share on other sites

- broken images appearing in news categories?.

Find in /shop/newsdesk_index.php

2 separate lines of $category['categories_image']

And make sure they are coded like this

if (($category['categories_image'] == 'NULL') or ($category['categories_image'] == '')) {

Share this post


Link to post
Share on other sites
the date includes the time as well as the date. in my case, it's pretty irrelevant that it was published at 12:03:16, so i just want it to show the date, not the time.

 

Look in <site root>/includes/modules/newsdesk_listing.php

You have two options for the date format

 

Long: Thursday 10th August 2006

 

Short: 08/11/2006

 

Find the following text: $listing_values['newsdesk_date_added']

Replace with

 

Long: tep_date_long($listing_values['newsdesk_date_added'])

 

Short: tep_date_short($listing_values['newsdesk_date_added'])

 

Enjoy your cleaner looking news listing!

-=spacker=-

Share this post


Link to post
Share on other sites
How can I disable or remove Choose Categories and Search boxes from newsdesk_index.php? Could anybody help please?

 

Thanks.

 

You will have to edit the newsdesk_index.php file. Luckily the section is well marked. Almost at the bottom of the file, line 328 in my file, you will find code that begins:

 

<!-- Wolfen added code BOF -->

 

code about drop down

code about search

 

<!-- Wolfen added code EOF -->

 

You can just delete the code including the <!-- Wolfen bits.

Make a backup file before you do!

Share this post


Link to post
Share on other sites
Hello,

 

I have a problem with my NewsDesk. If I create a New Category in Admin/NewsDesk, on my catalog side I'm getting the following error:

 

There is no error with New News Item, just with New Category. What's wrong with my NewsDesk? Any help would be highly appreciated.

 

Thanks in advance.

 

Just a hunch...

Check the sort order of the newsdesk categories. I think you may have two or more that are the same.

Share this post


Link to post
Share on other sites
Can anyone help me to fix "newsdesk_index.php" as the file cannot generate and show my newly added news on the "HOTSNEWS" page? Any tips or ideas? What's wrong with it? Many many thanks and I really need this function to run my web. Thanks thanks!

 

Here is my link:

My Webpage

 

Below is the "newsdesk_index.php"

 

The "newsdesk_index.php" file will not list any news items that are not contained within a category. It need the 'newsPath' variable in the url to list contents. You have one visible category called "news". The correct link to that category is below.

 

newsdesk_index.php?newsPath=11

 

If you want to list the categories in the left column I would suggest using the newdesk infobox (not newsdesk latest infobox).

Share this post


Link to post
Share on other sites

After adding this code to the index.php page,

 

<!-- BEGIN newsdesk -->

<tr><td><?php include(DIR_WS_MODULES . FILENAME_NEWSDESK_STICKY); ?></td></tr>

<!-- //END newsdesk -->

 

 

<!-- BEGIN newsdesk -->

<tr><td><?php include(DIR_WS_MODULES . FILENAME_NEWSDESK); ?></td></tr>

<!-- //END newsdesk -->

 

 

i get this error..

 

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5

 

select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, p.newsdesk_date_added, p.newsdesk_last_modified, pd.newsdesk_article_viewed, p.newsdesk_date_available, p.newsdesk_status, p.newsdesk_sticky from newsdesk p, newsdesk_description pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "1" and newsdesk_status = 1 and p.newsdesk_sticky = 1 ORDER BY newsdesk_date_added DESC LIMIT

 

[TEP STOP]

 

 

only in the index page though all pages are fine... can anyone tell me why this is not working? i want my customers to be able to view the news on the front page as this contrib is basically for...

 

i have gone over every part of this contrib with out no luck, it has been months of me trying to solve this with no luck, so i just forgot about it, but now i really need to have this option available....

 

i have osCommerce 2.2-MS2

PHP Version 4.4.3-x86_64

Share this post


Link to post
Share on other sites

Sorry if the answer to this has already been posted by someone but my newsdesk index page is blank and the extra faq about it is just html - someone please help me!?!

Share this post


Link to post
Share on other sites

Anyone know how to make the image link to the URL specified rather than a full version of the article on newsdesk_listing?

Share this post


Link to post
Share on other sites

I dont know enough php to do this... if I make each title an html link, it logs the customer out because of the missing session id in the link. No one knows how to do this? I'm suprised, you'd think someone else would want to link to something in their own store...

Share this post


Link to post
Share on other sites

Nevermind that, I managed to figure out how... does anyone know how to get to a page that displays all news, instead of only one category of the news?

Share this post


Link to post
Share on other sites
After adding this code to the index.php page,

i get this error..

only in the index page though all pages are fine... can anyone tell me why this is not working? i want my customers to be able to view the news on the front page as this contrib is basically for...

 

i have gone over every part of this contrib with out no luck, it has been months of me trying to solve this with no luck, so i just forgot about it, but now i really need to have this option available....

 

i have osCommerce 2.2-MS2

PHP Version 4.4.3-x86_64

anyone know what could be causing this?

thanks

Share this post


Link to post
Share on other sites

What is so special about Newsdesk anyway?

 

What do you like about it?


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

Hello,

 

I have a Big problem with the NewsDesk. I use PHP 5 and Mysql 5 the tips wich I found her in the Posting don't function in any way. What I have seen is, that the NewsDesk and the FAQDesk System is be the same. But there is no problem with Mysql 5 and PHP 5. OKay there are wich I see no Left Join or anything like that.

 

The problem is that :

 

But how can I correct my problem.

1054 - Unknown column 'p.newsdesk_id' in 'on clause'

select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, p.newsdesk_date_added, p.newsdesk_last_modified, pd.newsdesk_article_viewed, p.newsdesk_date_available, p.newsdesk_status, p.newsdesk_sticky from newsdesk p, newsdesk_description pd LEFT JOIN newsdesk_to_stores p2s ON p.newsdesk_id = p2s.newsdesk_id WHERE p2s.stores_id = "STORES_ID" and pd.newsdesk_id = p.newsdesk_id and pd.language_id = "2" and newsdesk_status = 1 and p.newsdesk_sticky = 1 ORDER BY newsdesk_date_added DESC LIMIT 3

[TEP STOP]

 

Thats the problem in my Index of the oscommerce

 

another problem comes in the Admin Interface at News Mangament, the problem there is:

1054 - Unknown column 'c.categories_id' in 'on clause'

select c.categories_id, cd.categories_name, c.parent_id from newsdesk_categories c, newsdesk_categories_description cd LEFT JOIN newsdesk_categories_to_stores c2s ON c.categories_id = c2s.categories_id where c.categories_id = cd.categories_id and cd.language_id = '2' and c.parent_id = '0' order by c.sort_order, cd.categories_name

[TEP STOP]

 

Who did I can correct the SQl Select for PHP5 and Mysql 5. I hope you can help me, because in the german support forums I don't can find any help about NewsDesk an PHP5 with Mysql 5.

Share this post


Link to post
Share on other sites
Hello,

 

I have a Big problem with the NewsDesk. I use PHP 5 and Mysql 5 the tips wich I found her in the Posting don't function in any way. What I have seen is, that the NewsDesk and the FAQDesk System is be the same. But there is no problem with Mysql 5 and PHP 5. OKay there are wich I see no Left Join or anything like that.

 

The problem is that :

 

But how can I correct my problem.

1054 - Unknown column 'p.newsdesk_id' in 'on clause'

select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, pd.newsdesk_article_url_name, p.newsdesk_image, p.newsdesk_image_two, p.newsdesk_image_three, p.newsdesk_date_added, p.newsdesk_last_modified, pd.newsdesk_article_viewed, p.newsdesk_date_available, p.newsdesk_status, p.newsdesk_sticky from newsdesk p, newsdesk_description pd LEFT JOIN newsdesk_to_stores p2s ON p.newsdesk_id = p2s.newsdesk_id WHERE p2s.stores_id = "STORES_ID" and pd.newsdesk_id = p.newsdesk_id and pd.language_id = "2" and newsdesk_status = 1 and p.newsdesk_sticky = 1 ORDER BY newsdesk_date_added DESC LIMIT 3

[TEP STOP]

 

Thats the problem in my Index of the oscommerce

 

another problem comes in the Admin Interface at News Mangament, the problem there is:

1054 - Unknown column 'c.categories_id' in 'on clause'

select c.categories_id, cd.categories_name, c.parent_id from newsdesk_categories c, newsdesk_categories_description cd LEFT JOIN newsdesk_categories_to_stores c2s ON c.categories_id = c2s.categories_id where c.categories_id = cd.categories_id and cd.language_id = '2' and c.parent_id = '0' order by c.sort_order, cd.categories_name

[TEP STOP]

 

Who did I can correct the SQl Select for PHP5 and Mysql 5. I hope you can help me, because in the german support forums I don't can find any help about NewsDesk an PHP5 with Mysql 5.

 

It handle from the Admin interface dateiname: newsdesk.php and from the catalog datei: newsdesk_index.php

Share this post


Link to post
Share on other sites
Was relatively easy to setup, lets me easily add "new" content to the store. Haven't done so in a year however :( <damn real jobs!>

 

This is how I use it

 

Could you post or PM me your newsdesk_listing file? I'd like to only have headline and date like you have but I keep stuffing it up.


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

I'd also like the stickies contents to NOT show on the front page and only show once the read more is clicked.


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites
i have the news categorybox in my catalog but there is nothing showing up in it.

 

does anyone know how to get the news category box to actually show the news categories?

 

the other latest news box is fine

 

thanks

 

I have exactly the same problem.

Has anyone fixed it????

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
Sign in to follow this  

×