Jump to content
Sign in to follow this  
moyashi

NewsDesk v1.2 Relased!

Recommended Posts

Ok, column boxes have been added.

Also, :idea: , I put together a configuration area in the newsdesk admin area. Let's you configure the new_listing page currently. Plans are to increase this type of ability.

 

Breadtrail is also included.

 

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

 

To Update::

1.) just over write all the files.

2.) grab the last part of the sql file and use that area only. Starting at ""CREATE TABLE newsdesk_configuration_group (

"" which is about line 75.

 

Good luck and happy News Publishing.


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites

Moyashi,

 

Can this be used to build articles and stories (with pictures and captions)or is it simply for news headlines? I am looking for something like a block that lists articles/stories then customer clicks the link and are taken to a page with just that full article or story on it, and maybe below that it would link to other related articles or stories, even link products to buy in the shop that go with the article at hand, what do you think? Also would be nice for user to be able to have printer friendly version or pdf and also for admin to be able to import articles/stories that are already written in WORD or other formats. What are the differences between what your NewsDesk Contribution and Articles Mod Contribution? Thank you for your wonderful additon to OSC.

 

Joe

Share this post


Link to post
Share on other sites

I got everything installed and even inserts a news article, only to get this error on my index page - Help!!!

 

Fatal error: Cannot redeclare newsedsk_box_has_category_subcategories() (previously declared in /www/m/mitchryder/htdocs/store/includes/boxes/newsdesk.php:7) in /www/m/mitchryder/htdocs/store/includes/boxes/newsdesk.php on line 7

Share this post


Link to post
Share on other sites

It really sounds like a superb mod,

 

But i get this error now: (before it was oke!)

1064 - You have an error in your SQL syntax near 'MAX_DISPLAY_NEWSDESK_NEWS' at line 4

 

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

Thnx

Share this post


Link to post
Share on other sites

For the post above this post: If a remove the "LIMIT MAX_DISPLAY_NEWSDESK_NEWS" then it works, but i have not limit then, anybody has thesame problem?

Share this post


Link to post
Share on other sites
I got everything installed and even inserts a news article, only to get this error on my index page - Help!!!

 

Fatal error: Cannot redeclare [b]newsedsk[/b]_box_has_category_subcategories() (previously declared in /www/m/mitchryder/htdocs/store/includes/boxes/newsdesk.php:7) in /www/m/mitchryder/htdocs/store/includes/boxes/newsdesk.php on line 7

 

newsdesk.php has a misspelled work s/b newsdesk - but that didn't fix the error above. Help! Help!

Share this post


Link to post
Share on other sites

Try this line for the MAX.... error, I think its dodgy CR's so make sure its ONE whole line! ;-)

 

$newsdesk_var_query = tep_db_query('select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd

.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url,p.newsdesk_image

, p.newsdesk_date_added, p.newsdesk_last_modified,p.newsdesk_date_available, p.newsdesk_status  from '

. TABLE_newsdesk . ' p, ' . TABLE_newsdesk_DESCRIPTION . ' pd WHERE pd.newsdesk_id = p.newsdesk_id an

d pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 ORDER BY newsdesk_date_added DESC L

IMIT ' . MAX_DISPLAY_newsdesk_NEWS);

 

For those who want a quick demo of this, goto my test site @ www.it-gear.net

 

 

John

Share this post


Link to post
Share on other sites

The errors just continue to pop up! I'm really clueless NOW :?

 

[code1064 - You have an error in your SQL syntax near '' at line 6

 

select p.newsdesk_id, p.newsdesk_date_added, p.newsdesk_status, p.newsdesk_image, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, NULL) as final_price from newsdesk_description pd, newsdesk p left join manufacturers m on p.newsdesk_id = m.manufacturers_id, newsdesk_to_categories p2c left join specials s on p.newsdesk_id = s.products_id where p.newsdesk_status = '1' and p.newsdesk_id = p2c.newsdesk_id and pd.newsdesk_id = p2c.newsdesk_id and pd.language_id = '1' and p2c.categories_id = '1' order by [/code]

Share this post


Link to post
Share on other sites

There are some errors in the code. I hope this is correct:

 

$newsdesk_var_query = tep_db_query('select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd .newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, p.newsdesk_image, p.newsdesk_date_added, p.newsdesk_last_modified, p.newsdesk_date_available, p.newsdesk_status? from ' . TABLE_newsdesk . ' p, ' . TABLE_newsdesk_DESCRIPTION . ' pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 ORDER BY newsdesk_date_added DESC LIMIT ' . MAX_DISPLAY_newsdesk_NEWS);

Share this post


Link to post
Share on other sites

Where is the edit button when you need one? I fixed that code, but I'm still trying to figure out the first error -

 

Fatal error: Cannot redeclare newsedsk_box_has_category_subcategories() (previously declared in /www/m/mitchryder/htdocs/store/includes/boxes/newsdesk.php:7) in /www/m/mitchryder/htdocs/store/includes/boxes/newsdesk.php on line 7

Share this post


Link to post
Share on other sites

the redeclare problem is you read it seems as a loop problem.. because it says that can?t declare a thing in somewhere(lets call it place A) because it?s declare in place A!! so somewhere in your code you are including o requireing a file in that same file.. my english is not good.. but try to understand what i?m trying to say...

 

cheers

emiliano


patagonia, argentina

Share this post


Link to post
Share on other sites

Thanks, I understood perfectly!

 

Perhaps the writer can tackle this one for me since I didn't change any part of that code. I did read something about "looping" concerning a previous contrib.

Share this post


Link to post
Share on other sites
Moyashi,

 

Can this be used to build articles and stories (with pictures and captions)or is it simply for news headlines? I am looking for something like a block that lists articles/stories then customer clicks the link and are taken to a page with just that full article or story on it, and maybe below that it would link to other related articles or stories, even link products to buy in the shop that go with the article at hand, what do you think? Also would be nice for user to be able to have printer friendly version or pdf and also for admin to be able to import articles/stories that are already written in WORD or other formats. What are the differences between what your NewsDesk Contribution and Articles Mod Contribution? Thank you for your wonderful additon to OSC.

 

Joe

 

Hi Joe,

 

Basically what you're looking for is either NewsDesk or Articles.

Try them both out and stick with the one that matches your requirements would be my advice.

 

NewsDesk and Articles are basically the same. Chad and I both used catagories and products from the osC core to build are mods. Differences are there but minor currently, however, we are probably going in slightly different directions. I'm aiming more for a configureable News system.

 

RDF imports is a good idea ... I'll have to look into that.

PDF printing will be eventually added. I wonder though how many folks actually print out News Articles?

Linking to products ... another good idea. I'll have to look into this too.

 

Importanting M$ files and such ::: hmmm ... I was thinking more along the lines of using something like the HTML Bar mod to allow easier news creation.

 

I'm not a programmer so trying to figure out how to read in an outside format document and then prune out the headline, summary, then content would probably be a little beyond what I can do currently.

 

I hope I answered your questions.

 

Carsten


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites
Also the date_calendar in the admin doesn't work either ;(

 

ugh :shock:

 

I'll take a look at that either tonight or tomorrow. I wonder what happened to it. It orginally worked.


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites
Thanks, I understood perfectly!

 

Perhaps the writer can tackle this one for me since I didn't change any part of that code. I did read something about "looping" concerning a previous contrib.

 

Hi,

 

The looping problem was a problem in v1.0. It basically just repeated an article according to the number of languages you had installed. This looping problem is not a loop actually. BUT

 

the top part of includes/modules/newsdesk.php should read :::

<?php





// set application wide parameters

// this query set is for NewsDesk



$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']);

}





$newsdesk_var_query = tep_db_query(

'select p.newsdesk_id, pd.language_id, pd.newsdesk_article_name, pd.newsdesk_article_description, pd.newsdesk_article_shorttext, pd.newsdesk_article_url, 

p.newsdesk_image, p.newsdesk_date_added, p.newsdesk_last_modified, 

p.newsdesk_date_available, p.newsdesk_status  from ' . TABLE_newsdesk . ' p, ' . TABLE_newsdesk_DESCRIPTION . ' 

pd WHERE pd.newsdesk_id = p.newsdesk_id and pd.language_id = "' . $languages_id . '" and newsdesk_status = 1 ORDER BY newsdesk_date_added DESC LIMIT ' . MAX_DISPLAY_NEWSDESK_NEWS);





if (!tep_db_num_rows($newsdesk_var_query)) { // there is no news

echo '<!-- ' . TEXT_NO_newsdesk_NEWS . ' -->';



} else {

 

MAX_DISPLAY_NEWSDESK_NEWS is a newly introduced variable the other version MAX_DISPLAY_newsdesk_NEWS is calling from a different table.

 

Please use MAX_DISPLAY_NEWSDESK_NEWS since you can set this from the NewsDesk's admin area rather going to the standard osC's admin Configuration -- Max Limits area.

 

The error on line 7 is a little more interesting. I just scanned my whole catalog directory using BBEdit which does a grep search (uhhh ... mulit-file search) and it only showed 2 instances. 1 for the function name and the other of the actual usage in the file.

 

I need to know more about what you did.

1.) are you updating?

2.) is this a new install?

3.) When is your snapshot?

 

 

my email is hakuja@comco.ne.jp so if you really need help please email me. If it comes down to it, maybe set me up a temporary ftp account and I'll see what I can do, however, I prefer not doing that ... since it's like peeking into peoples' cupboards, something I've never liked doing.


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites

:arrow: future for v 1.3

just finished with a latest "x" news block.

you just have to set the number in the admin area.

 

 

any other requests?


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites

Hi - i'v 3 items that have me stumped. Sorry I know it's bad form to ask multiple questions.

 

 

1.

OK This has really got me. There's a link between Product Catrgories & News Categories.

 

I have set up 2 news categories (one item in each) but the info box shows 3 categories - the top category is a product category not a news one (it's the top category and is called "handbooks").

 

Selecting the "handbooks" category in the info box takes me to a blank news item because the path genetated is /newsdesk_index.php?newsPath=21. The paths to the other category listings are 1 & 2.

 

Note : Selecting the top 2 categories in the catalog (top left) works fine but as well as showing the products in that category a news category is also highlighted (i.e. bold) in the News Box. ??? :?

 

2.

Another bit of bother I've had is the title of the news box. Sometimes the definition translates and "News Category" is shown and on other pages it shows BOX_HEADING_NEWSDESK_CATEGORIES, which throws out the column sizes. I've fixed this by simply redefining it as "News".

 

3.

Two graphics questions

a- There were no graphics included, are they in 1.1?

b- The news page tries to show graphics for each item - even though I've switched them off.

 

 

Thanks

 

Kenny

 

Site - hr.p10.co.uk/default.php


If you learn more than you forget then that's a good thing.

Share this post


Link to post
Share on other sites

1.) ugh, that's a mystery to me. I wonder what the sql tables say? Some strange reason cPath is getting picked up instead of newsPath. I wonder if I can force the same error. :x

 

2.) I don't get the problem on your site with mozilla 1.2.1 on OSX. hmm, wonder if it's your browser cache playing games with you. ??

 

3.) I've fixed that annoying problem hopefully for the title showing instead of nothing when no image is supplied for a story. Peter C. supplied some code that fixes the no image in th estory side. I noticed that the catagory side still needs the fix applied. I'll try to get to that tonight.

 

4.) I have another version in the works that fixes some minor things that irratated me and hopefully will get reviews put in too.

 

Cheers and sorry for the troubles.

 

Carsten


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites

thought just crossed my mind.

 

for linking to products you can just copy the link from the browser and paste it in when you write up your story. I looking for a mod right now that will list all the products in osC as a drop down. I was thinking that I could use that to create a non-paste solution.

 

but first got to do some more work tonight on other things.


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites

Finally got rid of the "Fatal Error " - I deleted the first function in the (catalog) boxes/newsdesk.php

 

Everything works just fine, well almost - I lost my ability to config Newsdesk, in my admin center, all I have is "Publishing"

 

This was a new install on a Nov 23 snapshot.

Share this post


Link to post
Share on other sites

Hi Annette,

 

hmmm, yeah, erasing too much will cause that problem.

 

would you send me that file in question?

email: hakuja@comco.ne.jp

 

I have an older snapshot. However that really shouldn't be the problem.

 

Either way I'll take a look at your file and try to figure out what's wrong.

 

version 1.3 depends heavly on the config functions since many items are now configureable.

 

Carsten


NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) :::

Share this post


Link to post
Share on other sites

Hy moyashi

 

Is great contribution, i'm interresting to know

if it is possible not to have the categories deferred (take back) in the box of news.

In order to have news independent of the categories.

 

Sorry for my bad english

I hope be comprehensible :shock:

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  

×