How to use curvycorners in Magento themes

Rounded edges or curvy corners are always a trendy style in web designing. Early stages we used images to make the edges rounded, later it replace with css or javascript alternatives. Among all the easiest method is curvycorners.js. Just include this javascript file and some 4-5 lines of code, your job is done. You can find examples and usage guide in www.curvycorners.net.

I am not going to explain much about curvy corners here, you just go to the above mentioned website and explore yourself more on that. Here i am going to explain how to use this with a magento themes.

For adding curvycorners.js, download the file ,extract it and copy curvycorners.js (curvycorners.src.js) to

<Magento installation>/js/lib

After this go to your theme directory and edit the page.xml file. You can find your page.xml in

/app/design/frontend/defaul//layout/page.xml

Here we will add the code for calling javascript. You can see a lot of js calls already there on the page.xml. Add these line to your page.xml file

<action method=”addJs”><script>lib/curvycorners.js</script></action>

So the new javascript will be called. There is few more steps to curve your html boxes in Magento. Hope you found how to use curvycoreners from its site (Refer it how to use section). There are some lines of code to add to the header section of the code. Here i suggest you to add that code to a new .js file and include it like what we did for curvycorners.js.

addEvent(window, ‘load’, initCorners);
function initCorners() {
var settings = {tl: { radius: 0 },tr: { radius: 10},bl: { radius:10 },br: { radius: 0 },antiAlias: true}
var settings2 = {tl: { radius: 10 },tr: { radius: 10 },bl: { radius: 10 },br: { radius: 10 },antiAlias: true}
var settings3 = {tl: { radius: 4 },tr: { radius:4 },bl: { radius: 4},br: { radius: 4 },antiAlias: true}
var settings4 = {tl: { radius: 5 },tr: { radius: 5 },bl: { radius: 0 },br: { radius: 0 },antiAlias: true}
curvyCorners(settings, “.footer”);
curvyCorners(settings2, “.col-main”);
curvyCorners(settings3, “.registered-users,.new-users”);
curvyCorners(settings4,”.breadcrumbs”);
}

The file content will be like this. So now you are done. This post is not of course to teach curvycorners, so if you have any doubt with curvycorenrs please visit www.curvycoreners.net and explore more.

Post to Twitter Tweet This Post

Continue Reading

How to resolve : Internal Server Error when accessing cpanel/WHM/Webmail

Imagine you are accessing your Website WHM or cPanel or Webmail hosted (in your VPS) and what if you see this

Image showing the issue

How to solve this

Pre-Requisites : You should have Shell access (as root) to the Node server.

Mostly this happens due to inode issue. The inodes allocated to the server maybe full. inode is a data structure on a traditional Unix-style file system such as UFS. An inode stores basic information about a regular file, directory, or other file system object.

Steps

Say we are logged into the Node Server. There we are going to list all the Containers existing on the Hardware Node. By default, only running Containers are shown.

[root@linuxvps1 ~]# vzlist -a
CTID    NPROC STATUS   IP_ADDR        HOSTNAME
100     18  running    100.20.11.111  WEB.EXAMPLE.COM
101     63  running    100.20.12.203  -
102     169 running    100.20.92.182  server2.example.com
103     81  running    100.20.56.169  example.net
78965   236 running    100.20.77.204  server1.example.com

Assume your container is 103. So simply enter into 103 by this command

[root@linuxvps1 ~]# vzctl enter 103

Check if the inodes are full in the container

[root@linuxvps1 ~]# df -i

Most Probably it should display something like this :

Filesystem      Inodes      IUsed        IFree     IUse%      Mounted on
/dev/vzfs       200000      200000       0         100%       /
none            65536       95           65441     1%         /dev

Bang ! The inodes on /dev/vzfs mounted on / are full. You’ve to go nowhere else to see why that error was delivered. A simple solution will work out, you’ve to increase the inode limit. You’ve two options, either through Shell or through the Node Control Panel (like Parallels Infrastructure Manager)

First we will go through Shell mode with this command :

$ vzctl set veid --diskinodes softlimit:hardlimit 

Where ‘veid’ is the VPS ID

root@linuxvps1 ~]# vzctl set 103 --diskinodes 7680100:7680200

Second we are going for Node Control Panel. In the infrastructure, you will see your VPS with a ! sign. That indicates your VPS is having some sort of issue.

So you’ve seen the Alert. Next access the VPS, go to Resources tab. I’m sorry to tell you that I grabbed this screenshot after resolving the issue, but it will help you anyway

You should see the ‘Disk Inodes’ is full under ‘Disk Usage’ category (Here it is not !). Next Click Configure to settle this one

See the Highlighted part, the inodes should be limited to some size. Increase it or remove the check mark to make it unlimited.  Make sure you save the changes. Now try again accessing cpanel/WHM/Webmail. It should load with out any issues.That makes a smile in your face, isn’t it ? ;)

Post to Twitter Tweet This Post

Continue Reading

Manually removing the domains from plesk – when plesk frontend don’t work

Could be a bug with Plesk 9.5 version. But Plesk 9.5 is giving issues once in a while in deleting the domains which are “partially” created.

ISSUE

DNS zones are never created, and the DBs are not properly updated. Even after reconfiguring the domains using websrvmng.exe –reconfigure-vhost –vhost-name =”domain.com” it couldn’t be deleted. Shows the message “Information: Domains are now removed”, but in real, the domain will be still shown under the domains list.

And the domain will be in suspended state. Unsuspension of the domain will result in an error message “DNSZone::Table::select() failed: no such row in the table”

Solution for the above issue is explained at http://www.supportsages.com/blog/2009/08/plesk-account-unsuspension-tableselect-failed-no-such-row-in-the-table/

However even after fixing the DNS like this, the issue cycles.

Removal of domain results in suspension of domain -> Unsuspension of domains results in above error -> Fixing the error allows to unsuspend and Removal of domain results in suspension of domain :D

SOLUTION

So solution I used to solve was to manually remove the domain related entries from plesk database, from the file system and also from the email services. Get into MySQL or whichever DB plesk is using. For finding the current DB, use Plesk Reconfigurator and then follow the parallels KB found at http://kb.parallels.com/en/3472

The instructions below assumes that you are using Mailenable and Plesk vhosts directory is at “C:\Inetpub\Vhosts” . This location can be at D:\ or E:\ even. Also, I hereby assume that there are no two domains which can match the mysql LIKE query I used below i.e There are no domains like 1domain.com , 2domain.com along with actual domain.com. If there is one, please use your “brain” to find the right domain and the IDs associated with it. When in doubt, please comment.

Disclaimer : If you mess up the database neither me or SS will be responsible for it :)

Let’s first gather all the ‘id’’s first, like dom_id, sys_user_id, id etc which will be helpful in the deletion of database entries relating to the domain name which you want to removed.

1. Getting the IDs.

Domain ID – dom_id or id


 mysql> SELECT id FROM domains where name=’domain.com’

We are assuming that dom_id you got as a result of above command is 8880

Database ID – db_id


mysql> select id FROM data_bases where dom_id=(SELECT id FROM domains where name=’domain.com’);

We are assuming that db_id you got as a result of above query is 1433. Please note that you could get more than one result. Please save all the db_id and re-execute the sql query for each db_id.

System User IDsys_user_id


mysql> select id FROM sys_users where home like '%domain.com%';

We are assuming that sys_user_id you got as a result of above command is 8843

Let’s start the actual deletion process

Shall we backup ? Better be safe!


C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\bin>mysqldump -P8306 -uadmin -p<plesk DB admin pass> psa > c:\psa.sql

You are now ready to delete. Please execute the follow sql commands in mysql prompt


delete from db_users where db_id='1433';
delete from data_bases where dom_id='8880';
delete from mail where id='8880';
delete from subdomains where id='8880';
delete from dns_recs where id='8880';
delete from domains where id='8880';
delete from domain_aliases where dom_id='8880';
delete from hosting where sys_user_id='8843';
delete FROM sys_users where id='8843';
delete from dns_zone where displayName=’domain.com’;

Database entries are deleted. Now it’s time to remove the users and files from the filesystems, IIS, Server, Mail server, DNS server etc.

  1. Remove the domain from inetpub -> vhosts
  2. Remove from Mail Enable Administrator. If it is SmarterMail, follow other steps.
  3. Start => run => mailenable.msc => Post Offices and remove it.
  4. Remove Sites “domain.com” and “Application Pool” from Internet Information Services manager. If IIS7, use command line option => %systemroot%\system32\inetsrv\APPCMD.EXE delete site “domain.com” .
  5. Remove from Computer management Console -  System Tools > Local Users and Groups > Users. You must remove references to the domain for Plesk Domain User and Plesk IIS User as well.
  6. Remove DNS entry – depending on the DNS server.

Finally,


cd %plesk_bin%
domain.exe -r domain.com

These steps should help remove the domain manually from the plesk. Please note that this article is based on the second attempt and could be buggy. I assume some “common sense” when running these commands. Understand the commands and each step before you actually execute it. Good luck. Don’t MESS up!!

Post to Twitter Tweet This Post

Continue Reading

Your email:

 

Post to Twitter Tweet This Post

About this blog

This blog, acts as a knowledge repository for the world and is unofficial! Anything we find interesting in the cyber world will go here. Most cases, this blog will reflect the happiness of our staff in reaching successful solution to an issue (s)he worked on. A reference for other fellow SAGEs who come across similar issues later