Jump to content
Sign in to follow this  
241

NewsDesk v1.48 Support

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

For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
Share on other sites

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.


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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?


Your help and suggestions are greatly appreciated.

Thanks

Wayne

Share this post


Link to post
Share on other sites

you should turn ON Error reporting in php.ini, so you can see what error lies below!

Share this post


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


Your help and suggestions are greatly appreciated.

Thanks

Wayne

Share this post


Link to post
Share on other sites

Look like a typo....

 

Try to remove that line completly..

 

	try {	[b]This is line 16[/b]

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Had the same problem, removed those lines, works now. Haven't found any ill effects, what exactly were those lines for? (Does anyone know? :) )

Share this post


Link to post
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.


Your help and suggestions are greatly appreciated.

Thanks

Wayne

Share this post


Link to post
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:

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  

×