How-To

How-To

View All Posts In My Blog »


68 Classifieds Auto Loaded Search Fields

12.23.2008 | 0 Comments

It seems to be a common change in 68 Classifieds to want a category to be pre-selected when visiting the search form. This way all the extra fields are already loaded by default. This short template hack will show how it can be done.

Please keep in mind that with this change you can only have one category selected and it is recommended that all your categories share the same extra fields.

Here is a screen shot with an example:
search-screenshot

#1. Open search.tpl and find the following code:

$(document).ready(function() {

#2. Just below it add:

selectedCat(1); //where 1 is the category pre selected.
    function selectedCat(type){
        $("#response").show()
        $.ajax({
            url: 'ajax.php',
            data: 'action=extra_listing_fields&do=search&section=' + type,
            type: 'post',
            success: function (msg) {
                $("#response").html(msg);
            }
        });
    }

This also only works with v4.1.x because of the change in JavaScript library.


Wordpress and Google Apps

12.21.2008 | 0 Comments

googleappsA few weeks ago I decided to sign up this domain with Google Apps. I use their services so much it really just made sense. One of the draw backs I later found about was that php mail() function wouldn’t work any longer. I spent hours trying to find a solution and nothing really seemed to work. So if you are having this same trouble hopefully this post will explain how to fix it.

Step 1. Download the Configure Smtp plugin and activate it.

Step 2. Go to the plugins configuration page and enter the following settings:

  • Send e-mail via SMTP? : Checked
  • SMTP host : ssl://smtp.gmail.com
  • SMTP port : 465
  • Use SMTPAuth? : checked
  • SMTP username : Enter your google email here.
  • SMTP password : Your google password

Those are the only fields that are custom to Google Apps. After that configure the rest of the options as normal. Finally click the test email and you should receive an email in your gmail account.


Gmail Newsletter Trick

11.07.2008 | 0 Comments

Today I found a tips and tricks article discussing html email from NetTuts. I pretty much knew of most of the techniques but tip number 6 is great.

With gmail whatever it finds at the beginning of the email is what it uses to show in your inbox. For the newsletters I have been sending it would be something like: “Having trouble reading this email? Click here to see it in your browser”. Not very friendly and not one that jumps out and makes you want to read it. :)

The tip from Nettuts is:

Insert a 1px x 1px image as the very first element in your email. Wrap the image in span tags setting the font color to the same as the background. Whatever text you put in the ALT tags for your 1px x 1px image will now replace that google snippet in the users inbox.

Truly brilliant and some nice outside the box thinking. For the other tips visit: 6 Easy Ways to Improve Your HTML Emails.


jQuery pass variables to functions

9.22.2008 | 4 Comments

I have been working with jQuery recently because we are going to be using it in the 4.1 release of 68 Classifieds. One of the things I couldn’t get my head around was how to pass the id of a database record to a jQuery click function.

For example in regular javascript I had: Read more…