Archive for category PHP

jQuery thickbox gallary image loading problem

In my past post I discussed about a problem of thickbox while working with ajax content. Today I’ll show you another problem in which people always fall while using jquery thickbox and then if they don’t get any suitable solution go for alternative which are available 🙂 The problem is sometime (most of the case) while thickbox is used for showing image gallary with “rel” attribute in the link the images would not load. I also fell in the problem and the image was not loading while I use the rel attribute for showing image gallery and even I wanted to go for lightbox which is cool also. But then I found the issue. I’ll show you the issue bellow:

Read the rest of this entry »

, , ,

Leave a comment

jQuery thickbox problem on ajax loaded content with php and codeigniter

Hope everyone doing well. Today I’ll show a trick about jQuery thickbox which I was using for one of my project. I have worked earlier also with this earlier but i didn’t have to work with ajax loaded content. Normally it’s working great with your inline element on your page but when you will use it in the content which is loading by ajax will show the problem, the link in the ajax content will work as default link.

Read the rest of this entry »

, , , ,

1 Comment

Setup apache virtual hosts in Mac OS X and xampp

When we develop projects sometime we need to make the website act as a document root like first party domain. By accomplish this we need to set up virtual hosts on the local server. I’ll explain here about this using XAMPP on MAC OS X LION. XAMPP uses Apache web server so we need to do it by configuring Apache. But who are new in development and MAC OS may fall some problem with it. I’ll discuss on the problems you may face here.

Read the rest of this entry »

, , , ,

9 Comments

Jquery autocomplete dropdown and select id with php and codeigniter

Few days ago I was implementing a drop-down/combo-box for selecting from a huge data, So thought to use jquery autocomplete plugin. But I was very upset while looking for the autocomplete use so that I can select the id to post, I did not find any good resource or documentation about this, I searched over internet and got some post but not what I am looking for. I just wanted to implement the autocomplete for a textbox and after selecting a value I’ll get the id of the value to post. We will discuss on this topic today Read the rest of this entry »

, , , , ,

10 Comments

HTTP Security or Authentication with .htpasswd On Mac OS X

I think most of you are aware of http security using .htpasswd. It is the way to secure any directory or domain. I was using it in windows with some htpasswd generator. On unix based system it’s more easier for anyone to secure any directory or webpage.

Read the rest of this entry »

, , , ,

Leave a comment

Get Querystring in Codeigniter Project

In most of the codeigniter project it is turned off the querystring. And We can easily do anything without enabling the query-string because we can do everything by segment.

Now coming to the point. If you are integrating a payment system in your application and the payment gateway return you like the following method :

 http://www.mydomain.com/checkout/success/payment?ORDER_ID=1234&TIMESTAMP=12345678&PAID=1&METHOD=pay&...bla ... bla

then you should think about enabling the query-string.

Read the rest of this entry »

, , , ,

5 Comments

Command Line Cron Job For Codeigniter (Continued)

I showed how to make a file for setting cron job handled by command line  (  Click Here To see the previous post ). There are a limitation of that way which is “for every cron we should make a new file“. Here we will see how can we make a common file where any amount of cron can be handled by the file.

Read the rest of this entry »

Leave a comment

Write CSS Dynamically For Php Application

Sometime in our application we need to manage the css dynamically with some condition. For example if I have 5/6 themes for an application and let user give the option to change the theme we have to change the theme dynamically again if we need to generate some conditional styles for different condition we need to generate dynamic styles. If we generate CSS with PHP it helps to keep various styles for different browser or different condition, no need to make different styles. Here with an example we can see… Read the rest of this entry »

, , , ,

Leave a comment

Setting Cron Job From Command Line With Codeigniter

Most of the web application need to run some scripts to maintain the system time by time. In order to do that we use Command Line Request for running the scripts/files. But With Codeigniter it is not possible as it doesn’t have this functionality.  So how to call a controller/method from the command line we will learn here. Read the rest of this entry »

, , , , ,

3 Comments

Sql dump file running in php

When you do projects, sometime it needs to keep option at the admin backend to keep backup of db and restoring option. For this you need to export the sql of the db in a sql file which is not much problem in php. But the problem is if you want to execute the saved sql file as php has some limitation of reading the sql.

Other case, suppose you get a huge sql file that need to dump (more than 1Mb), and you only have access to phpmyadmin and php. It is not actually possible most of the time to get it processed by phpmyadmin.

Here I will show how to import the sql file in php. Read the rest of this entry »

1 Comment