PDA

View Full Version : NewsDesk v1.48.3



coeus
06-30-2005, 10:36 PM
Hi, I just installed NewsDesk on oscMax 2 however when I try to go into the newsDesk admin it redirects me to forbidden.php. Anyone know what's wrong here?

jpf
07-01-2005, 06:37 AM
In ADMIN WITH LEVELS you may have to grant access to the user(s) for the PHP files for news desk.....

coeus
07-06-2005, 12:58 PM
Thanks, worked. I was wondering if you can also tell me why I get this error.

Warning: main(includes/header.php): failed to open stream: No such file or directory in /usr/www-root/kunder/www.gsmteknik.se/dev/newsdesk_info.php on line 106

Fatal error: main(): Failed opening required 'includes/header.php' (include_path='.:/usr/local/lib/php') in /usr/www-root/kunder/www.gsmteknik.se/dev/newsdesk_info.php on line 106

I believe this error has to deal with BTS system. It's looking for header.php but BTS doesn't use this file.

jpf
07-06-2005, 01:30 PM
Check ALL files you edited/changed for a BLANK SPACE or LINE at the END of the file....PHP does not like this.

coeus
07-07-2005, 11:27 AM
Hmm, i'm not sure what that's supposed to do. The php error complains about a missing file "header.php" which is not there because BTS doesn't need it. I guess what I'm asking is, newsDesk uses the default oscommerce template system. How can I convert the newsdesk file so that it uses BTS instead?

michael_s
07-07-2005, 11:43 AM
You have to update the mod to work with BTS or it will always give you that error. There is no way to explain this easily. Take a look at the existing structure of files in osCMax to get an idea how BTS works.

lane
07-14-2005, 03:06 PM
I have modified NewsDesk to work with v1.5 of osCMax ... I'd be happy to put those files somewhere if you'd like.

coeus
07-14-2005, 03:19 PM
That'd be cool. I got it to work on BTS 1.5 too, but i'm sure some other people may want it.

gregrr
09-11-2005, 12:55 PM
lane/coeus,

Would like very much the code toget it to work, getting error messages like:



Warning: main(templates/algo/TEMPLATE_NAME/main_page.tpl.php): failed to open stream: No such file or directory in /home/camdenbo/public_html/store/newsdesk_index.php on line 104

Warning: main(templates/algo/TEMPLATE_NAME/main_page.tpl.php): failed to open stream: No such file or directory in /home/camdenbo/public_html/store/newsdesk_index.php on line 104

Fatal error: main(): Failed opening required 'templates/algo/TEMPLATE_NAME/main_page.tpl.php' (include_path='') in /home/camdenbo/public_html/store/newsdesk_index.php on line 104


Test site here: http://store.camdenboatstore.com I have the individual .tpl files in content, but it seems a path issue?

Thanks in advance,
Greg[/url]

lane
09-11-2005, 02:01 PM
lane/coeus,

Would like very much the code toget it to work, getting error messages like:



Warning: main(templates/algo/TEMPLATE_NAME/main_page.tpl.php): failed to open stream: No such file or directory in /home/camdenbo/public_html/store/newsdesk_index.php on line 104

Warning: main(templates/algo/TEMPLATE_NAME/main_page.tpl.php): failed to open stream: No such file or directory in /home/camdenbo/public_html/store/newsdesk_index.php on line 104

Fatal error: main(): Failed opening required 'templates/algo/TEMPLATE_NAME/main_page.tpl.php' (include_path='') in /home/camdenbo/public_html/store/newsdesk_index.php on line 104


Test site here: http://store.camdenboatstore.com I have the individual .tpl files in content, but it seems a path issue?

Thanks in advance,
Greg[/url]
You don't have 'TEMPLATE_NAME' defined. I am running an early version of BTS w/o multiple template support, so I can't offer much help there. Maybe this will help, here is my newsdesk_index.php file:


<?php
require('includes/application_top.php');
require(DIR_WS_INCLUDES . 'functions/newsdesk_general.php');
// set application wide parameters --- this query set is for NewsDesk
$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_NEWSDESK_CONFIGURATION . "");
while ($configuration = tep_db_fetch_array($configuration_query)) {
define($configuration['cfgKey'], $configuration['cfgValue']);
}
// calculate category path
if ($HTTP_GET_VARS['newsPath']) {
$newsPath = $HTTP_GET_VARS['newsPath'];
} elseif ($HTTP_GET_VARS['newsdesk_id'] && !$HTTP_GET_VARS['manufacturers_id']) {
$newsPath = newsdesk_get_product_path($HTTP_GET_VARS['newsdesk _id']);
} else {
$newsPath = '';
}
if (strlen($newsPath) > 0) {
$newsPath_array = newsdesk_parse_category_path($newsPath);
$newsPath = implode('_', $newsPath_array);
$current_category_id = $newsPath_array[(sizeof($newsPath_array)-1)];
} else {
$current_category_id = 0;
}
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;
}
}
}

// the following newsPath references come from application_top.php
$category_depth = 'top';
if ($newsPath) {
$category_parent_query = tep_db_query(
"select count(*) as total from " . TABLE_NEWSDESK_CATEGORIES . " where parent_id = '" . $current_category_id . "'"
);
$category_parent = tep_db_fetch_array($category_parent_query);
if ($category_parent['total'] > 0) {
$category_depth = 'nested'; // navigate through the categories
} else {
$category_depth = 'products'; // category has no products, but display the 'no products' message
}
}
// ------------------------------------------------------------------------------------------------------------------------------------------
// Output a form pull down menu
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
function newsdesk_show_draw_pull_down_menu($name, $values, $default = '', $params = '', $required = false) {
$field = '<select name="' . $name . '"';
if ($params) $field .= ' ' . $params;
$field .= '>';
for ($i=0; $i<sizeof($values); $i++) {
$field .= '<option value="' . $values[$i]['id'] . '"';
if ( ($GLOBALS[$name] == $values[$i]['id']) || ($default == $values[$i]['id']) ) {
$field .= ' SELECTED';
}
$field .= '>' . $values[$i]['text'] . '</option>';
}
$field .= '</select>';
$field .= tep_hide_session_id();
if ($required) $field .= NEWS_TEXT_FIELD_REQUIRED;
return $field;
}
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_NEWSDESK_INDEX);
$content = 'newsdesk_index';
require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);
require(DIR_WS_INCLUDES . 'application_bottom.php');
/*
osCommerce, Open Source E-Commerce Solutions ---- http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
IMPORTANT NOTE:
This script is not part of the official osC distribution but an add-on contributed to the osC community.
Please read the NOTE and INSTALL documents that are provided with this file for further information and installation notes.

script name: NewsDesk
version: 1.48.2
date: 22-06-2004 (dd/mm/yyyy)
author: Carsten aka moyashi
web site: www..com
modified code by: Wolfen aka 241
*/
?>

gregrr
09-12-2005, 09:20 AM
Thanks lane,

It helped, as I can see how towards the bottom there is no reference to a template. However, I can see the listing, but individual news or categories are not showing up now. It also pushes column_right out of alignment, but I think I'm gaining.

Any idea?

Thanks,
Greg

lane
09-12-2005, 10:35 AM
Current problem seems to be that CONTENT_NEWSDESK_INFO is not defined. This is an extra define required for BTS in filenames.php (default location) and should be the same as the filename in most cases. ex:

define('FILENAME_NEWSDESK_INFO','newsdesk_info.php ');
define('CONTENT_NEWSDESK_INFO','newsdesk_info');

gregrr
09-12-2005, 10:55 AM
Success! Thankyou very much, all's working now and looks great.

Just one more itsy bitsy thing. In the browser Title bar, it says:




<title>NAVBAR_TITLE : Boating supplies, boat maintenance, boat electronics, sailboat hardware, nautical supplies, discount marine parts</title>
<base href="http://store.camdenboatstore.com/">
<meta name="description" content="Boating supplies, boat maintenance, boat electronics, sailboat hardware, nautical supplies, discount marine parts : NAVBAR_TITLE - Seating & Covers,Anchor & Docking," />
<meta name="keywords" content="Seating & Covers,Anchor & Docking,NAVBAR_TITLE" />


Where and how can I find this?

Thank you again!
Greg

lane
09-12-2005, 01:13 PM
I'm not familiar with this one of the top of my head (and my sources are not handy), but I'd suggest using google (or searching on the osC forums).

michael_s
09-12-2005, 01:17 PM
Just define the constant NAVBAR_TITLE in the language file that corresponds to whatever page is displaying the NAVBAR_TITLE

gregrr
09-12-2005, 03:33 PM
Thanks Michael,

Got it and working now, it wasn't defined before so I added it in.

Thanks everyone!
Greg