insaini
Pioneers-
Posts
207 -
Joined
-
Last visited
Everything posted by insaini
-
Do you want to display non secure items _ Images
insaini replied to yguyon's topic in Templates and Images
whether it is /images or www.mysitename/images makes no difference for a secure page the images have to be loaded via https:// instead of http:// make sure your links are being referenced as such.. and that your page source contains this line <base href="https://www.yourhost.com/"> so go to your index page.. make sure you get that non-secure message.. right click and go to view source.. that <base> tag should be just under your meta tags if its not there or its not https then its not being set properly.. your index.php file should contain <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> right under the <title> tag -
utter nonsense.. i have RC2a installed and many many contributions INCLUDING STS and there is not a flaw among it .. why dont you pay someone to fix it for you..
-
v1.5 Release with AJAX functionality.. (No page refresh, behind the scenes updating) Upgrade instructions are not given.. you can compare the files using something like Beyond Compare or take a look at the installation document.. Edits to original code are fewer than previous versions, main dropdown code has been abstracted to a function, ajax submission is done to the same page with the dropdowns so no extra ajax files other than the javascript file and the function file.. Cheers :thumbsup: J
-
Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0
insaini replied to insaini's topic in Shipping Modules
Glad its worked out for you.. but I cant take all the credit.. Natrium created the original contribution without it I could never have produced this extension.. :thumbsup: J -
Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0
insaini replied to insaini's topic in Shipping Modules
There was a missing '&' character in the payment sequence in the ship_canadapost_ajax.php file.. as well ive updated the label filename logic to the sequence associated with it.. Full package is uploaded. J -
NEW: Anti Robot Registration Validation
insaini replied to Druide's topic in General Add-Ons Support
If anyone has problems getting truetype fonts to work.. You have to be sure to place the GD Environment Variable in the correct place... I was going nuts figuring out the problem as to why it wasnt working.. but in anycase.. just place the line putenv('GDFONTPATH=' . realpath('.') . '/' . DIR_WS_IMAGES . 'fonts'); at the top of the page.. (the path is to my fonts folder which is located in my images folder) .. also if anyone is interested in colourized text here is the complete validation_png.php file that goes in the catalog folder.. you can simple change it out or if you have any mods done to it.. look for the random colour allocation.. <?php /* $Id: validation_png.php,v 2.7 2008/04/10 18:44:27 insaini Exp $ - modified from the version 2.1 by alexstudio osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2006 osCommerce Released under the GNU General Public License */ define('ANTI_ROBOT_IMAGE_PHP_BITMAP_FONT', 5); error_reporting(0); require_once('includes/configure.php'); require_once(DIR_WS_INCLUDES . 'filenames.php'); require_once(DIR_WS_INCLUDES . 'database_tables.php'); require_once(DIR_WS_FUNCTIONS . 'database.php'); // define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG); // establish database connection tep_db_connect() or die('Unable to connect to database server!'); // load configuration settings $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']); } // Derived from the original contribution by AlexStudio // Note to potential users of this code ... // // Remember this is released under the _GPL_ and is subject // to that licence. Do not incorporate this within software // released or distributed in any way under a licence other // than the GPL. We will be watching ...;) // Do we have an id? No, then just exit if(empty($_GET['rsid'])) { echo 'Empty rsid!!'; exit; } $s_id = tep_db_output($_GET['rsid']); // set image type header('Content-Type: image/png'); header('Cache-control: no-cache, no-store'); // Try and grab reg_key for this id and session $check_anti_robotreg_query = tep_db_query(" SELECT reg_key FROM anti_robotreg WHERE session_id = '".$s_id."'"); $new_query_for_reg_key = tep_db_fetch_array($check_anti_robotreg_query); $code = $new_query_for_reg_key['reg_key']; // calculate character pixel sizes if (ANTI_ROBOT_IMAGE_USE_TTF=='true') { putenv('GDFONTPATH=' . realpath('.') . '/' . DIR_WS_IMAGES . 'fonts'); $total_code_width = 0; $max_code_height = 0; for ($i=0; $i < strlen($code); $i++) { $angle_char[] = rand(-15, 15); $char_bbox = imagettfbbox(ANTI_ROBOT_IMAGE_FONT_SIZE, $angle_char[$i], ANTI_ROBOT_IMAGE_TTF, $code[$i]); $width_char[] = max($char_bbox[2], $char_bbox[4]) - min($char_bbox[0], $char_bbox[6]) + ANTI_ROBOT_IMAGE_WHITE_SPACE; $total_code_width += $width_char[$i]; $max_code_height = max($max_code_height, max($char_bbox[1],$char_bbox[3]) - max($char_bbox[5], $char_bbox[7])); } } else { $total_code_width = (imagefontwidth(ANTI_ROBOT_IMAGE_FONT_SIZE) + ANTI_ROBOT_IMAGE_WHITE_SPACE) * strlen($code); $max_code_height = imagefontheight(ANTI_ROBOT_IMAGE_FONT_SIZE); } // image size $height = (ANTI_ROBOT_IMAGE_HEIGHT) ? ANTI_ROBOT_IMAGE_HEIGHT : $max_code_height + ANTI_ROBOT_IMAGE_TOP_MARGIN; $width = (ANTI_ROBOT_IMAGE_WIDTH) ? ANTI_ROBOT_IMAGE_WIDTH : $total_code_width; // create image based on character size $image = @imagecreatetruecolor($total_code_width, $max_code_height + ANTI_ROBOT_IMAGE_TOP_MARGIN); // colourize image $bgc = hexdec(ANTI_ROBOT_IMAGE_BACKGROUND_COLOR); $tc = hexdec(ANTI_ROBOT_IMAGE_TEXT_COLOR); imagefilledrectangle($image, 0, 0, $width, $height, $bgc); // allocate colors $bg_color = imagecolorallocate($image, ($bgc >> 16) & 0xFF, ($bgc >> 8) & 0xFF, $bgc & 0xFF); $fg_color = imagecolorallocate($image, ($tc >> 16) & 0xFF, ($tc >> 8) & 0xFF, $tc & 0xFF); // add characters to image // - Added 2.7 random color chacters $pos_x = rand(0,ANTI_ROBOT_IMAGE_WHITE_SPACE-1); for ($i=0; $i < strlen($code); $i++) { // random colours $colours = array(rand(0,85),rand(86,171),rand(172,255)); $r_red = rand(0,2); while ($r_green == $r_red) { $r_green = rand(0,2); } while ($r_blue == $r_green || $r_blue == $r_red) { $r_blue = rand(0,2); } // we made sure that the random colours will never be the same otherwise there is potential for the colours to // show up as the background colour.. $char_color = imagecolorallocate($image, $colours[$r_red], $colours[$r_green], $colours[$r_blue]); if (ANTI_ROBOT_IMAGE_USE_TTF=='true') { imagettftext($image, ANTI_ROBOT_IMAGE_FONT_SIZE, $angle_char[$i], $pos_x, $max_code_height + ANTI_ROBOT_IMAGE_TOP_MARGIN/2, $char_color, ANTI_ROBOT_IMAGE_TTF, $code[$i]); } else { imagechar($image, ANTI_ROBOT_IMAGE_PHP_BITMAP_FONT, $pos_x, ANTI_ROBOT_IMAGE_TOP_MARGIN/2+rand(-ANTI_ROBOT_IMAGE_TOP_MARGIN/2, ANTI_ROBOT_IMAGE_TOP_MARGIN/2), $code[$i], $char_color); } $pos_x += (ANTI_ROBOT_IMAGE_USE_TTF=='true') ? $width_char[$i] : imagefontwidth(ANTI_ROBOT_IMAGE_FONT_SIZE) + ANTI_ROBOT_IMAGE_WHITE_SPACE; } // create resizes image of original $resized_image = @imagecreatetruecolor($width, $height); if ((ANTI_ROBOT_IMAGE_HEIGHT != 0) || (ANTI_ROBOT_IMAGE_WIDTH != 0)) { imagecopyresized($resized_image, $image, 0, 0, 0, 0, (ANTI_ROBOT_IMAGE_WIDTH) ? ANTI_ROBOT_IMAGE_WIDTH : $width, (ANTI_ROBOT_IMAGE_HEIGHT) ? ANTI_ROBOT_IMAGE_HEIGHT : $height, $total_code_width, $max_code_height + ANTI_ROBOT_IMAGE_TOP_MARGIN); } else { $resized_image = $image; } // apply artifacts if (ANTI_ROBOT_IMAGE_FILTER_GREYSCALE=='true') image_greyscale($resized_image); if (ANTI_ROBOT_IMAGE_FILTER_SCATTER=='true') image_scatter($resized_image); if (ANTI_ROBOT_IMAGE_FILTER_NOISE=='true') image_noise($resized_image); if (ANTI_ROBOT_IMAGE_FILTER_INTERLACE=='true') image_interlace($resized_image, $fg_color, $bg_color); // output image imagepng($resized_image); imagedestroy($image); imagedestroy($resized_image); exit; function image_noise (&$image) { $imagex = imagesx($image); $imagey = imagesy($image); for ($x = 0; $x < $imagex; ++$x) { for ($y = 0; $y < $imagey; ++$y) { if (rand(0,1)) { $rgb = imagecolorat($image, $x, $y); $red = ($rgb >> 16) & 0xFF; $green = ($rgb >> 8) & 0xFF; $blue = $rgb & 0xFF; $modifier = rand(-128,128); $red += $modifier; $green += $modifier; $blue += $modifier; if ($red > 255) $red = 255; if ($green > 255) $green = 255; if ($blue > 255) $blue = 255; if ($red < 0) $red = 0; if ($green < 0) $green = 0; if ($blue < 0) $blue = 0; $newcol = imagecolorallocate($image, $red, $green, $blue); imagesetpixel($image, $x, $y, $newcol); } } } } function image_scatter(&$image) { $imagex = imagesx($image); $imagey = imagesy($image); for ($x = 0; $x < $imagex; ++$x) { for ($y = 0; $y < $imagey; ++$y) { $distx = rand(-1, 1); $disty = rand(-1, 1); if ($x + $distx >= $imagex) continue; if ($x + $distx < 0) continue; if ($y + $disty >= $imagey) continue; if ($y + $disty < 0) continue; $oldcol = imagecolorat($image, $x, $y); $newcol = imagecolorat($image, $x + $distx, $y + $disty); imagesetpixel($image, $x, $y, $newcol); imagesetpixel($image, $x + $distx, $y + $disty, $oldcol); } } } function image_interlace (&$image, $fg=0, $bg=255) { $imagex = imagesx($image); $imagey = imagesy($image); $fg_red = ($fg >> 16) & 0xFF; $fg_green = ($fg >> 8) & 0xFF; $fg_blue = $fg & 0xFF; $bg_red = ($bg >> 16) & 0xFF; $bg_green = ($bg >> 8) & 0xFF; $bg_blue = $bg & 0xFF; $red = ($fg_red+$bg_red)/2; $green = ($fg_green+$bg_green)/2; $blue = ($fg_blue+$bg_blue)/2; $band = imagecolorallocate($image, $red, $green, $blue); for ($y = 0; $y < $imagey; $y+=2) { for ($x = 0; $x < $imagex; ++$x) { imagesetpixel($image, $x, $y, $band); } } } function image_greyscale (&$image) { $imagex = imagesx($image); $imagey = imagesy($image); for ($x = 0; $x <$imagex; ++$x) { for ($y = 0; $y <$imagey; ++$y) { $rgb = imagecolorat($image, $x, $y); $red = ($rgb >> 16) & 0xFF; $green = ($rgb >> 8) & 0xFF; $blue = $rgb & 0xFF; $grey = (int)(($red+$green+$blue)/3); $newcol = imagecolorallocate($image, $grey, $grey, $grey); imagesetpixel($image, $x, $y, $newcol); } } } ?> -
Well basically I already have this implemented on my site.. rather than taking in $_GET['currency'] .. my languages class files has all the currencies linked to their languages.. thus for example for Canada. I can show a Canadian flag icon and a Quebec Provincial flag icon.. the user can choose either and get the respective language but at the same time maintain the canadian currency.. as well I have a US flag icon and EU flag icon .. both are english language but have different currencies.. USD and EUR .. currently I have all three currencies linked to one language directory English .. this is incorrect of course as there is US spelling and British/Candian spelling for certain words.. however these can be separated into different folders as well if wanted. Benefit.. well the benefit I would say the user only has to click one link.. the language link which will automatically select the appropriate currency. Another benefit is sitemaps.. Google Sitemap Generator will create links for not only the currency but also the language.. so if you have 2 currencies and 2 languages.. you will get 4 links generated for each page.. if you have 3 currencies and 3 languages that would be 9 links for each page.. ridiculous isnt it.. well with the changes i made you get rid of the currency input.. thus .. if you have three languages.. only 3 links generated.. even if they are all in english.. it would be the same as if you had three currencies and only 1 language.. still 3 links.. If anyone is interested I can provide the changes.. J
-
To Everyone.. I have both Ultimate SEO and Header Tags SEO Working together perfectly.. but this is also because I did that coding change that I said was required back on the first page of this forum topic.. I SUGGEST everyone also make that coding change which SHOULD help with the titles not displaying correctly.. Heres the link to the post http://www.oscommerce.com/forums/index.php?s=&...t&p=1231050 Best.. J
-
Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0
insaini replied to insaini's topic in Shipping Modules
Ive uploaded versions 2.1 of Automated Labels and 4.1 of the Shipping Module. Automated Labels 2.1 Requires Shipping Module 4.1 as they are basically connected in the way they work. The Shipping Module will output something like this Canada Post [1 box(es) to be shipped] 'package_name' - 'weight'(kg) (Expedited US Business etc...) The 'weight' component is the total weight of the package including the weight of your items AND your packaging material. This weight is then extracted by Automated Labels and is used as the total package weight value.. before you were required to input the total package weight which is no longer necessary but you do still have that option to do so. This makes shipping labels a lot easier. Next when I have time I will also add packaging dimensions to the shipping module output and have automated labels extract those values as well as currently you have enter those values yourself.. As well I will also implement methodology for Multiple Automated Labels.. (for multiple boxes being returned by the Canada Post shipping module) .. currently the automated labels software can only handle 1 box shipments... The full package is on the contribution page.. also fixed was a bug with domestic shipments.. everything seems to be working just fine.. -
it seems as though you didnt update your database...
-
No I havent touched anything to do with Sort Orders.. .. the code I changed was necessary to show the Page Title appended with the Default Page title.. Im not sure why you dont see that it seems pretty obvious that code change needs to be done.. Basically.. take any page say 'Contact Us' Now fresh out of the box this is what the browser says for its title .. ( - Mozilla Firefox ) Now I set up the default page title, description and keywords (say "WEBPAGE" for each title, description and keywords) in admin .. now that same 'Contact Us' page now says .. ( WEBPAGE - Mozilla Firefox ) Now I specify for the 'Contact Us' page .. Title, description and keywords as "Contact Us" .. now when I go to the Contact Us page.. behold the title still says ( WEBPAGE - Mozilla Firefox ) .. when it should say .. ( Contact Us - WEBPAGE - Mozilla Firefox ) .. Well that code change i posted above fixes this .. not sure why you didnt get this.. :huh:
-
Jack.. I did add sort numbers and they had no effect.. not until I changed the code from this (in catalog/includes/header_tags.php) did it finally work as it should.. with still a slight hiccup in the admin section with respect to sort orders (below) // ALL OTHER PAGES NOT DEFINED ABOVE default: $header_tags_array['title'] = tep_db_prepare_input($defaultTags['default_title']); $header_tags_array['desc'] = tep_db_prepare_input($defaultTags['default_description']); $header_tags_array['keywords'] = tep_db_prepare_input($defaultTags['default_keywords']); break; } to this // ALL OTHER PAGES NOT DEFINED ABOVE default: $pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . basename($PHP_SELF) . "' and language_id = '" . (int)$languages_id . "'"); $pageTags = tep_db_fetch_array($pageTags_query); $sortOrder['title'][0] = $pageTags['page_title']; $sortOrder['description'][0] = $pageTags['page_description']; $sortOrder['keywords'][0] = $pageTags['page_keywords']; $sortOrder['logo'][0] = $pageTags['page_logo']; if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title']; if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc']; if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords']; if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text'])) $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text']; FillHeaderTagsArray($header_tags_array, $sortOrder); break; } As for the sort orders.. I get these errors.. Error Duplicate sort orders are not allowed -> buy.php Error Duplicate sort orders are not allowed -> buy.php Error Duplicate sort orders are not allowed -> buy.php I put in a sort order of 2 for the title and sort order of 2 for description.. I dont see why this is a problem.. However, with the change in code above.. specific page titles are now being appended by the default page titles.. this wasnt happening before..
-
Ok im pretty sure this is the problem in catalog/includes/header_tags.php // ALL OTHER PAGES NOT DEFINED ABOVE default: $header_tags_array['title'] = tep_db_prepare_input($defaultTags['default_title']); $header_tags_array['desc'] = tep_db_prepare_input($defaultTags['default_description']); $header_tags_array['keywords'] = tep_db_prepare_input($defaultTags['default_keywords']); break; } Shouldnt the default tags be appended to the tags of each specific page.. this section seems incomplete... it seems it is why each page no matter what I set the tags to .. only the default tags are showing up..
-
Hey Jack, Thanks for the contribution.. Im having a slight problem.. doesnt really make sense so maybe you can help.. everything has been installed.. I ran fill tags.. Now in the SEO Page.. I have setup the default tags and data... I selected one of the pages on the site.. and just hit the checkboxes (do I need to enter numbers beside them or can I leave them blank) .. I left the the other text fields for the specific page blank.. I hit 'view result' and it came back with New Home Page Title new description new keywords1,keywords2 Shouldnt it come back with the default data on the right side of the page? So I then tried entering something into the text fields of the specific page.. Then when I view result .. it comes back with the default data from the right side of the page.. BUT it doesnt include the data I entered in the text boxes for the specific page.. two peculiar results which don't make sense to me.. any thoughts? J
-
Not to be a downer.. SPPC 4.1.6 with my TAX EXEMPTABLE ADDON or SPPC 4.2.0 will do everything you just created with the added bonus of having the ability to set seperate pricing for specific types of customers such as distributors, friends, etc.. Although I would say you may have a problem if any customer can come by and add in random info for the tax id's and get exempted even if they are not supposed to.. as the admin you should specify who is allowed to be exempt and from which taxes after confirming their tax information..
-
Canada Post Automated Labels 2.0 AND Canada Post Shipping Module 4.0
insaini replied to insaini's topic in Shipping Modules
Just a screenshot.. -
This is the official topic for the combined package of Canada Post Automated Labels 2.0 and Canada Post Shipping Module 4.0 *Improvements* ------------------- - AJAX Label Generation - osCommerce Units in configuration (rather than with each individual product) - Both contributions now are connected to each other via VentureOne information This has been tested as much as I could. I will support this as well as I can however if I dont reply try sending me a PM or emailing me. Lets get some of you using this asap so we can be sure all the kinks are out. Download Here http://addons.oscommerce.com/info/5842 J
-
To All, Next Version up will be released soon. Canada Post Automated Labels AJAX. Includes Real-Time progress updates and some extra options.
-
Does anyone know what my problem might be, I installed this contribution, very easy install.. Created a couple coupons.. tried to test.. basically.. the discount is applied to the subtotal if I set that to be true.. if I set it to be false.. it doesnt.. which is the way its supposed to be.. however in the first case the total is correct and in the second case.. the total is as if the discount wasnt applied at all.. more over.. the Discount Coupon Applied: -$xX.xx line isnt even displayed in either case.. which is very strange.. has this happened to anyone? J
-
excellent contribution my man... much respect
-
[Contribution] QTpro - Quantity Tracking Professional
insaini replied to zonetown's topic in General Add-Ons Support
Bah J -
Janz... Did you include the tax exemption addon I submitted earlier in SPPC 4.2.0 ? The tax exemption.. the way it works now is very incomplete.. does not work with compounded tax rates.. it exempts all taxes.. the modification I submitted allows the specific taxes to be exempted and works beautifully ... but anyhow just wondering J
-
Use 4.1.6 on the contributions page.. then add whats above. To everyone else.. if you added in the TAX RATES EXEMPTION addon I created.. open your logoff.php file under /catalog look for tep_session_unregister('sppc_customer_group_id'); tep_session_unregister('sppc_customer_group_show_tax'); tep_session_unregister('sppc_customer_group_tax_exempt'); below this add tep_session_unregister('sppc_customer_group_tax_rates_exempt'); :thumbsup:
-
Hey all, I have created an addon to SPPC 4.1.6 http://www.oscommerce.com/community/contributions,716 its been added to the contribution page. Just giving back I probably wont be back on the forum for a few days. Enjoy insaini
-
Canada Post shipping module v0.3: Please Help!
insaini replied to helvetica's topic in Shipping Modules
I have been working on this for hours and cant get it.. same tried any cURL option i could and nothing seems to be working... anyone?