Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NewsDesk v1.0 realease


moyashi

Recommended Posts

NewsDesk is a smaller and better package to my previous phpnewsdesk.

 

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

 

What is it :::

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

NewsDesk is based on 3 files from the osC system. general.php (I had to change many of the functions to compensate for the different table and

column names). catagories.php and catagory_info.php (These are the grunt files that I changed to run a news system.)

 

NewsDesk is also based on latest_news by Will Mays <[email protected]>. I had orginally started hacking his script to include images and

languages but I kept having troubles due to my lack of programming skills. I did use some of his ideas, news image button and parts of his

instalation guide.

 

 

Features :::

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

Being based on catagories, you can expect alot!

 

- News is stored in the database.

- Full Mutlilingual support.

- code is (far as I know) fully osC standardized

 

- Fits right in on the top page of the site like the "New Products for February" box ;-) NewsDesk was released in February.

- Like lastest_news it won't display news if status is set to "inactive aka red"

- headline, summary, image, [read more] link on top page

- [read more] full content page

 

- News is full controlled by the admin area which looks and behaves just like the catagories/products section does.

- status setting "red/green" to make articles active and inactive.

- drop down menu to jump to catagory quickly

- searchable news articles

- picture upload

- preview page just in case you screw-up ;-)

 

 

 

Requests and complaints :::

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

Please post to this thread for any wishes, hopes, and complaints

 

 

Cheers

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

Link to comment
Share on other sites

I'm really back logged now since I spent the better part of the week doing the mod rather than working on work related things.

 

Also, not sure if I want to open up a site on my server that allows access to the admin section. I'm sharring and if I got hacked. Anybody have any information on this type of adventure?

 

If I have some time I'll try to tack some screen shots up somewhere.

 

hmm ... everything depends on my schedule.

 

Cheers

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

Link to comment
Share on other sites

okay so trying to install - got admin in with no problem and seems to be very clean install - here is my problem though -

 

when I go to mydomain.com/default.php - I receive this error under the greeting:

 

1064 - You have an error in your SQL syntax near 'MAX_DISPLAY_LATEST_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.language_id = "1" and newsdesk_status = 1 ORDER BY newsdesk_date_added DESC LIMIT MAX_DISPLAY_LATEST_NEWS

 

[TEP STOP]

 

 

thoughts???

Link to comment
Share on other sites

okay I changed the newsdesk.php (catalog/includes/modules) to this:

 

$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.language_id = "' . $languages_id . '" and newsdesk_status = '1' ORDER BY newsdesk_date_added DESC LIMIT " . MAX_DISPLAY_LATEST_NEWS);

 

and fixed my last error

 

 

however I am still missing something because I now I get this:

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/virtual/site12/fst/var/www/html/includes/modules/newsdesk.php on line 5

 

 

anyone else see anything?

 

I'll get the admin screenshots up soon - want to get the catalog part working though to make it complete with both screenshots and functionality :wink:

Link to comment
Share on other sites

Thanks rubygirl for the offer,

That really help and would be much appreciated.

 

The admin should work no problem.

 

I'm gonna check into the default/index.php page problem today.

 

I must've missed that late last night (it was like 2am when I posted the contrib).

 

That line is a left over idea from lastest_news. I'll see what needs to be fixed ASAP.

 

Thanks!!!

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

Link to comment
Share on other sites

ooops, just replace that line in catalog/modules/newsdesk.php

with

 

$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.language_id = "' . $languages_id . '" and newsdesk_status = 1 ORDER BY newsdesk_date_added');

 

Basically just erased that last part of the sql command.

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

Link to comment
Share on other sites

I've got the newsdesk running on my testserver (localhost sorry, you can't come and watch). The code runs without any errors.

 

When I create a category, with 1 newspost in it, no problem. But when I add a second newspost, BOTH newspost get displayed 2x on the default page (main page) ...

 

is this normal?

 

Does anybody else have this to? I already updated the one php file you updated today but that didn't really help....

 

anybody?

DicE

_____.:::.________###__________|/______

:(o o): . (o o) (o o)

ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-

Link to comment
Share on other sites

why did you remove max_lastest_news

 

should be usefull to keep it :)

here is the query from lastest news 1.1.0 that would solve the problem of rubygirl ...

 

# Insert configuration items into the configuration table.

INSERT INTO configuration (

configuration_title,

configuration_key,

configuration_value,

configuration_description,

configuration_group_id,

date_added

) VALUES (

'Latest News',

'MAX_DISPLAY_LATEST_NEWS',

3,

'maximum number of items to display in the Latest News box',

3,

NOW()

);

Link to comment
Share on other sites

Okay I replaced the newsdesk.php with the new one in the contrib section. I also added the database values that elari posted - Looks like it is working now except I don't have any of my right columns anymore on my default.php page....

 

thoughts???

Link to comment
Share on other sites

my error in the default.php page - issue resolved - anyway - I am actually getting duplicate entries and I have only entered 1 category with 1 article in it.

 

 

 

Another thought as well was to either move this contrib to display below the intro text or else "box it" and display the news in one of the columns - any other thoughts....

Link to comment
Share on other sites

so I removed the original category and the test item added and then only entered 1 news item -this worked fine - then i added a second news item (no categories still ) and I ended up with both items duplicating them selves. So I had article 1 x 2 and then article 2 x 2 listed beneath.

 

how to fix?

Link to comment
Share on other sites

Hi all, sorry for all the problems :oops:

I'm not a programmer -- just a 2-bit hacker at that it now seems :wink:

 

I didn't expect the looping problem to occur since I used catagories for this, I should've tested a little more. :lol:

 

@elari

nice solution :!:

 

I had originally meant to provide a admin section to control various functions of NewsDesk and that bit of code happened to be left uncommented out.

 

@ next release todo's

I'm gonna try to get that configuration page, a side box, and hopefully a java button thingy like on the forums here (phpbb -- hehe, maybe just borrow their code since it seems to work on most browsers.)

 

I tried the html-bar hack but it's limited to IE only (oh hummm).

 

obviously though, I'm gonna try to tackle the looping problem first.

 

Once again thanks for all the comments and help!!!

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

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