1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Friday, October 16, 2009

Zen Cart and shared hosting

Zen Cart and shared hosting

So, how many users will your site handle without having the web hosting provider suspending your hosting account and sending you a nasty email? Frankly, I'm not sure. But a client of mine got her account suspended when her online advertisement (Facebook CPC ad) brought about 90 users to her site at about the same time. Normally, her site will have about 20 users online most of the time.

Okay, what about choosing a web hosting provider? Well, just choose from the more reputable hosting providers. Zen Cart server requirements are similar to most other programs and hosting companies should have no problem with that.

Having said that, I did still face some issues with a couple of hosting companies:

1. Hosting company A - PHP runs with Safe Mode turned ON
Zen Cart seems to run okay but Image Handler 2 just won't run properly. See this forum post for more info about servers with PHP Safe Mode turned ON.

2. Hosting company B - No cURL support
Zen Cart will run without cURL but some shipping and payment modules require cURL

So, if you're not sure, ask the hosting provider first!

Change Character Set to UTF-8 in Zen Cart

English IS0-8859-1 files to UTF-8 | SRW2D

First of all, the Zen-Cart encoding is IS0-8859-1 by default. IS0-8859-1 can be changed to UTF-8 with not much effort!

The first change needed is to english.php:

The path to this file is: includes/languages/english.php

Open it in your text editor and then follow these instructions:

1->Line 22 or near there if the file has been edited, you will find this:
@setlocale(LC_TIME, 'en_US.ISO_8859-1');

2->Change this line to this:
@setlocale(LC_TIME, 'en_US.utf8');

3->Line 49 or so again. Find this:
define('CHARSET', 'iso-8859-1');

4->Change it to this:
define('CHARSET', 'utf-8');

The next file to change has the same name but is in a different directory:

Find it in: admin/includes/languages/english.php

1->On line 20 find:
setlocale(LC_TIME, 'en_US.ISO_8859-1');

2->
Change to this:
setlocale(LC_TIME, 'en_US.utf8');

3->On line 63 find:
define('CHARSET', 'iso-8859-1');

4->Change this to:
define('CHARSET', 'utf-8');

The next change is to query_factory.php.

Find it in: includes/classes/db/mysql/query_factory.php

1-> Find this (line 33):

// pconnect disabled ... leaving it as "connect" here instead of "pconnect"
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
}
if ($this->link) {
if (@mysql_select_db($zf_database, $this->link)) {
$this->db_connected = true;
return true;
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
}

2-> Change to this (this will not work as an override):

// pconnect disabled ... leaving it as "connect" here instead of "pconnect"
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
}
if ($this->link) {
if (@mysql_select_db($zf_database, $this->link)) {

//BOF changed for utf-8
mysql_query('SET NAMES "utf8"', $this->link);
//EOF changed for utf-8

$this->db_connected = true;
return true;
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
}


Note the key change is :
//BOF changed for utf-8
mysql_query('SET NAMES "utf8"', $this->link);
//EOF changed for utf-8


Also, here is an important tip. At this point you should change your admin folder name now for security issues. For more information on this go
[here]

WordPress 主题发布: Blocks

主题发布: Blocks

Jul 13th, 2008
Blocks Preview

主题简介:
Blocks 是从我的 Opera Blog 里移植过来的, 简单清爽, 零图片. 该主题布局灵活, 可以在后台切换成两栏模式或者三栏模式, 也可以将侧边栏切换为居左或居右, 支持 Widgets, 兼容WordPress 2.7 嵌套回复, 评论翻页等新特性.
已发布 YO2 的专用版本: Blocks for YO2

相关标签:
双栏式, 三栏式, 固定宽度, 支持 Widget, 左侧边栏, 右侧边栏, 白色, 简洁, 淡雅, 通过 XHTML, 通过 CSS, 后台管理

适用版本:
WordPress 2.5 或以上版本

主题演示:
点击这里进入演示页面

主题下载: Download

测试验证:
测试用 WordPress: 2.5.1, 2.6.1, 2.7.1, 2.8.3
测试用浏览器: IE 6/7/8, Firefox 2/3/3.5, Opera 9.6, Safari 4 和 Chrome 2.0
通过 XHTML 1.1 和 CSS 3 验证

推荐插件:
Subscribe to Comments
WP23 Related Posts
WP-PageNavi
WP-RecentComments
WP-Syntax
Mail To Commenter (@+user+blank)
Quick Comments

主题本地化:
此版本支持英文和简体中文, 其中英文是默认设置. 若要使用简体中文, 请执行以下步骤:
1. 打开 WordPress 根目录的文件 wp-config.php.
2. 查找 define ('WPLANG', ''); 并修改为 define ('WPLANG', 'zh_CN');

声明: 本站遵循 署名-非商业性使用-相同方式共享 3.0 共享协议. 转载请注明转自 NeoEase

Wednesday, October 14, 2009

Free Zen Cart Template 3

Free Zen Cart Template 3
April 19, 2009 in Free Zen Cart Templates

This is a minimalistic, yet elegant looking Zen Cart e-commerce template suitable for fashion related products (or well, any product you think suitable).

Free Zen Cart Template 3

Free Zen Cart Template 3 (Click for large image)

Installation instructions (this is also included in the ZIP download):

  1. Extract to appropriate locations (there are two freetemplate3 folders)
    \includes\modules\freetemplate3
    \includes\templates\freetemplate3
  2. Login to your Zen Cart admin to enable the template:
    Admin > Tools > Template Selection > Click 'Edit' button
  3. Reset the side boxes:
    Admin > Tools > Layout Boxes Controller > Click 'Reset' button
  4. Set the left column width:
    Admin > Config. > Layout Settings > Column Width - Left Boxes (set to 170 pixels or whatever you like)
  5. Disable right column:
    Admin > Config. > Layout Settings > Column Right Status - Global > 0

Zen Cart Version: 1.3.8

Download Free Zen Cart Template 3

Some notes:

After installation, you site will NOT look exactly the same as the screen shot above. You'll need to tweak a few settings if you want your site to look the same (or better).

  1. Banner is not included. See the readme file in the downloaded ZIP archive or check Zen Cart official tutorials. Design your own banner to make your site look even more classy than the screenshot above. (make sure your banner is 618 pixels wide — plus or minus a few pixels should be okay though)
  2. The "Top Autumn Collection" title on the main area is created and formatted with Zen Cart's built in editor.
    Admin > Tools > Define Pages Editor > define_main_page.php
  3. Remove the top Categories Tab Menu
    Admin > Config. > Layout Settings > Categories-Tabs Menu ON/OFF > 0
  4. Change the front product thumbnails to 4 per row (3 or 5 may also work for you, entirely up to you):
    Admin > Config. > Index Listing > New Products Columns per Row > 4
    Admin > Config. > Index Listing > Featured Products Columns per Row > 4
    Admin > Config. > Index Listing > Special Products Columns per Row > 4
  5. The top menu links are created by Ez-Pages. Create yours here:
    Admin > Tools > Ez-Pages
  6. Change the Ez-Pages menu separator to |, instead of ::
    Admin > Config. > Ez-Pages Settings > EZ-Pages Header Link Separator

That's about it. Enjoy.

Want a better looking template to increase your sales? See our premium templates. Guaranteed unbeatable prices & value!

Avoid windows for online banking

Avoid windows for online banking - The Inquirer

Use a Linux Live CD instead
By Alexandra Pullin
Wednesday, 14 October 2009, 14:59

Monday, October 12, 2009

Share files between 2 ubuntu computers with SSH

Share files between 2 ubuntu computers « Linux Owns

If you have two computers running Ubuntu on the same network, it could be an good idea to use openssh to share files between them.

The setup shouldn't take more than 2 minutes.

updated for Ibex.

On all the computers you want to share files with copy/paste the following command.

Ubuntu 8.04:

sudo apt-get install openssh-server openssh-client

Ubuntu 8.10:

sudo apt-get install ssh

Then you need to figure out the ip of each the computer you want to connect to.

Most of the time it's something like 192.168.1.2 or something in that line.

(kde, cli and another option is presented in bottom of thread)

Right-click the network-manager applet on the top panel and choose "connection information" to find it out.

On the computer you want to access the files from, go to "Places -> Connect to Server".

You'll get greeted by this window.

Service type should be "SSH""

Server should be the "ip" adress of the pc where the info is on.

Port, enter "22″

Pick the folder you wish to share (could take some time to connect depending on the size of the folder).

The user name of the pc you are connected to

The bookmark will be the name of the folder in nautilus

After that you'll get a windows where you have to enter a password. That would be the password of the pc you are trying to connect to.

And that's it.

You should have read/write permissions.

You can also connect to your Ubuntu pc running openssh from windows using "Putty" or from OSX using "Fugu". It should work the other way around too.

Note: It might be a good ideo to turn of root logins (for security reasons).

In a terminal

sudo gedit /etc/ssh/sshd_config

Change the line "PermitRootLogin yes" to "PermitRootLogin no".

————–

This won't be possible for all people (for instance when you use fluxbox), then you could try the things below here or just use "gftp". It has an easy to use UI.

————–

If you are using Kubuntu, you can connect to the ssh server using konqueror.

Just type

fish://user@server/path/to/folder

So in reality it could something like this

fish://rw@localhost/home/rw

This would bring you to the /home of the server.

or

fish://rw@192.168.1.3/

This would bring you to / of the server.

If you are on fluxbox, openbox, … nautilus won't be able to handle ssh (or smb). You could still use konqueror but you most likely won't like that.

Then you could use the cli client of you choice and do

ssh user@server

For me this would be:

ssh rw@192.168.1.3

And you would be able to browse the server using the terminal.

Some basic terminal commands are given here.

However, you could use sshfs to mount the the ssh share as a filesystem.

There are instructions to get it working on the official website, but ubuntu.wordpress.com has a nice how-to.

Share files and folders with other computers

Share files and folders with other computers

You can share files and folders with other people on your network through Shared Folders or Nautilus.

Sharing folders via the Shared Folders application

To share folders using the Shared Folders application:

  1. Press ApplicationsAccessoriesTerminal to open a Terminal.

  2. Type shares-admin and press Return to open Shared Folders.

  3. Press the Unlock button and enter your password in the Password for (username): field.

  4. Press the Authenticate button.

  5. You may receive a message which says Sharing services are not installed. If this happens, ensure that the two checkboxes in the message box are checked and press Install services. Sharing service support will then be downloaded and installed; this may take a while.

  6. Select the Shared Folders tab and press Add.

  7. Select the location of the folder you wish to share by changing the Path option.

  8. Choose Windows networks (SMB) from the Share through option.

  9. Enter a name and comment for the shared folder.

  10. If you would like people accessing the shared folder to be able to add, change and remove files in the folder, uncheck Read only. If you leave Read only checked, people will only be able to view files in the folder.

  11. Press OK to make the shared folder available. Other people on the same network (LAN) as you should now be able to access the folder.

See the Shared Folders Administration Tool manual for more information on managing network shares.

Sharing folders via Nautilus

To share folders using Nautilus:

  1. Press PlacesComputer to open a File Browser window.

  2. Right click the folder you wish to share and select Sharing Options on the popup menu.

  3. Select Share this folder from the popup menu. You may change the Share name field if you want to use a different share name.

  4. You may receive a message which says Sharing services are not installed. If this happens, ensure that the two checkboxes in the message box are checked and press Install services. Sharing service support will then be downloaded and installed; this may take a while.

  5. Select Allow other people to write in this folder if you wish to allow others to add, change, and remove files in this folder. If you leave this box unchecked, other people will only be able to view files in this folder. You may also fill in the Comment field.

  6. Select Guest access (for people without a user account) if you wish to allow guest users to access your files.

  7. Press Create share to make the shared folder available.

  8. You may receive a message stating that Nautilus needs to add some permissions to the folder in order to share it. If this happens, press Add the permissions automatically.

  9. Other people on the same network (LAN) as you should now be able to access the folder.

[Note]

You may receive a message which says You do not have permission to create a usershare. If this happens, contact your system administrator or configure the Folder sharing service (samba).

See the Shared Folders Administration Tool manual for more information on managing network shares.

Accessing shared folders via Windows

If you would like to access a shared folder hosted on an Ubuntu computer by using computers running Windows, you may have to perform some additional steps:

  1. Press ApplicationsAccessoriesTerminal to open a Terminal.

  2. Type sudo smbpasswd -a username, replacing "username" with your own username. Press Return to run the command.

    [Note]

    You can find out what your username is by typing whoami into the Terminal and then pressing Return.

  3. Enter your password when prompted with "[sudo] password for username:" and press Return again.

  4. When prompted with "New SMB password:", enter the password that you would like to use to access the shared folder and then press Return. You can leave the password blank, which will allow anyone to access the shared folder.

  5. When prompted with "Retype new SMB password:", enter the password that you just entered and then press Return.

  6. You should now be able to connect to the shared folders on the Ubuntu computer.

Problems connecting to shared folders in Windows

If you are unable to connect to a shared folder using Windows, try using the IP address of the Ubuntu computer rather than its host name to access the share:

  1. Press SystemAdministrationNetwork Tools and select the Devices tab.

  2. Select the name of your network connection from the Network device option list (for example, "eth0"). If you have several network connections, you may have to try this several times.

  3. Make a note of the number in the IP address column. It should consist of four numbers separated by dots (for example, "192.168.2.10")

  4. On the Windows computer, select StartRun and type \\ipaddress in the text box, replacing "ipaddress" with the IP address of the Ubuntu computer

  5. Press OK to connect to the shared folder.

If you are still unable to access the shared folder, check that the folder sharing service is running on the Ubuntu computer:

  1. Press SystemAdministrationServices

  2. Find the Folder sharing service (samba) and ensure that the checkbox next to it is checked. If it is not checked, press Unlock and enter your administrative password. Press Authenticate, then enable the Folder sharing service.

  3. Press Close

More information can be found on the Ubuntu community help pages.

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...