Jump to content

mazza

Members
  • Content count

    220
  • Joined

  • Last visited

Everything posted by mazza

  1. This is most likely the easiest to install and most thorough contribution ever. The only thing I found odd was that when 'Enter special character conversions' AND 'Remove all non-alphanumeric characters' were enabled, only the latter was applied. Maybe more logical way would be to first apply 'Enter special character conversions' for those characters that are useful on the URL (like ?=>a,?=>o,?=>A,?=>O) and after that bulletproof the rest with 'Remove all non-alphanumeric characters' ? If I understand the code correctly this function handles both of those tasks: function strip($string){ $pattern = $this->attributes['SEO_REMOVE_ALL_SPEC_CHARS'] == 'true' ? "([^[:alnum:]])+" : "([[:punct:]])+"; $anchor = ereg_replace($pattern, '', strtolower($string)); $pattern = "([[:space:]]|[[:blank:]])+"; $anchor = ereg_replace($pattern, '-', $anchor); if ( is_array($this->attributes['SEO_CHAR_CONVERT_SET']) ) $anchor = strtr($anchor, $this->attributes['SEO_CHAR_CONVERT_SET']); return $this->short_name($anchor); // return the short filtered name } # end function Any tips on how to make this happen ? I tried changinc the order of code but it not work.
  2. mazza

    [Contribution]osC FireFox Conqueries

    Sure. Note this is propably not compatible with normal installations as I have my shop set up very differently from the stock directory/url scheme. This is on categories.php when inserting an new product, but the principle is the same for other pages/actions too. First getting an hidden form field if URL variable "&mode=inplace" is set: <?php if ($_GET['mode'] == 'inplace') { ?> <input type="hidden" name="mode" value="inplace" /> <?php } ?> This needs to be repeated in the preview section if ($_POST['mode'] == 'inplace') { echo '<input type="hidden" name="mode" value="inplace" />'; } Finally after everything is inserted to database, last in the case statement 'update_product': Find tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); Replace with: if ($_POST['mode'] == 'inplace') { tep_redirect(HTTP_CATALOG_SERVER . 'product_info.php?products_id=' . $products_id); } else { tep_redirect(tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products_id)); }
  3. mazza

    [Contribution]osC FireFox Conqueries

    This is really handy. Thank you. I needed to modify the files slightly since I am using Chemo's ULTIMATE SEO contribution. If someone else needs these, here is the modification: Change: showif="products_id=([0-9]+)" To: showif="-p-([0-9]+)" I also added this to all files: <input name="mode" value="inplace"> This is to let admin side know that we are coming from catalog. For example on categories.php you could have redirect back to catalog side after editing category or product.
  4. mazza

    Purchase Without Account

    This little hack sends customers straight to order info instead of making him choose between the 3 options. if (PWA_ON == 'false') { require(DIR_WS_INCLUDES . FILENAME_PWA_ACC_LOGIN); } else { tep_redirect(tep_href_link(FILENAME_CHECKOUT, '', 'SSL')); }
  5. This one replaces the Standard navigation bar (left side navigation) with horizontal dhtml menu in admin. * Reduces page loads. * Takes up less space contribution: http://www.oscommerce.com/community/contributions,1140 I have not created this, just implemented it. The original files, demo and tutorial can be found at: http://brainjar.com/dhtml/menubar/
  6. onload="SetFocus(); onload="HTMLArea.replaceAll()" This does not seem right. Try removing: onload="SetFocus();
  7. mazza

    Article Manager v1.0

    I got images working on articles manager. Just use the code from categories.php and add article_image filed to articles table.
  8. mazza

    Article Manager v1.0

    Corrected new_articles.php: <?php $articles_new_array = array(); $articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name"; $articles_new_split = new splitPageResults($articles_new_query_raw, MAX_NEW_ARTICLES_PER_PAGE); ?> <?php if ($articles_new_split->number_of_rows > 0) { $articles_new_query = tep_db_query($articles_new_split->sql_query); ?> <div class="cbox" id="newa"> <h2><?php echo TEXT_NEW_ARTICLES; ?></h2> <table class="listing"> <?php while ($articles_new = tep_db_fetch_array($articles_new_query)) { ?> <tr> <td><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_new['articles_id']) . '">' . $articles_new['articles_name']. '</a>' ?></td> <td class="c"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $articles_new['topics_id']) . '">' . $articles_new['topics_name'] . '</a>'; ?></td> <td class="r"><?php echo tep_date_long($articles_new['articles_date_added']); ?></td> </tr> <?php } // End of listing loop echo '</table></div>'; } else { ?> <?php } ?>
  9. mazza

    Article Manager v1.0

    Something to get you going: New file (new_articles.php) in modules: <?php $articles_new_array = array(); $articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name"; $articles_new_split = new splitPageResults($articles_new_query_raw, MAX_NEW_ARTICLES_PER_PAGE); ?> <?php if ($articles_new_split->number_of_rows > 0) { $articles_new_query = tep_db_query($articles_new_split->sql_query); ?> <div class="cbox" id="newa"> <h2><?php echo TEXT_NEW_ARTICLES; ?></h2> <table class="listing"> <?php while ($articles_new = tep_db_fetch_array($articles_new_query)) { ?> <tr> <td><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'name=' . tep_spider_name($articles_new['articles_name']) .'&' . 'articles_id=' . $articles_new['articles_id']) . '">' . $articles_new['articles_name']. '</a>' ?></td> <td class="c"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLES, . 'tPath=' . $articles_new['topics_id']) . '">' . $articles_new['topics_name'] . '</a>'; ?></td> <td class="r"><?php echo tep_date_long($articles_new['articles_date_added']); ?></td> </tr> <?php } // End of listing loop echo '</table></div>'; } else { ?> <?php } ?> In index.php: <?php require(DIR_WS_MODULES . 'new_articles.php');?> Has some of my own html since I hate the bloat OSC generates.
  10. That would mean every file under the Catalog folder. ps. you might want to use this one: <link rel="stylesheet" type="text/css" href="<?php echo THEME_STYLE;?>">
  11. mazza

    Search engines eating my bandwidth

    There the new Bot from Microsoft that seems to be quite aggressive.
  12. I amy not be able to complete these but here is the ideas: ------------------------------------------------------------ Coming products: - based on specials.php - sql from upcoming_products.php Sold-out needs one extra field to products table (like 0 or 1) modifications to categories.php to insert the value. Similar to out stock/in stock. product listing to have two extra lines: coming (xx.xx.xxxx) close out ( xx left) function similar to specials. Logig would be if the product is marked as sale out, it would print the close out text and quantity and include it to page called ?close-outs?. if release date is smaller than current date, it would be marked as coming. -------------------------------------------------------------------------------- If anyone could give me some suggestions or even work with me on these it would be great since my php skills are not what they should be.
  13. I think this is the place that needs modification: // XXX: COULD USE MORE SANITY CHECKS $price = $product_info['products_price']; // DEFAULT PRICE
  14. BTW does this use 2.x or the 3.x ? I noticed that while 2.x made the same crappy mshtml all IE based javascript gimmicks use, the 3.x makes almost perfect xhtml capable html.
  15. In addition to having specials end with date: start with date by product quantities (like 100 sold with special price)
  16. Hmm... Maybe I should have used "unfortunately" instead of "too bad". My apologies if it sounded too negative. That was not my intention as this is one of those rare contributions that has potential to be useful to alot of shops. However the missing feature does limit its potential to shops with one language. I would be more than happy to help with the coding as far as I can.
  17. Looks real nice. Too bad it is not multilingual so we cannot use it :( Heres the sql-plan if you are planning to add this feature: # Links Manager for OSC v0.2 # # Table structure for table `exchange_links_categories` # CREATE TABLE exchange_links_categories ( link_category_id int(11) NOT NULL auto_increment, link_category_contact varchar(96) NOT NULL default '', link_category_email varchar(96) NOT NULL default '', link_category_rating int(11) default NULL, link_category_date datetime NOT NULL default '0000-00-00 00:00:00', link_category_status int(1) NOT NULL default '1', PRIMARY KEY (link_category_id) ) TYPE=MyISAM; # -------------------------------------------------------- # # Table structure for table `exchange_links_categories_description` # CREATE TABLE exchange_links_categories_description ( link_category_id int(11) NOT NULL auto_increment, link_category_name varchar(64) NOT NULL default '', language_id int(11) NOT NULL default '0', link_category_description text, PRIMARY KEY (link_category_id) ) TYPE=MyISAM; # # Table structure for table `exchange_links_links` # CREATE TABLE exchange_links_links ( link_category_id int(11) NOT NULL default '0', link_id int(11) NOT NULL auto_increment, link_url varchar(255) NOT NULL default '', link_contact varchar(96) NOT NULL default '', link_email varchar(96) NOT NULL default '', link_reciprocal varchar(255) NOT NULL default '', link_rating int(11) default NULL, link_date datetime NOT NULL default '0000-00-00 00:00:00', link_status int(1) NOT NULL default '1', PRIMARY KEY (link_id,link_category_id) ) TYPE=MyISAM; # # Table structure for table `exchange_links_links_description ` # CREATE TABLE exchange_links_links_description ( language_id int(11) NOT NULL default '0', link_id int(11) NOT NULL auto_increment, link_title varchar(255) NOT NULL default '', link_description text, PRIMARY KEY (link_id,link_category_id) ) TYPE=MyISAM;
  18. I am having probles with this one. The default admin works okay even after I modufied the information, but all other accounts do not login. The system redirects and redirects until browser reaches its limit of redirects or starts to download login.php where it says: <td class="login"><input type="text" name="email_address"></td> </tr> <tr> <td class="login">Salasana:</td> <td class="login"><input type="password" name="password" maxlength="40"></td> </tr> <tr> <td colspan="2" align="right" valign="top"><input type="image" src="includes/languages/finnish/images/buttons/button_confirm.gif" border="0" alt="Submit"></td> </tr> </table></td></tr> </table> </td> </tr> <tr> <td valign="top" align="right"><a class="sub" href="/password_forgotten.php">Password forgotten?</a><span class="sub"> </span></td> </tr> </table> </form> </td> </tr> </table></td> </tr> <tr> <td><br> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="center" class="smallText"> E-Commerce Engine Copyright © 2002 <a href="http://www.oscommerce.com" target="_blank">osCommerce</a><br> osCommerce provides no warranty and is redistributable under the <a href="http://www.fsf.org/licenses/gpl.txt" target="_blank">GNU General Public License</a> </td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="1" height="5"></td> </tr> <tr> <td align="center" class="smallText">Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></td> </tr> </table> </td> </tr> </table></td> </tr> </table> </body> </html> 0 HTTP/1.1 302 Found Date: Tue, 20 May 2003 00:51:50 GMT Server: Apache/1.3.26 (Unix) Debian GNU/Linux mod_python/2.7.8 Python/2.1.3 PHP/4.3.1 mod_throttle/3.1.2 mod_ssl/2.8.9 OpenSSL/0.9.6g X-Powered-By: PHP/4.3.1 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Location: login.php?%2Findex.php%3F%252Findex.php%253F%25252Findex.php%25253F%2525252Findex.php%2525253F%252525252Findex.php%252525253F%25252525252Findex.php%25252525253F%2525252525252Findex.php%2525252525253F%252525252525252Findex.php%252525252525253F%25252525252525252Findex.php%25252525252525253F%2525252525252525252Findex.php%2525252525252525253F%252525252525252525252Findex.php%252525252525252525253F%25252525252525252525252Findex.php%25252525252525252525253F%2525252525252525252525252Findex.php%2525252525252525252525253F%252525252525252525252525252Findex.php%252525252525252525252525253F%25252525252525252525252525252Findex.php%25252525252525252525252525253F%2525252525252525252525252525252Findex.php Keep-Alive: timeout=3, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1 b23 <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="ltr" lang="fi"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>SSpower-hallinta</title> <style type="text/css"><!-- a { color:#080381; text-decoration:none; } a:hover { color:#aabbdd; text-decoration:underline; } a.text:link, a.text:visited { color: #ffffff; text-decoration: none; } a:text:hover { color: #000000; text-decoration: underline; } a.sub:link, a.sub:visited { color: #dddddd; text-decoration: none; } A.sub:hover { color: #dddddd; text-decoration: underline; } .sub { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; font-weight: bold; line-height: 1.5; color: #dddddd; } .text { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold; color: #000000; } .smallText { font-family: Verdana, Arial, sans-serif; font-size: 10px; } .login_heading { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #ffffff;} .login { font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #000000;} //--></style> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <table border="0" width="600" height="100%" cellspacing="0" cellpadding="0" align="center" valign="middle"> <tr> <td><table border="0" width="600" height="440" cellspacing="0" cellpadding="1" align="center" valign="middle"> <tr bgcolor="#000000"> <td><table border="0" width="600" height="440" cellspacing="0" cellpadding="0"> <tr bgcolor="#ffffff" height="50"> <td height="50"><img src="images/oscommerce.gif" border="0" alt="osCommerce" title=" osCommerce " width="204" height="50"></td> <td align="right" class="text" nowrap><a href="/index.php">Hallinta</a> | <a href="http://www.voimaharjoittelu.net/catalog2/">Katalogi</a> | <a href="http://www.oscommerce.com" target="_blank">Tuki-sivusto</a> </td> </tr> <tr bgcolor="#080381"> <td colspan="2" align="center" valign="middle"> <form name="login" action="/login.php?action=process" method="post"> <table width="280" border="0" cellspacing="0" cellpadding="2"> <tr> <td class="login_heading" valign="top"> <b>Login Panel:</b></td> </tr> <tr> <td height="100%" valign="top" align="center"> <table border="0" height="100%" cellspacing="0" cellpadding="1" bgcolor="#666666"> <tr><td><table border="0" width="100%" height="100%" cellspacing="3" cellpadding="2" bgcolor="#F0F0FF"> 5f <tr> <td colspan="2"> 8d7 <img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td> </tr> <tr> <td class="login">E-Mail:</td> <td class="login"><input type="text" name="email_address"></td> </tr> <tr> <td class="login">Salasana:</td> <td class="login"><input type="password" name="password" maxlength="40"></td> </tr> <tr> <td colspan="2" align="right" valign="top"><input type="image" src="includes/languages/finnish/images/buttons/button_confirm.gif" border="0" alt="Submit"></td> </tr> </table></td></tr> </table> </td> </tr> <tr> <td valign="top" align="right"><a class="sub" href="/password_forgotten.php">Password forgotten?</a><span class="sub"> </span></td> </tr> </table> </form> </td> </tr> </table></td> </tr> <tr> <td><br> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="center" class="smallText"> E-Commerce Engine Copyright © 2002 <a href="http://www.oscommerce.com" target="_blank">osCommerce</a><br> osCommerce provides no warranty and is redistributable under the <a href="http://www.fsf.org/licenses/gpl.txt" target="_blank">GNU General Public License</a> </td> </tr> <tr> <td><img src="images/pixel_trans.gif" border="0" alt="" width="1" height="5"></td> </tr> <tr> <td align="center" class="smallText">Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></td> </tr> </table> </td> </tr> </table></td> </tr> </table> </body> </html> 0
  19. mazza

    Multiple order update

    I took the page and and ran "convert to xhtml" in dreamweaver mx and after that the page is working. There seem to be some fatal mistakes on the html forms.
  20. There does not seem to be a multilingual feature yet as table web_site_content does not seem to have anything to seperate the different languages. Maybe creating a new coulumn like "language" could be created and sql statements in language files changed accordingly ?
  21. mazza

    BG Image in Center_Shop 1.0

    in you css-file: body { background-image: url(i_am_your_image.jpg); background-repeat: how is picture repeated; }
  22. mazza

    Static Page Generator

    Little addition : with semantic markup (especially headers and strong)
  23. Fatal error: Failed opening required 'includes/template/original_osc/blue/buttons.php' (include_path='.:/usr/share/pear') in /home/mattiputko/public_html/catalog/includes/template/original_osc/catalog.php on line 58 Can be fixed by removing <?php require(DIR_WS_SITE_FILES . '/buttons.php'); ?> on line 58 in catalog.php
  24. mazza

    All Products = Spider Food

    Greg, any change to get the code to include the categories also ? Maybe even manufacturers ?
  25. mazza

    Admin dhtml menu

    Made a demo to illustrate this. No links are working on demo. http://www.mpwebdesign.net/osCommerce.htm Hopefully someone with better skills in php will start to work on this to include access straigth to categories and sub-categories and maybe links straigth to specific actions like adding specials.
×