moyashi Posted March 26, 2003 Author Share Posted March 26, 2003 :wink: oh well ... I didn't really expect it would work with newer snapshots since the release of MS1. I'm not sure off the release dates of the next MS releases and had figured that I shouldn't go off and start supporting snapshots since so many are still on pre-MS1 snapshots or have recently upgraded to MS1. To fix that problem best bet would be too copy that function from general.php and rename it to newsdesk_get_upload_file and paste it into newsdesk_genreal.php. Then you need to change all references from products to newsdesk ones. I don't imagine it to be that hard. However I haven't downloaded a snapshot since I started to deal with MS1. Just too many things on my desk right now :wink: haha ... slight pun there. Good Luck @ next release information I haven't started yet, but I hope to get to this either nextweek or at least sometime in April. I'll be cleaning up code, adding authors, better category listings and search ability. Current "paid" work will reflect back in v1.5 ... now I just need to get to this upgrade :roll: Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
Salvo Posted March 27, 2003 Share Posted March 27, 2003 Hi all, I hope someone will help on this... When listing the articles in the newsdesk_index.php the articles are show like this: Healines Summary etc etc Title summary text etc etc --- I would like to show the listing without the Headlines/summary etc definition ie: ---------- Title of article here ( 1 raw) Summary here ( 2 raw) ---------- How do I do that? Thanks for help Salvo Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 28, 2003 Author Share Posted March 28, 2003 @ listings go to admin in NewsDesk. There is a link to listings. You can show what ever you want by adjusting those settings. :D Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
Salvo Posted March 28, 2003 Share Posted March 28, 2003 Hi moyashi, I know about the lisiting in admin, I haev tryied them all just in case, but that is only for showing them or not... all in one raw.. image headlines summary etc etc.. I would like to show it in two raws.. first raw the (Title and date) second raw everything else I want to show... just like in the front page... it would be more professional look, just like a newspater online.. thanks Salvo Quote Link to comment Share on other sites More sharing options...
carvingmachine Posted March 28, 2003 Share Posted March 28, 2003 Thanks a lot, i have deactivated the upload-code, so the system works. but i have another problem: i have 2 cvs-systems, a aktual cvs and a older one from may 2002. the newer one works without any problems (the upload works) but my older one has a problem: if i click at the content in the "news categories" i get the following error: Warning: array_map() expects argument 1, 'tep_string_to_int', to be either NULL or a valid callback in /homepages/13/d11876913/htdocs/ahg-gmbh/motorrad-system/includes/functions/newsdesk_general.php on line 47 if i deactivate the following code, the system works but if i click at the content in the box there ist not shown the newsindex. file: .../includes/funktions/newsdesk_general.php // Parse and secure the newsPath parameter values function newsdesk_parse_category_path($newsPath) { // make sure the category IDs are integers //$newsPath_array = array_map('tep_string_to_int', explode('_', $newsPath)); (i have deaktivated the last one) what is the problem? du you have an answer? thanks, daniel Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 28, 2003 Author Share Posted March 28, 2003 @ 2 rows hmmm ... I think I understand what you're saying. Any site you want imitated? @ may 2002 snapshot. hmm ... newsdesk was built upon a nov-dec 2002 snapshots. Might be soemthing to do with the older dated code. Might take a look at general.php from that snapshot. The code in newsdesk_general is just general.php functions changed to work with the sql tables for newsdesk. You might be able to find a similiarly named function and copy/paste/adjust to take care of the problem. Good luck Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
Farrukh Posted March 28, 2003 Share Posted March 28, 2003 HIya moyashi Thanks for a great contribution I am running Loaded 5 and I think you left out the Index Display part in the admin section. Create a faqdesk.php file and enter this in it : <?php $metainfo[] = array('admin' => 'faqdesk.php', 'title' => BOX_HEADING_FAQDESK, 'image' => 'catalog.gif', 'href' => tep_href_link(FILENAME_FAQDESK, 'selected_box=faqdesk'), 'children' => array( array('title' => FAQDESK_ARTICLES, 'link' => tep_href_link(FILENAME_FAQDESK, 'selected_box=faqdesk')), array('title' => FAQDESK_REVIEWS, 'link' => tep_href_link(FILENAME_FAQDESK_REVIEWS, 'selected_box=faqdesk')))); ?> And place it in : catalog/admin/includes/modules/metainfo It works now with the above changes. :) Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 28, 2003 Author Share Posted March 28, 2003 My copy of the uploaded tar has it inside of it. Did you miss something? Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
Farrukh Posted March 28, 2003 Share Posted March 28, 2003 Its working fine , only this file was not included. Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 28, 2003 Author Share Posted March 28, 2003 hmmm ... strange enough :roll: Thanks for adding the information though. Possibly other folks had/have the same problem :cry: Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
Farrukh Posted March 28, 2003 Share Posted March 28, 2003 I posted the above info in the wrong Topic. Its for FAQDESK not NewsDesk. It should be here http://www.oscommerce.com/forums/viewtopic.php?t=38963 Quote Link to comment Share on other sites More sharing options...
carvingmachine Posted March 28, 2003 Share Posted March 28, 2003 hello moyashi, i have changed the code in the general.php (osc). I add this lines because this function was undefinied (i declaired in my last post): function tep_string_to_int($string) { return (int)$string; } So the error Warning: array_map() expects argument 1, 'tep_string_to_int', to be either NULL or a valid callback in /homepages/13/d11876913/htdocs/ahg-gmbh/motorrad-system/includes/functions/newsdesk_general.php on line 47 without the correction in the general php is solved... But if i click on the content in the category box i get the following error-code: Fatal error: Call to a member function on a non-object in /homepages/13/d11876913/htdocs/ahg-gmbh/motorrad-system/newsdesk_index.php on line 43 I had a look at the newsdesk_index.php on line 43 but i can?t find a problem. But in the last line there was no code, so i deleted this line. Now i step forward... If i click on the content in the category box i get no error, i get the correctly site but with this one: TEXT_news_NOT_FOUND --> it is definied in the language and nothing else, but i have 2 files in this category, so i shoult see the index of this 2 files. Do you have a idea? Pleas help, thanks Quote Link to comment Share on other sites More sharing options...
carvingmachine Posted March 29, 2003 Share Posted March 29, 2003 ok, it was only a test, sorry, but the system doesn?t work. so i have also installed all files to my system again, have deletde the " in line 185 in the newsdesk_index.php. so i have allways the following error into my system if i cklick on the content in the category box: Fatal error: Call to a member function on a non-object in /homepages/13/d11876913/htdocs/ahg-gmbh/motorrad-system/newsdesk_index.php on line 40 Please have a view at line 40, file newsdesk_index.php 31 if (isset($newsPath_array)) { 32 $n = sizeof($newsPath_array); 33 for ($i = 0; $i < $n; $i++) { 34 $categories_query = tep_db_query( 35 "select categories_name from " . 36TABLE_NEWSDESK_CATEGORIES_DESCRIPTION . " where 37categories_id = '" . $newsPath_array[$i] . "' and language_id='" . $languages_id . "'" ); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); 40 $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_NEWSDESK_INDEX, 'newsPath=' 41 . implode('_', array_slice($newsPath_array, 0, ($i+1))))); } else { break; } } Please, can anyone help me. it is very difficult Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 29, 2003 Author Share Posted March 29, 2003 hmmm the area around 40 deals with the breadcrumb ... I wonder if the breadcrumb was updated between my earliest snapshot and yours? you should be able to just comment out that section and forgo the link, ie TOP > CATALOG > NEWS if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); 40 $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_NEWSDESK_INDEX, 'newsPath=' 41 . implode('_', array_slice($newsPath_array, 0, ($i+1))))); } else { break; } Let's see what this does. Good luck Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
Salvo Posted March 29, 2003 Share Posted March 29, 2003 Hi all again, I have a little question: when showing all the articles in a category "newsdesk_index.php", the breadcrumb show the categrory name, and that is fine. When clicking on an article, and the "newsdesk_info.php" will show the whole article, the breadcrumb will not show the name under which that article is on... My question is: How do I show that article category name in the breadcrumb? Thanks for your help Salvo Hi all, After trying many things, I have found out that adding this code to newsdesk_info.php this code below, the jobs is done.. // add breadcrumbs 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; } } Quote Link to comment Share on other sites More sharing options...
Salvo Posted March 29, 2003 Share Posted March 29, 2003 Hi all again, I have a little question: when showing all the articles in a category "newsdesk_index.php", the breadcrumb show the categrory name, and that is fine. When clicking on an article, and the "newsdesk_info.php" will show the whole article, the breadcrumb will not show the name under which that article is on... My question is: How do I show that article category name in the breadcrumb? Thanks for your help Salvo Hi all, After trying many things, I have found out that adding this code to newsdesk_info.php this code below, the jobs is done.. // add breadcrumbs 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; } } Sorry, Sorry, I was using different script... It didn't do the trick.. sorry. disregard the above.. I am still trying to solve it :-( Salvo Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 30, 2003 Author Share Posted March 30, 2003 :( Have you tried erasing that part of the code? I don't have a snapshot ealier than November 2002 so it's very hard for me to figure it out. Could you zip/tar your snapshot and pont me to a place I could down load it? Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
carvingmachine Posted March 30, 2003 Share Posted March 30, 2003 i have commend out the line 40 etc, our code. it works but not very good. please have a look at this site: http://www.ahg-gmbh.de/motorrad-system/new...php?newsPath=22 what?sgoing on??? can you help me? Thanks Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 30, 2003 Author Share Posted March 30, 2003 Hi Max, Looks like it's working. What's wrong? If you don't like the look of that page go into the admin section and turn off all the columns like images and such. Here's a tip that I just realized recently. You can order the columns 1,2,3,4,etc ... however the message in admin says only enable/disable. :oops: But that function does exist :D Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
Salvo Posted March 31, 2003 Share Posted March 31, 2003 Hi, I have tried and failed to sort out the breadcrumbs, it gives purse error.. However I am confident that it will be sorted out... By the way, at what line the code for breadcrumbs above has to be placed? might be that the reason for the error.. I have now a little question.... when entering new articles, there is the small calendar for Start Date. It seams that clicking on the calendar date, that date is not entered in the Start Date. Has anyone tried that? Thanks Salvo Quote Link to comment Share on other sites More sharing options...
carvingmachine Posted March 31, 2003 Share Posted March 31, 2003 ok, no my system works completely. thank you very much, carsten. do you plan to creat other osc tool or a version 1.5 of newsdesk? Greeting, Max Daniel Quote Link to comment Share on other sites More sharing options...
Salvo Posted March 31, 2003 Share Posted March 31, 2003 ok, no my system works completely. thank you very much, carsten. do you plan to creat other osc tool or a version 1.5 of newsdesk? Greeting, Max Daniel Sorry, Max, what does work completely? the breadcrumbs in the info? Thanks Salvo Quote Link to comment Share on other sites More sharing options...
moyashi Posted March 31, 2003 Author Share Posted March 31, 2003 @ salvo the lines of code go in at about line 23. I'll try to redo the breadcrumbs for v1.5. FAQDesk is doing a little bit better on that part still not up to snuff but a bit better. @ Max So far, I've got NewsDesk and FAQDesk list in the contrib section. NewsDesk will be upgraded to 1.5 since I want to add authors, some minor html changes, and rework some of the code that FAQDesk proved to be slightly better. I have 2 other ideas which 1 will probably be put onto (errr, into) code. I installed a contrib called infopages and almost fell out of my chair since I realized that either of my contribs could do the same thing. Nothing against infopages since it does work and is a good contrib. Anything you have in mind? Quote NewsDesk(934) / FAQDesk(1106) / OrderCheck(1168) ::: Link to comment Share on other sites More sharing options...
sgflowers Posted March 31, 2003 Share Posted March 31, 2003 Carsten, in v 1.5 of newsdesk are you going to tackle updating so it is compatable with the new cvs (file upload class) same applies to faq desk - Kevin Quote Link to comment Share on other sites More sharing options...
carvingmachine Posted March 31, 2003 Share Posted March 31, 2003 hi salvo, i had problems with newsdesk too, but now my systems works very good... i edited the shop-file "general.php" from osc. you have only define the function. go to the end of general.php and add the following code: function tep_string_to_int($string){ return (int)$string; } you have also commend out the folowing code at the newsdesk_index.php (line 40): //if (tep_db_num_rows($categories_query) > 0) { //$categories = tep_db_fetch_array($categories_query); 40 //$breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_NEWSDESK_INDEX, 'newsPath=' 41// . implode('_', array_slice($newsPath_array, 0, ($i+1))))); //} else { //break; //} Please try it, i hope your system works... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.