Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

NewsDesk v1.48 Support


241

Recommended Posts

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 by mpm
Link to comment
Share on other sites

  • Replies 548
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...
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 by mpm
Link to comment
Share on other sites

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 by yatahaze
Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...

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!

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 3 weeks later...

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!

Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
Share on other sites

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='';
}

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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:

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