Jump to content


  • Posts

  • Joined

  • Last visited


About scottybwoy

  • Birthday 03/14/1983

Contact Methods

  • MSN

Profile Information

  • Gender
  • Location

scottybwoy's Achievements

Advanced Member

Advanced Member (4/5)



  1. Hi, Please forgive my ignorance of Javascript and jQuery. This may be a really simple issue. I'm using two plugins; gradient & gallerific. At the top of my page I have : <script type="text/javascript" src='js/gallerific.js'></script> <script type="text/javascript" src='js/gradient.js'></script> <script type="text/javascript"> $(document).ready(function() { $('body').gradient({ from: '2f9833', to: 'ffffff' }); }); </script> And this code at the bottom : <script type="text/javascript"> // We only want these styles applied when javascript is enabled $('div.navigation').css({'width' : '300px', 'float' : 'left'}); $('div.content').css('display', 'block'); // Initially set opacity on thumbs and add // additional styling for hover effect on thumbs var onMouseOutOpacity = 0.67; $('#thumbs ul.thumbs li').css('opacity', onMouseOutOpacity) .hover( function () { $(this).not('.selected').fadeTo('fast', 1.0); }, function () { $(this).not('.selected').fadeTo('fast', onMouseOutOpacity); } ); $(document).ready(function() { // Initialize Advanced Galleriffic Gallery var galleryAdv = $('#gallery').galleriffic('#thumbs', { delay: 2000, numThumbs: 12, preloadAhead: 10, enableTopPager: true, enableBottomPager: true, imageContainerSel: '#slideshow', controlsContainerSel: '#controls', captionContainerSel: '#caption', loadingContainerSel: '#loading', renderSSControls: true, renderNavControls: true, playLinkText: 'Play Slideshow', pauseLinkText: 'Pause Slideshow', prevLinkText: '‹ Previous Photo', nextLinkText: 'Next Photo ›', nextPageLinkText: 'Next ›', prevPageLinkText: '‹ Prev', enableHistory: true, autoStart: false, onChange: function(prevIndex, nextIndex) { $('#thumbs ul.thumbs').children() .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end() .eq(nextIndex).fadeTo('fast', 1.0); }, onTransitionOut: function(callback) { $('#caption').fadeTo('fast', 0.0); $('#slideshow').fadeTo('fast', 0.0, callback); }, onTransitionIn: function() { $('#slideshow').fadeTo('fast', 1.0); $('#caption').fadeTo('fast', 1.0); }, onPageTransitionOut: function(callback) { $('#thumbs ul.thumbs').fadeTo('fast', 0.0, callback); }, onPageTransitionIn: function() { $('#thumbs ul.thumbs').fadeTo('fast', 1.0); } }); }); </script> Problem is, when I want to Play the slideshow or navigate to the next image, it adds a 2 after the # in the URI. You can see it in action here. I can't find where this comes from, but if I take the gradient plugin out it works fine. I have also noticed that both plugins start with function($) { So is the script trying to call the same function? what does the $ represent and would that be the cause of my problem? Any pointers, greatly appreciated.
  2. Hi, Someone has asked me to write a fairly simple website for them, I've never really used a third party framework. Except OSCommerce, but have over time built up my own, but mine doesn't incorporate the features they want and was toying with the idea of learning another framework for this project. Trouble is I need to finish it by Wednesday, I can do it from scratch, but wondered if I could fit this in too. The main features it would need are : Templating, Multilingual and an Admin area where users can update the pages or add new content. From what I've found yii or prado looks quite good. Any other suggestions/comments?
  3. Hi All, I have an Advanced Search Query, but it isn't returning any results. I performed a basic query to ensure that what I was looking for was there and it returned fine. I just need some help as I have trouble understanding the original query : SELECT DISTINCT p.products_model, m.manufacturers_name, p.products_image, m.manufacturers_id, p.products_id, pd.products_name, pd.products_description, p.products_price, p.products_tax_class_id, IF( s.status, s.specials_new_products_price, NULL ) AS specials_new_products_price, IF( s.status, s.specials_new_products_price, p.products_price ) AS final_price FROM ( ( products p ) LEFT JOIN manufacturers m USING ( manufacturers_id ) , products_description pd ) LEFT JOIN specials s ON p.products_id = s.products_id, categories c, products_to_categories p2c, products_attributes pa WHERE p.products_status = '1' AND p.products_id = pd.products_id AND pd.language_id = '1' AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ( ( UPPER( pd.products_name ) LIKE '%AGP%' OR UPPER( p.products_model ) LIKE '%AGP%' OR UPPER( m.manufacturers_name ) LIKE '%AGP%' ) ) ORDER BY pd.products_name Simple Query : SELECT * FROM `products_description` WHERE UPPER( products_name ) LIKE '%AGP%' Produces 12 result rows. I put in UPPER so that the search became case insensitive. Is there a better way for that, and can someone help explain the original statement. Thanks
  4. Cheers, Sussed it now, didn't have the libxml library available to php 4.
  5. Hello comrades, I have been using a script provided by someone else, but it just seems to stop and I can't find why. Can anyone take a look and see what my problem might be, thanks : <?php if (version_compare(PHP_VERSION,'5','>=')) require_once('includes/domxml-php4-to-php5.php'); require 'includes/configure.php'; require DIR_WS_FUNCTIONS.'database.php'; require 'includes/database_tables.php'; $icecat_product_list = 'data.icecat.biz/export/freeurls/export_urls.txt';//'data.icecat.biz/export/freexml.int/INT/files.index.csv'; $icecat_refs_xml = 'data.icecat.biz/export/freexml.int/EN/refs.xml'; echo "<br />"; tep_db_connect() or trigger_error('<br />Unable to connect to database server!', E_USER_ERROR); $product_list = DIR_FS_DOWNLOAD.'product.list'; ################################################ # # processing refs.xml # echo "Wgetting supplier list<br />"; $refs_xml = DIR_FS_DOWNLOAD.'refs.xml'; echo 'http://'.ICECAT_LOGIN.':'.ICECAT_PASSWORD.'@'.$icecat_refs_xml."<br />"; echo "parsing<br />"; // It seems to stop here !! if(!$dom = domxml_open_file($refs_xml)) { //echo "No Dom<br />"; return trigger_error("<br />!!:: error parsing $refs_xml <br />:: exiting<br />", E_USER_ERROR); } $root = $dom->document_element(); if(!$root){ echo "No Root<br />"; return trigger_error("<br />!!:: error parsing(root) $refs_xml <br />!!:: exiting<br />", E_USER_ERROR); } echo "Processing suppliers<br />"; $supp_list = $root->get_elements_by_tagname('SuppliersList'); $supp_list = $supp_list[0]; $suppliers = $supp_list->get_elements_by_tagname('Supplier'); $supplirs_dump = DIR_FS_DOWNLOAD.'suppliers_dump.csv'; $file_handle = fopen($supplirs_dump,"a") or trigger_error(" error opening - $supplirs_dump <br />", E_USER_ERROR); foreach($suppliers as $supp){ if($supp->has_attribute('ID')) { $supp_id = $supp->get_attribute('ID'); } if($supp->has_attribute('Name')) { $supp_name = $supp->get_attribute('Name'); } fwrite($file_handle,"$supp_id\t$supp_name\n"); } unset($suppliers); fclose($file_handle) or trigger_error(" error closing $supplirs_dump", E_USER_ERROR); echo "inloading suppliers to database<br />"; tep_db_query("DROP TABLE IF EXISTS temp_ice_supplier"); tep_db_query("CREATE TABLE temp_ice_supplier( icecat_supplier_id int(11) primary key, supplier_name varchar(255) not null default '', KEY (icecat_supplier_id))"); tep_db_query("LOAD DATA LOCAL INFILE '$supplirs_dump' INTO TABLE temp_ice_supplier"); echo "updating supplier info<br />"; tep_db_query("UPDATE temp_ice_product_list tp , temp_ice_supplier ts SET tp.manufacturers_name = ts.supplier_name WHERE tp.supplier_id = ts.icecat_supplier_id"); tep_db_query("DROP TABLE IF EXISTS temp_ice_supplier"); tep_db_query("ALTER TABLE temp_ice_product_list DROP COLUMN supplier_id"); tep_db_query("DELETE FROM temp_ice_product_list WHERE manufacturers_name IS NULL"); tep_db_query("DROP TABLE IF EXISTS ".ICECAT_AVALIABLE_PRODUCTS); tep_db_query("ALTER TABLE temp_ice_product_list RENAME TO ".ICECAT_AVALIABLE_PRODUCTS); echo "supplier info ready <br />"; ############################################### # # Processing products images # if (USE_ICECAT_IMAGES == 1) { echo "Updating images data<br /> "; tep_db_query("ALTER TABLE ".ICECAT_AVALIABLE_PRODUCTS." ADD COLUMN manufacturers_id int(11) not null"); tep_db_query("UPDATE ".ICECAT_AVALIABLE_PRODUCTS." ice , ".TABLE_MANUFACTURERS." m SET ice.manufacturers_id = m.manufacturers_id WHERE ice.manufacturers_name = m.manufacturers_name"); tep_db_query("UPDATE ".TABLE_PRODUCTS." p , ".ICECAT_AVALIABLE_PRODUCTS." ice SET p.products_image = ice.thumbnail_img WHERE p.products_model = ice.products_model AND p.manufacturers_id=ice.manufacturers_id"); tep_db_query("ALTER TABLE ".ICECAT_AVALIABLE_PRODUCTS." DROP COLUMN manufacturers_id"); echo "Images data updated <br />"; } ?> I receive no errors at all. P.S. I'm using php v4.4.8 on Apache 2.0.64 Win XP Thanks.
  6. Could this be down to having the wrong MySQL client compared to the server? I'm using php4.4.8 but it uses a MySQL directory rather than the usual mysql extension, but stil shows the client as v3.xxxx. Any other ideas?
  7. Hiya, I believe some of the issues I'm having is down to the MySql php client and server library mismatch. So I downloaded the MySQL 5.0.18 Client lib to go with the correct version of my MySQL Server. I'm using php 4.4.8 which used MySQL lib v.3.23.49. After overwriting the libmysql.dll in the php dir and the mysql.dll in the extensions dir and restarting apatche, nothing seems to have changed. It still says it's using the MySQL lib v.3.23.49. Is there anything else I need to do? In my php.ini it has this entry : [MySQL] ; MySQL Path --with-mysql=MySQL5.0.20 That shouldn't affect it should it? Thanks
  8. Hi all, I have a duplicate of the same db on my test server as my live server and am running exactly the same query on both but the one on my test server fails but the live one works fine. Here's the qry : SELECT p.products_id, p.products_image, p.products_tax_class_id, if( s.status, s.specials_new_products_price, p.products_price ) AS products_price FROM products p, products_description pd, products_to_categories p2c, categories c LEFT JOIN specials s ON p.products_id = s.products_id WHERE products_status = '1' AND p.products_ordered >0 AND p.products_id = pd.products_id AND pd.language_id = '1' AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND '0' IN ( c.categories_id, c.parent_id ) ORDER BY p.products_ordered DESC LIMIT 10 The error I'm getting on my test server is : #1054 - Unknown column 'p.products_id' in 'on clause' But I know that column is there. My test server is running MySQL 5.0.20-nt and my Live server is running v.4.1.22-max-log
  9. OK, Well my test server (the one I'm trying this out on) is : Windows XP Apache2 Php 4.4.8 MySQL 5.0.20 The host server I ultimately want to be running this script on is GoDaddy : Linux Apache2 Php 4.3.11 Mysql 5.0.18 What do you mean, where I got php? How do I find out if it is php that is blocking this function? Is there a command I can invoke to tell me if it is enabled/disabled? Will I have to ask GoDaddy if I can use this command as I believe they don't have the mysqli extension. Thanks.
  10. Hi, I'm using MySQL v5.0.18 and I want to enable local infile so I can use LOAD DATA LOCAL. So far I get this error : 1148 - The used command is not allowed with this MySQL version LOAD DATA LOCAL INFILE 'C:\Apache\Apache2\htdocs\klickshopping\download/product.list' INTO TABLE temp_ice_product_list I have tried putting these : mysql> --local-infile=1 mysql> --local Into the mysql command prompt, which didn't seem to do anything. Is there a way of doing this Without recompiling mysql? This is on my test server, but when I deploy it on the GoDaddy host site, will I just have to ask if they support this feature? Thanks
  11. When it comes to specific product pages, is it ok to use some keywords that are appropriate to the content but do not exist in the page content? For instance, we are in a niche market, and other suppliers use made up proprietary descriptions for products that are essentially the same as ours, but do not conform to industry standard, would it be helpful to have some of those terms as our keywords?
  12. Thanks Premiso, function get_image_from_url($url, $filename) { if(function_exists('curl_init')) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $out = curl_exec($ch); curl_close($ch); if($out === false) { return false; } if($handle = fopen(DIR_FS_CATALOG_IMAGES . $filename, 'wb')) { fwrite($handle, $out); fclose($handle); } return true; } csv_import_message(CSV_CURL_MISSING_CANT_IMPORT_REMOTE_IMAGE, 'warning'); return false; } I have checked the images exist by putting the passed url directly into the URI and also made sure that the filename and url are being passed to the function by echoing out each and they all appear. Thanks for your help.
  13. Thanks Premiso, But your above script worked fine, the Google image appears properly.
  14. Hi, I am trying to make my keywords for my site more specific but am stuck on the first page. Since we only have a few products on the first page, but want people to find us for our other products, should it be best to just use broad keywords that match our internal links and page content, but as pages become more specific to use exact keywords? Also is it best practice to restrict to 20 keywords per page?
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.