Guest Posted October 5, 2006 Share Posted October 5, 2006 (edited) I'm trying to replace the viewcounts on the main page with comment counts. From includes/modules/newsdesk.php I made this: (LINE 78 in original file) if ( DISPLAY_NEWSDESK_VIEWCOUNT ) {$insert_viewcount = '<i>' . TEXT_NEWSDESK_VIEWED . $newsdesk_var['newsdesk_article_viewed'] . '</i>'; } into this: if ( DISPLAY_NEWSDESK_REVIEWS ) {$insert_reviews = '<i>' . TEXT_NEWSDESK_REVIEWS . $newsdesk_var['newsdesk_article_require'] . '</i>'; } and turned this (line 109 in original file) <td class="smallText" colspan="2" align="right">' . $insert_viewcount . '</td> into this <td class="smallText" colspan="2" align="right">' . $insert_reviews . '</td> but of course it doesn't work. What would? Edited October 5, 2006 by mpm Quote Link to comment Share on other sites More sharing options...
Guest Posted October 12, 2006 Share Posted October 12, 2006 Silly me, the newsdesk_index tables are controlled in admin under listing settings. :blush: I would still like to have a review count instead of a view count on the frontpage of the articles. Quote Link to comment Share on other sites More sharing options...
nobility Posted October 14, 2006 Share Posted October 14, 2006 I dont know if the problem has been addressed but i would appreciate help In my admin pannel, none of my links work anymore. Now they look like: http://nobilitybeyond.com/DIR_WS_ADMINnewsdesk_reviews.php they should be http://nobilitybeyond.com/catalog/admin/newsdesk_reviews.php What about this contribution would cause my links to change? That is my biggest problem right now. Uninstalling the code doesnt help so i am guessing its one of the files. Also on another note, everytime i try to add a box to, for example, my left column (customer section), the whole index.php section of the page, comes down the page, to allign with the box i installed. Anyone ever seen that problem before? Quote Link to comment Share on other sites More sharing options...
devless Posted October 23, 2006 Share Posted October 23, 2006 Newsdesk usage options: Hi all. I really love the newsdesk contribution and have integrated into my website. I use my own page layout with the newsdesk code inserted into it. Currently with my own implementation, I can only put files into the TOP directory (due to the way that I am delivering content within my page). How can I have multiple news pages that only do an article listing of a specific directory. ie.. NewsPage1 essentially looks like PAGE_LISTING for TOP directory ie.. NewsPage2 would look like PAGE_LISTING for CATEGORY 2 etc. So currently I only have one NewsPage that calls the PAGE_LISTING MODULE, and I only have the artciles in the top directory. ------------------------- Also, what/where is the easiest way to add fields into the news input and display? I've managed to add the SQL entries, and have them display correctly on the frontend, but seem to have butchered my newsdesk_general.php in trying to get the admin to work. Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
Guest Posted November 3, 2006 Share Posted November 3, 2006 (edited) I'm trying to replace the viewcounts on the main page with review counts. (snip) but of course it doesn't work. What would? I still haven't worked out how to do this/why it won't work? Edited November 3, 2006 by mpm Quote Link to comment Share on other sites More sharing options...
yatahaze Posted November 10, 2006 Share Posted November 10, 2006 (edited) I switched to a linux server, now I'm getting this error when I try to get to the admin section for newsdesk: Parse error: parse error, unexpected '{' in /var/www/vhosts/website/httpdocs/shop/admin/newsdesk.php on line 16 This is the code on line 16: try { if (file_exists($filename)) unlink($filename); } Anyone know what the problem is? Edited November 10, 2006 by yatahaze Quote Link to comment Share on other sites More sharing options...
yatahaze Posted November 10, 2006 Share Posted November 10, 2006 Nevermind, I took the newsdesk.php from a newer update to the contrib and replaced it and now it works. Quote Link to comment Share on other sites More sharing options...
kortshop Posted November 12, 2006 Share Posted November 12, 2006 I would like to have the news category box always visible. As it is now, it is not displayed when in product listing. Anyone know if this is an easy modification and what to change? Vidar Quote Link to comment Share on other sites More sharing options...
andrewau Posted November 29, 2006 Share Posted November 29, 2006 Hi, Installed Newsdesk and the home page reflects the changes, however the admin/index.php is showing errors. Can you please tell me where to add the code : #### [ ADD -- regular osc versions] ############################################################ NOTE !!! Below code is ONLY for osC -- 2.2 and MS1 //BEGIN -- newsdesk array( 'title' => BOX_HEADING_NEWSDESK, 'image' => 'catalog.gif', 'href' => tep_href_link(FILENAME_NEWSDESK, 'selected_box=newsdesk'), 'children' => array( array('title' => NEWSDESK_ARTICLES, 'link' => tep_href_link(FILENAME_NEWSDESK, 'selected_box=newsdesk')), array('title' => NEWSDESK_REVIEWS, 'link' => tep_href_link(FILENAME_NEWSDESK_REVIEWS, 'selected_box=newsdesk')))), //END -- newsdesk Specifically before what and or after what? Thanks Andrew Quote Link to comment Share on other sites More sharing options...
andrewau Posted November 30, 2006 Share Posted November 30, 2006 Ok, I believe I have figured out where to add the newsdesk code in admin/index.php however when I log into the admin I get the following: Parse error: syntax error, unexpected ',' in /home/abc/public_html/catalog/admin/index.php on line 124 and line 124 is: array('title' => NEWSDESK_REVIEWS, 'link' => tep_href_link(FILENAME_NEWSDESK_REVIEWS, 'selected_box=newsdesk')))), the , at the end needs to be changed to ; Thanks Andrew Quote Link to comment Share on other sites More sharing options...
andrewau Posted November 30, 2006 Share Posted November 30, 2006 Ok, new problem. When I am in the admin and click on any of the links Under Newsdesk I get the following: No Right Permission Access Please contact your Web Administrator to request more access or if you found any problem. Any help? Andrew Quote Link to comment Share on other sites More sharing options...
Guest Posted December 20, 2006 Share Posted December 20, 2006 I have a real problem with News desk showing nothing. I've read all "solutions" for this problem but I can't get it to work. :'( Here is the test index site of the shop: Link to test page In the bottom left there is a "latest news" box showing category and one news below (box has a black background). So, when you click any of these 2 links you get a completely empty page. I've really tried everything so I'll appreciate any help. Thank you! Quote Link to comment Share on other sites More sharing options...
Code Red Posted January 24, 2007 Share Posted January 24, 2007 I've got a problem which is a real weird one. I'm a big fan of NewDesk, in fact I've used it on three websites so far and it's always worked fine straight off the bat. On the latest site I'm doing (no.4), image 1 uploads and displays fine, but images 2 and 3 are neither uploaded or written to the db. The site works without any problems run locally on my computer, and also on my own website, but when it's run on the client's server this happens. The server in question is running MySQL 4.0.17 and PHP 4.4.2 My own computer runs MySQL 4.1.3 and PHP 4.3.4 My domain server runs MySQL 5.0.27 and PHP 4.4.4 As you can see, the "evil" server is midway between my (admittedly ancient) computer setup and my own domain provider with PHP, but is using a pretty old version of MySQL. Anyone got any ideas why this is happening? Incidentally, I've got this problem of random data fields not being written to the db on other modules on the same site, so it's unlikely to be a bug with NewsDesk itself. Quote Link to comment Share on other sites More sharing options...
Code Red Posted February 1, 2007 Share Posted February 1, 2007 Ignore that... should have checked the contribution page first, easily fixed! :-" Quote Link to comment Share on other sites More sharing options...
gregy Posted February 16, 2007 Share Posted February 16, 2007 Hi guys I searched down to page 3 and didn't find answer to my problem... I'm using this contrib for two years .. works like a charm, but now i would like to display Category name before Title on index.php i.e. Sport: New matchgame today - friday, 2 2007 hjjkh jkh kjhj hjk hjkh jkh kjh jkh jkhjkh jkh [read more] Culture: Concert in memoriam - friday, 4 2007 wer wwer werwerfsdg er vdfbv ersgvghtr dbvdfbgtr gev dv ergev [read more] any idea how to do this .. of course categories are created and news are in those categories .. Thanks in advance for help! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 28, 2007 Share Posted February 28, 2007 Installed the 1.49 version, and the catalog section appears to work fine, and in admin everything appears to work fine except when you click on Article Management, then all I get is a completely blank page, no header, footer or columns. But I don't get any error messages. Any ideas of what I might have overlooked? Quote Link to comment Share on other sites More sharing options...
gregy Posted February 28, 2007 Share Posted February 28, 2007 you should turn ON Error reporting in php.ini, so you can see what error lies below! Quote Link to comment Share on other sites More sharing options...
Guest Posted February 28, 2007 Share Posted February 28, 2007 you should turn ON Error reporting in php.ini, so you can see what error lies below! Thats what I get for not fuly understanding PHP and doing it late at night. Here is the error that I'm getting PHP Parse error: syntax error, unexpected '{' in /hermes/web09/b2833/pow.bcbigwolf/htdocs/ceramics/catalog/admin/newsdesk.php on line 16 and here are lines 1 - 22 of newsdesk.php <?php require('includes/application_top.php'); require('includes/functions/newsdesk_general.php'); if ($HTTP_GET_VARS['action']) { switch ($HTTP_GET_VARS['action']) { // ------------------------------------------------------------------------------------------------------------------------------------------------------------- case 'unlink_image': // ------------------------------------------------------------------------------------------------------------------------------------------------------------- // delete file (if exists) $filename = tep_get_local_path(DIR_FS_CATALOG_IMAGES . $HTTP_GET_VARS['newsdesk_image']); try { [b]This is line 16[/b] if (file_exists($filename)) unlink($filename); } catch(Exception $e) { $filename=''; } Quote Link to comment Share on other sites More sharing options...
www.in.no Posted March 12, 2007 Share Posted March 12, 2007 Look like a typo.... Try to remove that line completly.. try { [b]This is line 16[/b] Quote Link to comment Share on other sites More sharing options...
Guest Posted March 12, 2007 Share Posted March 12, 2007 Hi, Does anyone know how to integrate this contribution with the Ultimate SEO contribution? Everything else on my site is using the Ultimate SEO and I would love for this contribution to do the same. If anyone can help that would be great! Thanks so much, Jamie Quote Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2007 Share Posted March 16, 2007 I am getting the same problem as FHCeramics: Parse error: parse error, unexpected '{' in /home2/alter/alternativesportsconnection-www/catalog/admin/newsdesk.php on line 16 case 'unlink_image': // ------------------------------------------------------------------------------------------------------------------------------------------------------------- 13 // delete file (if exists) 14 $filename = tep_get_local_path(DIR_FS_CATALOG_IMAGES . $HTTP_GET_VARS['newsdesk_image']); 15 [b]16[/b] try { 17 if (file_exists($filename)) unlink($filename); 18 } 19 catch(Exception $e) 20 { 21 $filename=''; 22 } I have the latest files from contribution section as of today. any ideas? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2007 Share Posted March 16, 2007 it seems to work fine if i remove lines 16-22... Quote Link to comment Share on other sites More sharing options...
ncrusader82 Posted March 17, 2007 Share Posted March 17, 2007 Had the same problem, removed those lines, works now. Haven't found any ill effects, what exactly were those lines for? (Does anyone know? :) ) Quote Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2007 Share Posted March 18, 2007 Thats what I get for not fuly understanding PHP and doing it late at night. Here is the error that I'm getting and here are lines 1 - 22 of newsdesk.php <?php require('includes/application_top.php');require('includes/functions/newsdesk_general.php'); if ($HTTP_GET_VARS['action']) { switch ($HTTP_GET_VARS['action']) { // -------------------------------------------------------------------------------------------------------------------------------------------------------------case 'unlink_image':// ------------------------------------------------------------------------------------------------------------------------------------------------------------- // delete file (if exists) $filename = tep_get_local_path(DIR_FS_CATALOG_IMAGES . $HTTP_GET_VARS['newsdesk_image']); try { [b]This is line 16[/b] if (file_exists($filename)) unlink($filename); } catch(Exception $e) { $filename=''; }[/quote] Thanks to Chris Dunning for the fix to this problem, here it is for anyone else that has the same problem:[quote]Find this section: try { if (file_exists($filename)) unlink($filename);}catch(Exception $e){$filename='';}Replace with this: if (file_exists($filename)) unlink($filename); That should take care of it. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2007 Share Posted March 22, 2007 Hi guys. I'm new to PHP and SQL and this is the first module I have installed after a successful osCommerce installation (on a hosted server). I apologize if this is an easy question. I'm getting this error when I try to look at my site: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /usr/www/users/osg/catalog/includes/functions/database.php on line 19 Unable to connect to database server! I an working with phpMyAdmin and it tells me that my socket is actually "mysql.sock1". I'm not sure if I should change something on the php file or on the socket settings, nor am I sure how to do either. Any thoughts/help is appreciated. :thumbsup: 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.