Archive for the ‘Tips & Tricks’ Category
Around the web - Great articles from Mike-N-Tosh
One of the 68 Classifieds moderators “Mike-N-Tosh” has recently started a blog on his site and has some excellent tips and tutorials for working with 68 Classifieds. Mike is not only a moderator on the forums but also has created some mods and templates which you can find on Classified Mods. Here is some of the posts he already has:
- How I Reduced Most of My Abandoned Listings
- Add an RSS Feed to the Seller Store
- Using the RSS Feed
- 68 Classifieds Basic Structure for Design Part 2
- 68 Classifieds Basic Structure for Design Part 1
He also has a module review and I am sure more great posts are in the works. This is a site worth checking out and will hopefully give you some great tips and ideas to better enhance your site.
Understanding Images
Next to E-mail, images are one of the most misunderstood aspects that impacts users of 68C. So what I would like to do is convey some basic info about images to help you better understand how 68C deals with them and why there are limitations on their size and why its important to have your administration settings for your site set properly.
Image Size
When it comes to images the word “size” can have many different meanings.
File Size
Images, like everything else computer related, are stored in containers called files. These files have a “size” which indicates how much space they take up on a computers hard disk.
Memory Size
What most people dont realize however is that most files used on the internet today are compressed. In other words special standards and algorithms are used to try and retain the data within the file but increase the space the file uses on a computers hard disk.
In order for the data within the file to be accessed however a compressed file needs to be uncompressed. This is done in a computers memory. A file that takes up 1 megabyte on the hard disk may actually take up 20 megabytes in memory depending on its contents and what type of compression is used.
Physical pixel dimension size
Images are made up of pixels which are tiny segments of information which contain color data. These pixels are arranged in a manner that is typically grid like and expressed in width x height.
68 Classifieds and images
68Clasifieds uses a high quality image upload class for handling the resizing of images. When you as a site admin or an ad poster places an ad and uploads an image many things need to take place.
1) the web server works together with the back end scripts and the clients browser to send the image to the web server where it is temporarily stored in its original format. There are certain PHP settings that are out of the control of most users on shared hosting plans which limit the size of the file that can be sent to the server. Additionally there are time limits placed on how long a script can run. If a user has a very slow connection to the internet and is uploading a very large file this execution time limit may be reached and the upload can fail.
It may also happen that your host has a very small temporary space allocated to you and if you and the other server users all are uploading images this temp spae may fill up and in turn the upload may fail.
2) Once the file is on the server in its temporary location 68C uncompresses the images and creates a small duplicate of it for a thumbnail using the settings you provided in admin. It also creates another image to use for the new full size image for the site based on admin settings as well. When done the original image is deleted from the temporary space.
When a file is uncompressed it resides in memory and the amount of memory your scripts are allowed to use is set by the php configuration file. This is totally outside the scope of 68C and is set by your web host. If your admin settings allow your users to upload images that are larger than your server can handle the script will fail. Once again this is NOT a problem with 68C but a limitation you host has imposed.
68 Classifieds Admin settings
68Classifieds allows you to set the image sizes for your thumbnails and your large images (those that get displayed in ads).
In addition you can also specify a max file size for an image as well as max height and width of an uploaded image.
As the pixel dimensions for an image increase the data contained in the file increase exponentially. Also depending on the quality setting for an image when it is saved, the same exact image saved at 2 different quality settings will have very different file sizes and also occupy different amounts of memory when uncompressed.
Most image editing software will show you the size (in kilobytes or megabytes) that an image is using in memory when it is opened. You can simply create empty images of varying pixel dimensions to get a feel for what pixel size images use in terms of system memory.
To view your servers current memory limit you can create a new file, call it what ever you would like as long as it end in .php and place it somewhere on your site. In the file have the following code……
<?php phpinfo(); ?>
The point a browser to it and look for a line called “memory_limit” and that will tell you how much memory your scripts have to work with.
If you open a bunch of files in an image editing application and see that are consuming 20mg etc and your memory_limit on your site is 16mg then trying to upload one of those images will likely fail.
What you are going to have to do is find out your hosts memory limit and then experiment with images that have different dimensions and see how large they are in memory and when saved to disk and use these numbers for your admin settings.
Then lastly, take a minute to alter your sites templates or FAQ to let people know what you file size and dimensional limitations are to save them the hassle of trying to upload images that are too large.
Most modern cameras create images that are much larger than can be processed by most shared hosting plans. Once again this is a limitation with your host and not the 68C software, 68C will handle the images just fine if it is allowed to use enough memory to process the image.
This was written by lhotch at Techconnx.net. Larry is a third party developer and has several modules for 68 Classifieds which can be found at ClassifiedMods.com.
Custom Administration Folder
For those security conscious individuals this post will out line how to change the name of your administration folder. Please note this is only supported with versions v4.1 and newer.
Step 1.
The first step is to rename the administration folder. For this tutorial we will name it “admintest”.
Step 2.
Now that the folder has been renamed. Next open the file “admintest/includes/params.php”. By default it should include the following:
/**
* @copyright 68 Classifieds
*
* @author $Author: suzkaw $
* @version $Revision: 12 $
* @package 68Classifieds
* @link http://www.68classifieds.com
*
* @Updated: $Date: 2008-09-10 13:41:06 -0400 (Wed, 10 Sep 2008) $
*/
/**
* This file is included in the init file before any
* other php coding has started. This is usefull if your
* host requires a custom setting that you can not change.
*/
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
/* End of file administration/includes/params.php */
Just below the error_reporting line add this:
$base_dir = str_replace('admintest', '', dirname(dirname(__FILE__)));
The portion ‘admintest’ is the new administration folder name that we created in step one.
Now save and upload this file.
Step 3.
After the previous steps have been done you can now visit yoursite.com/admintest and should be able to login.
Troubleshooting
If you having troubles with step2 you can also define the full path to your classifieds root. For example:
$base_dir = '/home/name/public_html/';
The full path can be found by creating a phpinfo file.
Custom Changes
68 Classifieds was designed to be as simple and easy to use as possible. Even with it designed this way we still have a lot of customers that want to create custom changes and add in little features that do not come standard. In this post I will try and outline some of the methods you can use to make changes and not have to worry so much when an upgrade comes out.
First off 68 Classifieds comes with a module system, plugins, and custom templates. If at all possible it is recommended to use one of these three routes because they are independent of the core and make upgrading easier.
Code Changes
Code changes are little pieces you add in that enable new features to your site. When you make changes like these upgrading is harder because you need to make those same changes to the new files. We do try and make this easier by including a changelog between each minor revision so instead of the whole package you only have a handful of files you need to look through and edit.
Before making any custom changes it is highly recommend to make a backup of both your files and your database. Just in case any changes made cause problems. With a backup you can always revert back, otherwise you may have to do a fresh install which you would not want to do.
1. Text File - Create a text file and list the changes you make in it. If nothing else include the file so later you can use a file comparison application to spot your changes. For example you could create a file like this:
October 24, 2008 - Changed printer.php - Added new var for title. October 19, 2008 - Changed contact.php - Added a new field.
2. Comments - Another good idea is to wrap comments around your changes:
// added by me for mysite.com on October 16, 2008 $my = 'customcodechanges';
When doing this it is best to use some sort of common term in your comment. That way you can search all the files for your comments.
3. Use version control - This is not really for the beginner because you would have to setup a cvs or svn server and then use it compare differences. I will not go in much detail about this because it can get complex.
File Comparison
With any of these methods you will need a good file comparison application and I will list some of the ones I know about here:
- Windows - WinMerge
- Windows - Beyond Compare
- Windows - Compare It
- Mac - FileMerge - Part of Developer Tools
- Mac - Araxis Merge
Project Searching
Beyond file comparison you will also want to be able to search all your files for the changes you made. Most ide’s will allow you to create a project and add all your files. Then you can use it to search the project and find all files that have a specific string in it. I use TextMate and Eclipse and both support this.
Hopefully this post will help those that are wanting to create custom changes and if you have a better method or a different method please post in the comments.
Save Time With TextExpander
Today I decided I should share with you the one Mac application that saves us so much time. Since we sale and support software a lot of common questions get asked a lot. For instance when someone purchases installation we have to email them and get all their details. It is pretty mundane and if we get a lot of installations then very repetitive.
Enter TextExpander, now instead of typing up the same response I write “68install” and it automagically becomes a three paragraph response outlining everything we need from the customer. But the magic doesn’t end there. You can add custom snippets and export them. We have one group that is shared between the office and we keep the common work related items in it.
I have lot of groups setup. My most common are work which is predefined emails. bbcode for use on the forums and coding which I have a lot of presets like ,a becomes the full link tag.
How can this help you? As a classified site owner I am sure you get emails asking the same questions over and over. Maybe advertising information, how to, or even someone contacting you on accident trying to contact a seller.
Hopefully some of you will find this useful and save you a few hours a month. (I have currently saved three hours of my life this month.)
ClickHeat - Javascript Clicks heatmap
ClickHeat is a visual heatmap of clicks on a HTML page, showing hot and cold click zones.
A very cool web application I found over the weekend is ClickHeat. By installing ClickHeat it will generate a page preview and show the area that have had the most clicks and where people are clicking.
One of the advantages to this system compared to Google Analytics is you can see the actual place a person has clicked. For example if you have two links pointing to the same file then GA treats it as the same where as ClickHeat shows the actual location of the click.
Here is a screenshot of an example:
Installation
Installation of ClickHeat is very simple and easy. Just upload the files and follow the onscreen directions. It did have some confusing options in the security section but other than that it was dead simple.
After you have it installed then just add their javascript to your page. If you are installing for a 68 Classifieds site be sure and follow the directions here for adding javascript to the template files.









