This is a discussion on NewsDesk v1.48.3 within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hi, I just installed NewsDesk on oscMax 2 however when I try to go into the newsDesk admin it redirects ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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? |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| In ADMIN WITH LEVELS you may have to grant access to the user(s) for the PHP files for news desk.....
__________________ JPF - osCMax Fourm Moderator Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#3
| |||
| |||
| 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. |
|
#4
| ||||
| ||||
| Check ALL files you edited/changed for a BLANK SPACE or LINE at the END of the file....PHP does not like this.
__________________ JPF - osCMax Fourm Moderator Try out our osCMax at: Live Catalog Demo Limited access Admin: Live Admin Demo Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped! |
|
#5
| |||
| |||
| 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? |
|
#6
| ||||
| ||||
| 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.
__________________ Michael Sasek osCMax Developer
|
|
#7
| ||||
| ||||
| I have modified NewsDesk to work with v1.5 of osCMax ... I'd be happy to put those files somewhere if you'd like. |
|
#8
| |||
| |||
| That'd be cool. I got it to work on BTS 1.5 too, but i'm sure some other people may want it. |
|
#9
| |||
| |||
| lane/coeus, Would like very much the code toget it to work, getting error messages like: Code: 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 Thanks in advance, Greg[/url] |
|
#10
| ||||
| ||||
| Quote:
Code: <?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
*/
?>
|
| Sponsored Links | ||
| ||