PHP mail class that send html+attached PDF and works on Gmail (browser)

PHP mail class that send html+attached PDF and works on Gmail (browser)

, , , on October 20, 2011 Add new comment

It resolves the Gmail in browser issue where the mail contains only a noname file or the mail code not parsed .

This is a class found on phpclasses.org but modified a bit to fix that issue.

<?php
/*
Attachment Mailer class - version 1.01
PHP class handles multiple attachment e-mails using the miIt resolves the Gmail in browser issue where the mail contains only a noname file or the mail code not parsed .


This is a class found on phpclasses.org but modified a bit to fix that issue.

<?php
/*
Attachment Mailer class - version 1.01
PHP class handles multiple attachment e-mails using the mime mail standard

Copyright (c) 2006, Olaf Lederer
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

		Read more »
      

PHP Array Pagination

PHP Array Pagination

, , on October 06, 2011 Add new comment

I found this class on snipplr.com and used it a few times on some projects. Thanks to the developer.

I'll post it here for reference

The class:

Read more »

Sort a multidimensional array in PHP

Sort a multidimensional array in PHP

on June 18, 2011 Add new comment
echo '<pre>';
print_r($arrayToSort );
echo '</pre>';

prints:

Array
(
    [1] => Array
        (
            [id] => 1
            [name] => Seafood
        )

    [2] => Array
        (
            [id] => 2
            [name] => Beef
        )

    [3] => Array
        (
            [id] => 3
            [name] => Chicken
        )

    [4] => Array
        (
            [id] => 4
            [name] => Sausages
        )
Read more »

CubeCart empty cart issue

CubeCart empty cart issue

, on February 09, 2011 Add new comment
CubeCart empty cart issue

While working on a CubeCart (4.3.8) a weird issue appeared (customers add an items to their cart and then go to checkout and the items have disappeared).

The solutions posted on the CubeCart forums didn't work on my case so i analyzed a bit the problem and found out that on the process of adding a product to the cart a third party module was setting another value to the "CC_SESSION_NAME" cookie, so practically the user was sending the product to another session id while he was still using the old cookie.

Read more »

Load images after DOM is loaded with Lazy Load Plugin for jQuery

Load images after DOM is loaded with Lazy Load Plugin for jQuery

, on May 03, 2010 Add new comment
Load images after DOM is loaded with Lazy Load Plugin for jQuery

As the title say, this plugin loads images after the DOM is ready.

Load the jquery and the plugin.



The simplest use is to put $("img").lazyload(); inside document ready event.

$(document).ready(function() {
    $("img").lazyload();
});
Read more »

if component..

Joomla 1.5 - Make an "if" statement based on the component loading at one time

, on October 27, 2008 3 comments

For some reason, selecting on what pages to show a block from admin doesn't work all the times.

Example, i wanted the breadcrumb module to show only on the gallery(rsgallery2), but selecting the gallery from "Menu Assignment" in mod_breadcrumbs settings worked only for the first page of the gallery, and not for the rest of the pages in gallery.

This is what i have done in the index file of the theme:

Read more »

javascript, jQuery, Mootools, Prototype

Make jQuery work on the same page with Mootools and or Prototype

, , , on June 25, 2008 2 comments
Make jQuery work on the same page with Mootools and or Prototype

Some conflicts appear when using jQuery javascript library with Motools or Prototype on the same page. A workaround is using noConflict mode for jQuery.

Follow these steps:

1. Download the latest version of jQuery

2. Download jQuery compat

3. Open jquery.js, go to the end of the file and add this line jQuery.noConflict();

Read more »

Safari ways

CSS hack for Safari

, on June 08, 2008 2 comments

Generally Safari browser print a website layout the way i want. Some times thou, it won't do it as Firefox do.

This is an example hack for Safari. The css class inside @media screen and (-webkit-min-device-pixel-ratio:0){} will be read only by Safari. So, in Firefox the object that user this class will have a padding-left of 10px and in Safari i canceled the 10px padding by defining a new value (padding-left: 0px;)

Read more »

vbulletin

Add a linkedin field to vbulletin user profile

, on May 13, 2008 Add new comment

A few days ago i added a new option to the user profiles in a vbulletin forum ( seo-romania.com/forum ). This option let the users have on their postbit a link to their http://linkedin.com profile.

It's simple to achieve this, just follow the next steps:

1. Go to admincp -> User Profile Fields -> Add New User Profile Field

Read more »

Joomla 1.5

Joomla 1.5 - add a new module position inside an article

, on May 11, 2008 43 comments

Today i received a request to insert a new module position inside the article template of a joomla website. The client wanted to print an adsense module in that position. You can see the result in the image below.

To do this, you need to define a new position first, so go to /templates/your_template. Open the templateDetails.xml file and search for
Add a new position, something like
adsense_in_content
.

Save the file, and upload it back to it's place.

Read more »