Website Design Nepal
Web Design Nepal, Website Design Nepal are the basic abstraction of this page.

Free Joomla Admin Templates for Joomla Backend

Probably, Joomla is the best CMS system in the world. However, the admin side of the joomla is quite complicated for general users if we provide the admin details to them. I am in the search of admin templates for a long time but there are only a few free templates for admin side of the Joomla site. For the shake of developers like me, I have created this page to find all  the free admin templates available for users. Here they are:

1. Admin Template with JQuery (UdjamaFlip)

The joomla admin template is using jquery and gives a nice desktop feel similiar to that of a mac. Latest release of this template is beta 1.0. A white version of the template is also available with this version.

Here are some screenshots of the joomla admin template in action:

Link:
http://udjamaflip.com/joomla-jquery-template/63-joomla-admin-template-10beta-new-white-version.html

2. Admin Praise Lite

AdminPraise Lite is a super lightweight Joomla! administrator panel template. Intelligent shortcuts, logical placement, and customization combine to bring you a totally optimized Joomla! experience.

Link:

http://www.adminpraise.com/joomla/admin-templates/free/adminpraise-lite.php

3. Red & Black Admin Template

This red and black admin template is a simple template with large fonts and intuitive interface. The template has large fonts and easy interface.

Link:
http://www.dotcomdevelopment.com/joomla/joomla-downloads/templates/166-joomla-admin-template

Commercial Templates

1. http://themeforest.net/item/simpla-admin-flexible-user-friendly-admin-skin/46073

2. http://showcase.joomlabamboo.com/crisp/administrator/

3. http://www.adminpraise.com/

Yahoo BuzzWordPressStumbleUponShare

Opacity in css for IE

I’ve been looking into opacity in CSS. All of my initial testing was done in Firefox and worked as expected. Using opacity in CSS is simple enough, accepting values between 1.0 (completely visible) and 0.0 (invisible). As an added bonus it also works in Safari and Opera.
Then I tested into Internet Explorer (IE). IE’s CSS uses filter instead of opacity, and the expected values are different. The filter opacity values range from 100 (completely visible) to 0 (invisible). This turns out to be easy enough to deal with. Here’s an example that sets the opacity to 50%, it works in IE (filter) and others (opacity):

.change_opacity {
opacity: 0.5;
filter: alpha(opacity = 50);
}

But simply setting the filter/opacity value in IE isn’t enough. Turns out that IE requires an element to be positioned in order for filter/opacity to work. If your element doesn’t have a position you can work around this by adding ‘zoom: 1‘ to your CSS. There are other hacks to deal with this, zoom was the one I picked and it seems to work well enough.

In JavaScript you can find out if an element in IE has a position component by checking element.currentStyle.hasLayout. If hasLayout is false then the element has no CSS positioning.

Yahoo BuzzWordPressStumbleUponShare
Tags: ,
Category : Tutorials | No Comments »

Unicode problem in wordpress

I previously had some problems when I mixed Unicode with WordPress. Every time I typed a Unicode character, (after posting) it would display as a ‘?’. This post will describe how to fix this.

Basically, the problem is that WordPress is not comprehending this, and instead of telling the database to store the Unicode characters, it just says, “Heck, just stick a bunch of question marks in there.”

Of course, this can be easily fixed in two steps. All you’ll need is FTP access to your server and a fair comprehension of how to type. So, let’s get started!

1. Open up ‘wp-config.php’ from the root directory of your WordPress installation.
2. Add ‘//’ at the very beginning of these two lines:
define(‘DB_CHARSET’, ‘utf8?);
define(‘DB_COLLATE’, ”);

So that section should now look like this:
//define(‘DB_CHARSET’, ‘utf8?);
//define(‘DB_COLLATE’, ”);

You’re already finished. How easy was that?

Important notes:

1. The quotes surrounding // in step 2 should not be inserted. Those are just indicating that the // is the part you should insert.
2. If you’ve meddled with that part of ‘wp-config.php’ before, it may look a bit different. But pay no attention to the differences. Just be sure add // to the lines containing DB_CHARSET and DB_COLLATE.

Yahoo BuzzWordPressStumbleUponShare

Transaction consistency in PHP MySQL

“Transaction Processing is used to maintain database integrity by ensuring that SQL operations execute completely or not at all.”

Thats fine for a definition but a visual example would be better.

If you go to the store and take 3 of the 10 items on the shelf, that leaves 7 left for others to purchase. You decide to checkout and make your way to the purchase your items. If you agree to buy the items then you give the merchant your money and COMMIT to the Transaction. After you receive your receipt the Transaction is completed.

You have learned all there is to know about Transactions.

Not really, but its a start.

Here are the steps for using Transactions in MySQL:

  1. BEGIN the Transaction.
  2. Update, insert or delete entries in the database.
  3. If you like the changes to the database, then you COMMIT to the Transaction.
  4. If you do not like the changes then you ROLLBACK the changes to the original condition of the database.

Note: You must use InnoDB type tables or Transactions, will not work.

Lets create a basic table in your database called “trans”, and make the table type “innodb”.

CREATE TABLE trans

(

id int not null auto_increment,

item varchar(30) not null,

quantity varchar(10) not null,

primary key(id)

)type=innodb;

Heres the contruction of the table:

mysql> DESC trans;

Field Type Null Key Default Extra
id int(11) PRI NULL auto_increment
item varchar(30)
quantity varchar(10)

3 rows in set (0.00 sec)

Insert some data into the table:

mysql> INSERT INTO trans (id,item,quantity) VALUES (NULL,’Computer’,’5′);

Query OK, 1 row affected (0.00 sec)

Begin the Transaction by using the BEGIN command and update the entry:

mysql> BEGIN;

Query OK, 0 rows affected (0.00 sec)

mysql> UPDATE trans SET quantity =’4′ WHERE id=1;

Query OK, 1 row affected (0.01 sec)

Rows matched: 1 Changed: 1 Warnings: 0

View the results of the update:

mysql> SELECT * FROM trans;

id item quantity
1 Computer 4

1 row in set (0.00 sec)

If you do not like the changes, then use the ROLLBACK command to revert back to the original version of the table.

mysql> ROLLBACK;

Query OK, 0 rows affected (0.00 sec)

Notice the table has reverted back to the original insertion:

mysql> SELECT * FROM trans;

id item quantity
1 Computer 5

1 row in set (0.01 sec)

Lets update the table using another Transaction and commit to the changes:

mysql> BEGIN;

Query OK, 0 rows affected (0.00 sec)

mysql> UPDATE trans SET quantity =’2′ WHERE id=1;

Query OK, 1 row affected (0.00 sec)

Rows matched: 1 Changed: 1 Warnings: 0

mysql> SELECT * FROM trans;

id item quantity
1 Computer 2

1 row in set (0.00 sec)

mysql> COMMIT;

Query OK, 0 rows affected (0.00 sec)

After you use the COMMIT command, the table will take on the changes and remain that way until they are modified.

mysql> SELECT * FROM trans;

id item quantity
1 Computer 2

1 row in set (0.00 sec)

Now that you understand the basics of Transactions lets create a PHP script that will insert new data into the table.

Here is the code for the transaction script:

<?php
//   trans.php
function begin()
{
@mysql_query("BEGIN");
}
 
function   commit()
{
@mysql_query("COMMIT");
}
 
function   rollback()
{
@mysql_query("ROLLBACK");
}
 
@mysql_connect("localhost","username",   "password") or die(mysql_error());
@mysql_select_db("test")   or die(mysql_error());
$query = "INSERT INTO trans   (id,item,quantity)
values (null,'Baseball',4)";
begin();   // transaction begins
$result = @mysql_query($query);
 
if(!$result)
{
rollback();   // transaction rolls back
echo "you rolled back";
exit;
}
 
else
{
commit(); // transaction is   committed
echo "your insertion was successful";
}
?>

Explanation of the script

  1. Functions are created for the BEGIN, COMMIT and ROLLBACK commands.
  2. The script connects to the server and runs the query of inserting data into the table.
  3. If the query is successful then it COMMITS the Transaction.
  4. If the query is unsuccessful then the Transaction will ROLLBACK.

Here is the table after the script executes:

mysql> SELECT * FROM trans;

id item quantity
1 Computer 2
2 Baseball 4

2 rows in set (0.00 sec)

I hope that this gets you started using Transactions in MySQL 4.0 using PHP. Its a great feature and will open up new ideas when building web applications.

Yahoo BuzzWordPressStumbleUponShare
© 2003-2012 Copyright , Young Minds, Kathmandu, Nepal. All rights reserved.