Jan
24
How to edit or download .htaccess from cpanel file manager where it is hidden

In my cpanel (dont know the version number) it didn’t show .htaccess file and hid it by default. If it happens and as a lazy person like me you dont want to do ftp like things to get the htaccess appeared on you,  just click on a visible file and open it in cpanel editor. It will give you the url something like below. Click to continue »

Tags : , ,

Jan
04
Keyword shortcuts to working files or buffers in jEdit

Hint: By buffers in jEdit it means working files (area), which is shown in the image below:

Keyword shortcuts to working files or buffers in jEdit Click to continue »

Tags : , ,

Jan
04
Briefly unavailable for scheduled maintenance. Check back in a minute

“Briefly unavailable for scheduled maintenance. Check back in a minute”

If this message appears on you wordpress website for more than you anticipated if might mean that your wordpress update failed due to some reason. You can get rid of this message by deleting a .maintenance file which wordpress places at your site root when it starts to update and deletes it when upgrade is successfully completed. Click to continue »

Tags : , ,

Dec
30
Changing HEADER_IMAGE_WIDTH and HEADER_IMAGE_HEIGHT in worpress 3.3 header

I see <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /> in my themename/header.php file. How do i changed HEADER_IMAGE_WIDTH and/or HEADER_IMAGE_HEIGHT?? Click to continue »

Dec
23
How to remove html { margin-top: 28px !important; } from wordpress header

To remove html { margin-top: 28px !important; } from wordpress header go to /wp-includes/admin-bar.php and edit around line 672 (in WordPress 3.3)

Alternatly you can add a remove_action filter in you active theme/functions.php file like this, as this is a part of _admin_bar_bump_cb function which is defined in above mentioned file: Click to continue »

Tags : , ,

Dec
12
“Warning: session_start() [function.session-start]: open(/tmp…”, a possible fix for oscommerce

For the following warning in oscommerce installation:

Warning: session_start() [function.session-start]: open(/tmp\sess_5616cfa91211a8ef5ee94d09d21f7eb5, O_RDWR) failed: No such file or directory (2) in C:\wamp\www\catalog\includes\functions\sessions.php on line 67

As a solution they will suggest you to create a tmp folder in your root folder.. Click to continue »

Tags : ,

Dec
10
Conditional order by sorting using two fields in MySQL

Here’s the scenario.

I have two fields in my “listings” table with help of which i wanted to sort (order by) results. First field is “activation_date”. It is the activation date of a listing. Second one is “featured” which stores featured tag for a listing in a value of 1 or 0. Click to continue »

Tags : ,

Dec
03
How to check radio button on page load with jQuery

For example you have a set of radio buttons created dynamically with some web language like PHP and you expected one of them selected or checked on most of the times. If, none of them was checked somehow, you would want jQuery to get one of checked on page load. Here’s the quick solution to this condition. Click to continue »

Tags : ,

Dec
03
Creating a new php functionality page in iLister, the business classifieds system

Here’s the step by step guide to create a new functionality page in iLister.

Let’s say we wanted to create a new small enquiry form at the http://www.yoursite.com/contact_us. For this to make happen we will create a new ContactUs handler to process the form values and will place it under miscellaneous. Following are the steps required. Click to continue »

Dec
02
To check in a smarty template if it was the last page of the page results

Here’s a method to check in a smarty template if it was the last page of page results.

{if $listings.current_page gte ($listings.total / $results_per_page)|ceil}
    True
{else}
    False
{/if}

where $listings.current_page is the current page user is on, $listings.total is the number of totals results and $results_per_page is the number of listings or rows that are displayed on each page. “gte” is >= operator and |ceil as the mathematical modifier which returns next lowest integer.

Tags : , ,

Freelance Jobs