Latest News: (loading..)

muskokee

Members
  • Content count

    263
  • Joined

  • Last visited

About muskokee

Profile Information

  • Real Name
    Sheri
  • Gender
    Female
  • Location
    Ontario, Canada
  1. Thanks...I worked it out. Just wondering if there was a different way to test for permissions on the files this contrib uses instead of comparing them to other files that may or may not have the permissions outlined in the install instructions. Or, I guess...it could be noted there that the error messages are tied to the image directory. Again thanks for the contrib. The new version works great :thumbsup: Sheri
  2. Hi Jack, I just updated from 2.5.6 to 2.6.2 All went smoothly and everything seems to work as intended. Only one issue. The error messages at the top of header_tags_controller.php were appearing despite the permissions being set properly. Files were written as intended even though the error messages were there. I opened up the file to have a look and saw that the permissions of the two files are being determined "correct" if they match the permissions set on the images folder. Mine didn't! I just uploaded the site to a new server and the permissions for the image folder was auto-set to 755. Is there another way to test for permission value? Thanks for continuing to work on this contrib. Best, Sheri
  3. Hi everyone, I am once again working on an article manager addition. The last one was HERE. All the code and fixes are within that thread--it adds another date option to indicate when the article was written as opposed to the date it was added or the date it is available. My next mod involves showing a random article on the index page, default section (but could be placed anywhere really). I wrote the mod myself, but could not get it to behave properly..so I re-wrote this CONTRIB to work with the article table rather than the product table. Problem: this behaves exactly the same way my hand coded mod does What happens: The article is randomly chosen and displayed BUT the description or short description does not get displayed each and everytime the page is loaded. The name, and link work fine...just an empty description. VERY VERY FRUSTRATING. I cannot see what the problem is. Anyone else? <?php //SET THE QUERYS $sql_query = tep_db_query("select distinct a.articles_id, ad.articles_name, ad.articles_description from " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_ARTICLES . " a on a.articles_id = ad.articles_id where a.articles_status = '1' and a.articles_protected = '1' order by rand() limit " . MAX_DISPLAY_RANDOM_ARTICLES); $info_box_contents = array(); $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_ARTICLES)); new contentBoxHeading($info_box_contents); $info_box_contents = array(); $row = 0; $col = 0; $info_box_contents = array(); while ($new_articles = tep_db_fetch_array($sql_query)) { $new_articles['articles_name'] = tep_get_articles_name($new_articles['articles_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $new_articles['articles_id']) . '">' . $new_articles['articles_name'] . '</a><br>'.$new_articles['articles_description'] ); $col ++; if ($col > 2) { $col = 0; $row ++; } } new contentBox($info_box_contents); ?> Any help appreciated. :) Sheri PS - I have article manager 1.2 installed. I don't want to update the version as it is working just fine.
  4. FOUND IT and the modification to allow a written date of ANY time is complete. B) Here is the new code (found at about line 240) if (isset($HTTP_GET_VARS['aID'])) $articles_id = tep_db_prepare_input($HTTP_GET_VARS['aID']); $articles_date_available = tep_db_prepare_input($HTTP_POST_VARS['articles_date_available']); $articles_date_written = tep_db_prepare_input($HTTP_POST_VARS['articles_date_written']); $articles_date_available = (date('Y-m-d') < $articles_date_available) ? $articles_date_available : 'null'; $articles_date_written = ($articles_date_written) ? $articles_date_written : 'null'; removed the condition that required the written date to be greater than todays date and now all works as planned. For those of you following along as I talked to myself...No I am NOT crazy!LOL
  5. Alrighty then..progress is happening. (BTW, anyone is welcome to step in and comment at *any* time) The only trial I did not make was that of date_written as a date in the future. Well, I did and PRESTO! The date was accepted and entered into the database. This is most definately NOT what I want as the articles I am hoping to publish could have any date from today to years ago, to the future date I want to publish the article. I'm off to look at the code in depth to find that tricky little greater than sign :-"
  6. Another update: On the default page this code displays the dates: $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $aInfo->articles_id . '&action=new_article') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $aInfo->articles_id . '&action=delete_article') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $aInfo->articles_id . '&action=move_article') . '">' . tep_image_button('button_move.gif', IMAGE_MOVE) . '</a> <a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $aInfo->articles_id . '&action=copy_to') . '">' . tep_image_button('button_copy_to.gif', IMAGE_COPY_TO) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . tep_date_short($aInfo->articles_date_added)); if (tep_not_null($aInfo->articles_last_modified)) $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . tep_date_short($aInfo->articles_last_modified)); if (date('Y-m-d') < $aInfo->articles_date_available) $contents[] = array('text' => TEXT_DATE_AVAILABLE . ' ' . tep_date_short($aInfo->articles_date_available)); if (isset($aInfo->articles_date_written)) $contents[] = array('text' => TEXT_DATE_WRITTEN . ' ' . tep_date_short($aInfo->articles_date_written)); $contents[] = array('text' => '<br>' . TEXT_ARTICLES_AVERAGE_RATING . ' ' . number_format($aInfo->average_rating, 2) . '%'); I previously had the date_written identical to the date_available. I have changed it here and it does not get printed. Removing the isset condition allows the text to be written..but again...no date. ARRGH!!!!!!
  7. Update: I inserted a debugging script and it has confirmed that the spiffy cal is working as intended. The variable 'articles_date_written' is being 'POST'ed to the preview screen. But when I submit the form...be it update or insert, the date written is not transferred to the database. :unsure: Is there a debugging script that can show me what happened when the info was "inserted" into mysql? One more thing. I amended the script within the form like so: <?php if (isset($aInfo->articles_date_written)) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_ARTICLE_DATE_WRITTEN, tep_date_long($aInfo->articles_date_written)); ?></td> </tr> <?php } ?> The TEXT_ARTICLE_DATE_WRITTEN is visable on the preview screen but the tep_date_long is not. There is no date whatsoever.
  8. I have article manager 1.2 installed. I have coded in another date option to the admin file: articles.php. The date is not being entered into the articles table in mysql when the date is chosen from admin. I have gone over the new file at least 2 dozen times. Could someone take a look at the new code and hopefully see where I have gone wrong? Pretty Pretty Please? o:) The new code in question centers around the "articles_date_written" addition. I have added code to mimic "articles_date_available". There are other customizations within the file, but none of those are effecting the "new date feature". Thanks a million...whoever you are :thumbsup: <?php/* $Id: articles.php, v1.0 2003/12/04 12:00:00 ra Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); //BEGIN ACTION if (tep_not_null($action)) { // BEGIN SWITCH switch ($action) { case 'setflag': //article published if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { if (isset($HTTP_GET_VARS['aID'])) { tep_set_article_status($HTTP_GET_VARS['aID'], $HTTP_GET_VARS['flag']); } if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $HTTP_GET_VARS['tPath'] . '&aID=' . $HTTP_GET_VARS['aID'])); break; case 'setflags': //article protected if ( ($HTTP_GET_VARS['flags'] == '0') || ($HTTP_GET_VARS['flags'] == '1') ) { if (isset($HTTP_GET_VARS['aID'])) { tep_set_article_protected($HTTP_GET_VARS['aID'], $HTTP_GET_VARS['flags']); } if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $HTTP_GET_VARS['tPath'] . '&aID=' . $HTTP_GET_VARS['aID'])); break; case 'new_topic': case 'edit_topic': $HTTP_GET_VARS['action']=$HTTP_GET_VARS['action'] . '_ACD'; break; case 'insert_topic': case 'update_topic': if ( ($HTTP_POST_VARS['edit_x']) || ($HTTP_POST_VARS['edit_y']) ) { $HTTP_GET_VARS['action'] = 'edit_topic_ACD'; } else { if (isset($HTTP_POST_VARS['topics_id'])) $topics_id = tep_db_prepare_input($HTTP_POST_VARS['topics_id']); if ($topics_id == '') { $topics_id = tep_db_prepare_input($HTTP_GET_VARS['tID']); } $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $sql_data_array = array('sort_order' => $sort_order); if ($action == 'insert_topic') { $insert_sql_data = array('parent_id' => $current_topic_id, 'date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_TOPICS, $sql_data_array); $topics_id = tep_db_insert_id(); } elseif ($action == 'update_topic') { $update_sql_data = array('last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_TOPICS, $sql_data_array, 'update', "topics_id = '" . (int)$topics_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $language_id = $languages[$i]['id']; $sql_data_array = array('topics_name' => tep_db_prepare_input($HTTP_POST_VARS['topics_name'][$language_id]), 'topics_heading_title' => tep_db_prepare_input($HTTP_POST_VARS['topics_heading_title'][$language_id]), 'topics_description' => tep_db_prepare_input($HTTP_POST_VARS['topics_description'][$language_id])); if ($action == 'insert_topic') { $insert_sql_data = array('topics_id' => $topics_id, 'language_id' => $languages[$i]['id']); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_TOPICS_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_topic') { tep_db_perform(TABLE_TOPICS_DESCRIPTION, $sql_data_array, 'update', "topics_id = '" . (int)$topics_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'"); } } if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $topics_id)); break; } case 'delete_topic_confirm': if (isset($HTTP_POST_VARS['topics_id'])) { $topics_id = tep_db_prepare_input($HTTP_POST_VARS['topics_id']); $topics = tep_get_topic_tree($topics_id, '', '0', '', true); $articles = array(); $articles_delete = array(); for ($i=0, $n=sizeof($topics); $i<$n; $i++) { $article_ids_query = tep_db_query("select articles_id from " . TABLE_ARTICLES_TO_TOPICS . " where topics_id = '" . (int)$topics[$i]['id'] . "'"); while ($article_ids = tep_db_fetch_array($article_ids_query)) { $articles[$article_ids['articles_id']]['topics'][] = $topics[$i]['id']; } } reset($articles); while (list($key, $value) = each($articles)) { $topic_ids = ''; for ($i=0, $n=sizeof($value['topics']); $i<$n; $i++) { $topic_ids .= "'" . (int)$value['topics'][$i] . "', "; } $topic_ids = substr($topic_ids, 0, -2); $check_query = tep_db_query("select count(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int)$key . "' and topics_id not in (" . $topic_ids . ")"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { $articles_delete[$key] = $key; } } // removing topics can be a lengthy process tep_set_time_limit(0); for ($i=0, $n=sizeof($topics); $i<$n; $i++) { tep_remove_topic($topics[$i]['id']); } reset($articles_delete); while (list($key) = each($articles_delete)) { tep_remove_article($key); } } if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath)); break; case 'delete_article_confirm': if (isset($HTTP_POST_VARS['articles_id']) && isset($HTTP_POST_VARS['article_topics']) && is_array($HTTP_POST_VARS['article_topics'])) { $article_id = tep_db_prepare_input($HTTP_POST_VARS['articles_id']); $article_topics = $HTTP_POST_VARS['article_topics']; for ($i=0, $n=sizeof($article_topics); $i<$n; $i++) { tep_db_query("delete from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int)$article_id . "' and topics_id = '" . (int)$article_topics[$i] . "'"); } $article_topics_query = tep_db_query("select count(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int)$article_id . "'"); $article_topics = tep_db_fetch_array($article_topics_query); if ($article_topics['total'] == '0') { tep_remove_article($article_id); } } if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath)); break; case 'move_topic_confirm': if (isset($HTTP_POST_VARS['topics_id']) && ($HTTP_POST_VARS['topics_id'] != $HTTP_POST_VARS['move_to_topic_id'])) { $topics_id = tep_db_prepare_input($HTTP_POST_VARS['topics_id']); $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_topic_id']); $path = explode('_', tep_get_generated_topic_path_ids($new_parent_id)); if (in_array($topics_id, $path)) { $messageStack->add_session(ERROR_CANNOT_MOVE_TOPIC_TO_PARENT, 'error'); tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $topics_id)); } else { tep_db_query("update " . TABLE_TOPICS . " set parent_id = '" . (int)$new_parent_id . "', last_modified = now() where topics_id = '" . (int)$topics_id . "'"); if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $new_parent_id . '&tID=' . $topics_id)); } } break; case 'move_article_confirm': $articles_id = tep_db_prepare_input($HTTP_POST_VARS['articles_id']); $new_parent_id = tep_db_prepare_input($HTTP_POST_VARS['move_to_topic_id']); $duplicate_check_query = tep_db_query("select count(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int)$articles_id . "' and topics_id = '" . (int)$new_parent_id . "'"); $duplicate_check = tep_db_fetch_array($duplicate_check_query); if ($duplicate_check['total'] < 1) tep_db_query("update " . TABLE_ARTICLES_TO_TOPICS . " set topics_id = '" . (int)$new_parent_id . "' where articles_id = '" . (int)$articles_id . "' and topics_id = '" . (int)$current_topic_id . "'"); if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $new_parent_id . '&aID=' . $articles_id)); break; case 'insert_article': case 'update_article': if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) { $action = 'new_article'; } else { //begin of new or modified article if (isset($HTTP_GET_VARS['aID'])) $articles_id = tep_db_prepare_input($HTTP_GET_VARS['aID']); $articles_date_available = tep_db_prepare_input($HTTP_POST_VARS['articles_date_available']); $articles_date_written = tep_db_prepare_input($HTTP_POST_VARS['articles_date_written']); $articles_date_available = (date('Y-m-d') < $articles_date_available) ? $articles_date_available : 'null'; $articles_date_written = (date('Y-m-d') < $articles_date_written) ? $articles_date_written : 'null'; $sql_data_array = array('articles_date_available' => $articles_date_available, 'articles_date_written' => $articles_date_written, 'articles_status' => tep_db_prepare_input($HTTP_POST_VARS['articles_status']), 'articles_protected' => tep_db_prepare_input($HTTP_POST_VARS['articles_protected']), 'authors_id' => tep_db_prepare_input($HTTP_POST_VARS['authors_id'])); if ($action == 'insert_article') { // If expected article then articles_date _added becomes articles_date_available if (isset($HTTP_POST_VARS['articles_date_available']) && tep_not_null($HTTP_POST_VARS['articles_date_available'])) { $insert_sql_data = array('articles_date_added' => tep_db_prepare_input($HTTP_POST_VARS['articles_date_available'])); } else { $insert_sql_data = array('articles_date_added' => 'now()'); } $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_ARTICLES, $sql_data_array); $articles_id = tep_db_insert_id(); tep_db_query("insert into " . TABLE_ARTICLES_TO_TOPICS . " (articles_id, topics_id) values ('" . (int)$articles_id . "', '" . (int)$current_topic_id . "')"); } elseif ($action == 'update_article') { $update_sql_data = array('articles_last_modified' => 'now()'); // If expected article then articles_date _added becomes articles_date_available if (isset($HTTP_POST_VARS['articles_date_available']) && tep_not_null($HTTP_POST_VARS['articles_date_available'])) { $update_sql_data = array('articles_date_added' => tep_db_prepare_input($HTTP_POST_VARS['articles_date_available'])); } $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_ARTICLES, $sql_data_array, 'update', "articles_id = '" . (int)$articles_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $language_id = $languages[$i]['id']; $sql_data_array = array('articles_name' => tep_db_prepare_input($HTTP_POST_VARS['articles_name'][$language_id]), 'articles_short' => tep_db_prepare_input($HTTP_POST_VARS['articles_short'][$language_id]), 'articles_description' => tep_db_prepare_input($HTTP_POST_VARS['articles_description'][$language_id]), 'articles_url' => tep_db_prepare_input($HTTP_POST_VARS['articles_url'][$language_id]), 'articles_head_title_tag' => tep_db_prepare_input($HTTP_POST_VARS['articles_head_title_tag'][$language_id]), 'articles_head_desc_tag' => tep_db_prepare_input($HTTP_POST_VARS['articles_head_desc_tag'][$language_id]), 'articles_head_keywords_tag' => tep_db_prepare_input($HTTP_POST_VARS['articles_head_keywords_tag'][$language_id])); if ($action == 'insert_article') { $insert_sql_data = array('articles_id' => $articles_id, 'language_id' => $language_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_ARTICLES_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_article') { tep_db_perform(TABLE_ARTICLES_DESCRIPTION, $sql_data_array, 'update', "articles_id = '" . (int)$articles_id . "' and language_id = '" . (int)$language_id . "'"); } } if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&aID=' . $articles_id)); } //end of new or modified article break; case 'copy_to_confirm': if (isset($HTTP_POST_VARS['articles_id']) && isset($HTTP_POST_VARS['topics_id'])) { $articles_id = tep_db_prepare_input($HTTP_POST_VARS['articles_id']); $topics_id = tep_db_prepare_input($HTTP_POST_VARS['topics_id']); if ($HTTP_POST_VARS['copy_as'] == 'link') { if ($topics_id != $current_topic_id) { $check_query = tep_db_query("select count(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where articles_id = '" . (int)$articles_id . "' and topics_id = '" . (int)$topics_id . "'"); $check = tep_db_fetch_array($check_query); if ($check['total'] < '1') { tep_db_query("insert into " . TABLE_ARTICLES_TO_TOPICS . " (articles_id, topics_id) values ('" . (int)$articles_id . "', '" . (int)$topics_id . "')"); } } else { $messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_TOPIC, 'error'); } } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { $article_query = tep_db_query("select articles_date_available, authors_id from " . TABLE_ARTICLES . " where articles_id = '" . (int)$articles_id . "'"); $article = tep_db_fetch_array($article_query); tep_db_query("insert into " . TABLE_ARTICLES . " (articles_date_added, articles_date_available, articles_date_written, articles_status, articles_protected, authors_id) values (now(), '" . tep_db_input($article['articles_date_available']) . "', '" . tep_db_input($article['articles_date_written']) . "', '0', '" . "', '0', '" . (int)$article['authors_id'] . "')"); $dup_articles_id = tep_db_insert_id(); $description_query = tep_db_query("select language_id, articles_name, articles_short, articles_description, articles_url, articles_head_title_tag, articles_head_desc_tag, articles_head_keywords_tag from " . TABLE_ARTICLES_DESCRIPTION . " where articles_id = '" . (int)$articles_id . "'"); while ($description = tep_db_fetch_array($description_query)) { tep_db_query("insert into " . TABLE_ARTICLES_DESCRIPTION . " (articles_id, language_id, articles_name, articles_short, articles_description, articles_url, articles_head_title_tag, articles_head_desc_tag, articles_head_keywords_tag, articles_viewed) values ('" . (int)$dup_articles_id . "', '" . (int)$description['language_id'] . "', '" . tep_db_input($description['articles_name']) . "', '" . tep_db_input($description['articles_description']) . "', '" . tep_db_input($description['articles_url']) . "', '" . tep_db_input($description['articles_head_title_tag']) . "', '" . tep_db_input($description['articles_head_desc_tag']) . "', '" . tep_db_input($description['articles_head_keywords_tag']) . "', '0')"); } tep_db_query("insert into " . TABLE_ARTICLES_TO_TOPICS . " (articles_id, topics_id) values ('" . (int)$dup_articles_id . "', '" . (int)$topics_id . "')"); $articles_id = $dup_articles_id; } if (USE_CACHE == 'true') { //tep_reset_cache_block('categories'); //osC_JCSSartMenu - clear cache tep_db_query("DELETE FROM cache WHERE cache_name = 'osC_JCSSartMenu'"); } } tep_redirect(tep_href_link(FILENAME_ARTICLES, 'tPath=' . $topics_id . '&aID=' . $articles_id)); break; } // END SWITCH } // END ACTION // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES)) { if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <?php // BOF: WebMakers.com Changed: Header Tag Controller v1.0 // Replaced by header_tags.php if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) { require(DIR_WS_INCLUDES . 'header_tags.php'); } else { ?> <title><?php echo TITLE ?></title> <?php } // EOF: WebMakers.com Changed: Header Tag Controller v1.0 ?> <script language="Javascript1.2"><!-- // load htmlarea // MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 - 2.2 MS2 Articles Description HTML - Head _editor_url = "<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN; ?>htmlarea/"; // URL to htmlarea files var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } <?php if (ARTICLE_MANAGER_WYSIWYG_BASIC == 'Basic'){ ?> if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_basic.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } <?php } else{ ?> if (win_ie_ver >= 5.5) { document.write('<scr' + 'ipt src="' +_editor_url+ 'editor_advanced.js"'); document.write(' language="Javascript1.2"></scr' + 'ipt>'); } else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); } <?php }?> // --></script> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <div id="spiffycalendar" class="text"></div> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php //----- new_topic / edit_topic ----- if ($HTTP_GET_VARS['action'] == 'new_topic_ACD' || $HTTP_GET_VARS['action'] == 'edit_topic_ACD') { if ( ($HTTP_GET_VARS['tID']) && (!$HTTP_POST_VARS) ) { $topics_query = tep_db_query("select t.topics_id, td.topics_name, td.topics_heading_title, td.topics_description, t.parent_id, t.sort_order, t.date_added, t.last_modified from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.topics_id = '" . $HTTP_GET_VARS['tID'] . "' and t.topics_id = td.topics_id and td.language_id = '" . $languages_id . "' order by t.sort_order, td.topics_name"); $topic = tep_db_fetch_array($topics_query); $tInfo = new objectInfo($topic); } elseif ($HTTP_POST_VARS) { $tInfo = new objectInfo($HTTP_POST_VARS); $topics_name = $HTTP_POST_VARS['topics_name']; $topics_heading_title = $HTTP_POST_VARS['topics_heading_title']; $topics_description = $HTTP_POST_VARS['topics_description']; $topics_url = $HTTP_POST_VARS['topics_url']; } else { $tInfo = new objectInfo(array()); } $languages = tep_get_languages(); $text_new_or_edit = ($HTTP_GET_VARS['action']=='new_topic_ACD') ? TEXT_INFO_HEADING_NEW_TOPIC : TEXT_INFO_HEADING_EDIT_TOPIC; ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo sprintf($text_new_or_edit, tep_output_generated_topic_path($current_topic_id)); ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr><?php echo tep_draw_form('new_topic', FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $HTTP_GET_VARS['tID'] . '&action=new_topic_preview', 'post', 'enctype="multipart/form-data"'); ?> <td><table border="0" cellspacing="0" cellpadding="2"> <?php for ($i=0; $i<sizeof($languages); $i++) { ?> <tr> <td class="main"><?php if ($i == 0) echo TEXT_EDIT_TOPICS_NAME; ?></td> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('topics_name[' . $languages[$i]['id'] . ']', (($topics_name[$languages[$i]['id']]) ? stripslashes($topics_name[$languages[$i]['id']]) : tep_get_topic_name($tInfo->topics_id, $languages[$i]['id']))); ?></td> </tr> <?php } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php for ($i=0; $i<sizeof($languages); $i++) { ?> <tr> <td class="main"><?php if ($i == 0) echo TEXT_EDIT_TOPICS_HEADING_TITLE; ?></td> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('topics_heading_title[' . $languages[$i]['id'] . ']', (($topics_name[$languages[$i]['id']]) ? stripslashes($topics_name[$languages[$i]['id']]) : tep_get_topic_heading_title($tInfo->topics_id, $languages[$i]['id']))); ?></td> </tr> <?php } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <?php for ($i=0; $i<sizeof($languages); $i++) { ?> <tr> <td class="main" valign="top"><?php if ($i == 0) echo TEXT_EDIT_TOPICS_DESCRIPTION; ?></td> <td><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td> <td class="main"><?php echo tep_draw_textarea_field('topics_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (($topics_description[$languages[$i]['id']]) ? stripslashes($topics_description[$languages[$i]['id']]) : tep_get_topic_description($tInfo->topics_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr> <?php } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_EDIT_SORT_ORDER; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sort_order', $tInfo->sort_order, 'size="2"'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main" align="right"><?php echo tep_draw_hidden_field('topics_date_added', (($tInfo->date_added) ? $tInfo->date_added : date('Y-m-d'))) . tep_draw_hidden_field('parent_id', $tInfo->parent_id) . tep_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $tPath . '&tID=' . $HTTP_GET_VARS['tID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </form></tr> <?php //MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 - 2.2 MS2 Articles Description HTML - </form> if (ARTICLE_WYSIWYG_ENABLE == 'Enable') { ?> <script language="JavaScript1.2" defer> // MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 Articles Description HTML - Head var config = new Object(); config.width = "<?php echo ARTICLE_MANAGER_WYSIWYG_WIDTH; ?>px"; config.height = "<?php echo ARTICLE_MANAGER_WYSIWYG_HEIGHT; ?>px"; config.bodyStyle = 'background-color: <?php echo ARTICLE_MANAGER_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo ARTICLE_MANAGER_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo ARTICLE_MANAGER_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo ARTICLE_MANAGER_WYSIWYG_FONT_SIZE; ?>pt;'; config.debug = <?php echo ARTICLE_MANAGER_WYSIWYG_DEBUG; ?>; // More Configs can added here: // Dreamscape added Dynamic Language Function <?php for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { ?> editor_generate('topics_description[<?php echo $languages[$i]['id']; ?>]',config); <?php } ?> </script> <?php } //----- new_topic_preview ----- } elseif ($HTTP_GET_VARS['action'] == 'new_topic_preview') { if ($HTTP_POST_VARS) { $tInfo = new objectInfo($HTTP_POST_VARS); $topics_name = $HTTP_POST_VARS['topics_name']; $topics_heading_title = $HTTP_POST_VARS['topics_heading_title']; $topics_description = $HTTP_POST_VARS['topics_description']; } else { $topic_query = tep_db_query("select t.topics_id, td.language_id, td.topics_name, td.topics_heading_title, td.topics_description, t.sort_order, t.date_added, t.last_modified from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.topics_id = td.topics_id and t.topics_id = '" . $HTTP_GET_VARS['tID'] . "'"); $topic = tep_db_fetch_array($topic_query); $tInfo
  9. There is nothing you can do about this. Flash and Quicktime movies sit on top of everything. Adding z-index will not work. This is THE ONLY solution I have found: http://blog.deconcept.com/swfobject/ It also tackles the IE issue for flash. Good luck, Sheri
  10. OK. so I figured out the problem (it was staring me in the face :blush: ) HOW in the world can I attach a value to the variable when that value doesn't yet exist? Doh! I can't give $config_cache_file the value of a configuration value that I haven't yet queried! Doh! Sheri
  11. Update on this. It DID in fact create the cache file but called it: CONFIG_CACHE_DIR and placed it in the admin directory. HMMMM!?
  12. Hi eww, admin/includes/configuration_cache_read.php $config_cache_file = '/home/YOUR USER NAME/cache/config_cache.php'; $config_cache_compress = 'false'; $config_cache_compression_level = 1; catalog/includes/configuration_cache_read.php $config_cache_file = '/home/YOUR USER NAME/cache/config_cache.php'; Let me know if I can help more. I have had this working on a couple of projects so far. Sheri
  13. Hi everyone, I am trying to rebuild the admin side of this contribution. It seems it was abandoned with version1.3. I am trying to make all contributions accessible through admin for a client. This is what I have done: Ran sql statements such as: INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( '', 'Enable Configuration Cache', 'ENABLE_CONFIG_CACHE', 'false', 'Enable or Disable Configuration Cache: enabling recommended for lower page parse times', '11', '3', NULL , NOW( ) , NULL , 'tep_cfg_select_option(array(''true'', ''false''),' ); to load the variables and values into the database making them accessible through the admin. I have changed the values of the variables used in the configuration_cache_read.php (both admin and catalog) to look like this: (admin example) $config_cache_file = 'CONFIG_CACHE_DIR'; // this should be to a file in a folder *outside* of your webroot with 777 permissions. $config_cache_compress = 'CONFIG_CACHE_COMPRESS'; // be sure to enclose in single quotes. $config_cache_compression_level = CONFIG_CACHE_COMPRESS_LEVEL; // 1 is the lowest and 4 is the highest. 1 should be used on busy and/or shared servers. $config_cache_read = ENABLE_CONFIG_CACHE; if (isset($config_cache_file) && $config_cache_file != '') { if (file_exists($config_cache_file)) { include($config_cache_file); $config_cache_read = true; } } if ($config_cache_read == false) { $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION); while ($configuration = tep_db_fetch_array($configuration_query)) { define($configuration['cfgKey'], $configuration['cfgValue']); } } BUT this is not working! I cannot see why it wouldn't. If anyone has any insight...send it my way!LOL Sheri P.S. I have run debugging emails and it seems CONFIG_CACHE_DIR is not translating into the actual address that is within the database configuration table.??
  14. Oh well, I found the answer elsewhere.
  15. Can anyone tell me what the code is for the link buttons in this flash contribution? I use SWISHmax rather than adobes product and cannot open the .fla file to retrieve the code. Greatly appreciated. Sheri