Uploading csv file with Codeigniter

I could not upload csv file. But you can upload it by changing confi/mimes.php line.

// instead of this
$mimes = array(	'hqx'	=>	'application/mac-binhex40',
				'cpt'	=>	'application/mac-compactpro',
				'csv'	=>	array('text/x-comma-separated-values', 'text/comma-separated-values', ...

// add 'text/plain', as follows
'csv'	=>	array('text/plain','text/x-comma-separated-values',

This should fix the problem.

25 Spotify invitations give away

UPDATE: I just emailed the last invitations today, so there are no more to send.

I have been using Spotify more than a year. And I have 25 Spotify invitations to give away. I read CNN news telling that Spotify is available in the U.S. by invitation only — or for paying customers.

If you are interested in getting a Spotify invitation, please leave your comment here.

sharethis_helper for CodeIgniter

 

I have created a sharethis_helper for CodeIgniter and you can download from github.

How to use it

  1. Download it and place them in your CodeIgniter
  2. Open application/helper/sharethis_helper.php and change $sharethis_pub_key =‘Add your key here’; and $services = “facebook, twitter, email, sharethis, gbuzz”;
  3. You can find your sharethis publication key at http://sharethis.com
  4. To modify, open application/views/welcome_message.php

Continue reading sharethis_helper for CodeIgniter

RSS Feeds and Google Analytics added to Kaimonokago

I have added RSS feeds, Goolge Analytics and Orders widgets in its dashboard.

 

Continue reading RSS Feeds and Google Analytics added to Kaimonokago

Kaimonokago shopping cart updated

Kaimonokago is a shopping cart based on CodeIgniter. The current version is 1.1.4 and it has a multi-language functions.

I have added a quite few design changes in the back-end and some minor bug fixes. Please read README files for installation and other details.

Download from github

Demo

 

Norwegian Characters in CodeIgniter and Editor

I had a problem with Norwegian characters today. I found that my editor’s encoding was set to iso-8859-1, so I needed to change it to UTF-8. I kept the following in config.php in CodeIgniter.

$config['charset'] = "UTF-8";

Then I needed to retype all the Norwegian characters in the editor.

I set all database charset to UTF-8 as well.

DEFAULT CHARSET=utf8

Changing DocumentRoot from /var/www to /home/myname/www

This is a quick tip to change your document root in Ubuntu. If you are using github, it is a bit troublesome to work in /var/www directory. You need to type ‘sudo’ each time or change to super user. But if you change your localhost document root to your home directory, you don’t need to do it.

From terminal.

sudo gedit /etc/apache2/sites-available/default

Change the following line.




DocumentRoot /var/www

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all


to the following.


DocumentRoot /home/yourdirectory/www

Options FollowSymLinks
AllowOverride None


Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all


Don’t forget to change ‘yourdirectory’.

Then from terminal.

sudo apache2ctl -t
sudo apache2ctl restart
suso /etc/init.d/apache2 restart

Then transfer all your directory from /var/www to /home/yourname/www.

Kaimonokago version 1.1.4 Beta released

The version 1.1.4 has multi-language module for the front-end shop. You can add any number of languages as you like. After adding languages in the languages module, you are able to input other languages to pages, products, menus and category. After adding languages in the backend, you need to add a directory and a file for the system languages. For example modules/welcome/language/french/kaimonokago_lang.php.

Another new features

  • Slideshow module to control the front-end slideshow.
  • Common functions, such as change status, delete etc are moved to kaimonokago modules

Download from github

Sending email from localhost using MSMTP with gmail

If you are using Ubuntu and having a problem or setting up sending email from localhost, you can use Msmtp. In this article I go through how to install msmtp and create some hml and php files to test it. Furthermore I will explain how to set up email config for BackendPro which is a control panel for CodeIgniter.
You will see how easy to set it up.

 

Continue reading Sending email from localhost using MSMTP with gmail

Windows in VM Virtualbox on Ubuntu, localhost and base url of CodeIgniter

Following up from the previous Aha moment post, this is Aha moment 2 and I am accessing localhost on Ubuntu from Windows 7 in VM Virtualbox. I have VM Virtualbox on Ubuntu 10.10 and I installed Windows 7 in this virtualbox. If I tried to access localhost on Ubuntu from a browser in Windows 7, I get an error. So this is how to access it.

The first thing to check is Ubuntu side. Open if you have nothing in /etc/apache2/httpd.conf. If you have any virtual host you need to delete them and restart the apache. If it is clear, then on terminal type ifconfig to check your inet addr.

Mine is following.

 
eth0 ... ... ... lo ... ... ... wlan0 ... inet addr:192.168.1.2 Bcast ....

Find inet addr. Mine is 192.168.1.2.

Start your VM Virtualbox and Windows 7. Open your browser and type http://192.168.1.2/mysite/.

If your web app is on CodeIgniter, then open system>application>config>config.php and change the following.

$config['base_url']	= "http://192.168.1.2/mysite/";

And it should show your website from localhost on Ubuntu.

Page 1 of 1512345...10...Last »