Magento Hierarchy

Magento-Logo

Well,before we starting to go with theme development we need to understand the Magento Hierarchy and where our theme falls into place. There are hundreds of folders and thousands of files, so the listing of all items will be impossible, I will only be focusing on the ones we need to work with.

app/design/frontend/base/default/
app/design/frontend/default/default/
app/design/frontend/<package_name>/<theme_name>/

skin/frontend/base/default/
skin/frontend/default/default/
skin/frontend/<package_name>/<theme_name>/

Magento is having two folders which is mainly for theme and appearence. App and Skin which correspond with each other. The app directory contains files that control how the page templates are rendered, the structure. The skin directory contains files that control the appearance of the website such as CSS, JavaScript, and images.

Within a sub-folder of app and skin are where our packages and themes can be found, a typical install of Magento comes with two packages base and default.

Next we can learn about packages.

How to install Joomla on Ubuntu 14.04

Joomla is one of the most popular free content management systems (CMS) in the world that allows you to easily create and manage a dynamic website. This articles is a simple guide on how to install joomla in Ubuntu 14.04 (a well establshed operating system since 2004.).

First of all we should create a database for joomla, Go to MySQL shell first

mysql -u root -p

Create a database using the following command. I just named my database ‘mydatabase’. You can give a name of youe choice.

CREATE DATABASE mydatabase;
CREATE USER joomlauser@localhost;
SET PASSWORD FOR joomlauser@localhost= PASSWORD("mypassword");

Giving privileges to the user on Mysql-server.

GRANT ALL PRIVILEGES ON mydatabase.* TO joomlauser@localhost IDENTIFIED BY 'mypassword';

Refresh MySQL:

FLUSH PRIVILEGES;

Exit out of the MySQL shell:

exit

Restart apache and mysql:

service apache2 restart
service mysql restart

We will first make a directory temp, where we can download and temporarily store our Joomla files:
create a directory

mkdir temp

change directory to temp

cd temp

Now we are in the temp directory. We will then download the latest version of joomla(it is joomla 3.3.3 at the time of writing) to this directory.

wget http://joomlacode.org/gf/download/frsrelease/19665/160049/Joomla_3.3.3-Stable-Full_Package.zip

We need to install unzip as by default it is now installed:

apt-get install unzip

Now create a directory for keep our joomla files( I named it ‘joomla’) in/var/www/html/

mkdir -p /var/www/html/joomla

unzip the Joomla zip file in the newly created folder:

unzip -q Joomla_3.3.3-Stable-Full_Package.zip -d /var/www/html/joomla

Now give appropriate permissions in the directory

chown -R www-data.www-data /var/www/html/joomla
chmod -R 755 /var/www/html/joomla

Now proceed to the web installation of Joomla.
You can now complete the remaining steps in your browser. Go to the URL http://domain name orIP address/joomla:

Follow the installation steps.

Once you have finished going through the installer, delete the installation folder per Joomla’s instructions and change the permissions on the config file:

sudo rm -rf /var/www/installation/
sudo chmod 755 /var/www/configuration.php

Now you can access the admin panel at http://domain name orIP address/joomla/administrator/ give the credentials as you gave at the time of Joomla installation.

WordPress Recent Users

4919659112_b9f6b0df8f_o

Yesterday i came up in a situation to show the recently registered users in one of my ongoing projects. I have made this requirement by using below code.

This code can be placed in your function.php of theme.

function recently_registered_users() {
global $wpdb;
$recentusers = '<ul>';
$usernames = $wpdb->get_results("SELECT user_nicename, user_url, user_email FROM $wpdb->users ORDER BY ID DESC LIMIT 5");
foreach ($usernames as $username) {
if (!$username->user_url) :
$recentusers .= '<li>' .get_avatar($username->user_email, 45) .$username->user_nicename."</a></li>";
else :
$recentusers .= '<li>' .get_avatar($username->user_email, 45).'<a href="'.$username->user_url.'">'.$username->user_nicename."</a></li>";
endif;
}
$recentusers .= '</ul>';
return $recentusers;
}


After that we need to use the below code for displaying it wherever you required. I have placed the code in my sidebar

<?php recently_registered_users(); ?>

If you wish to have a shortcode for this, it can be simply added by using the below code to the functions.php

add_shortcode('recentusers', 'recently_registered_users');

By adding this shortcode you can use the functionlaty where ever you need. Like in post, pages etc.

You may need to use the bellow shortcode for display the newly registered users in post, pages or widget.

[recentusers]

By adding this you can show your recently registered WordPress users in your sidebar or post or pages.

Hope this help some one…..!!!!!