Tag Archives: CMS

Joomla Interview Questions

Joomla Interview Questions for beginners and professionals with a list of top frequently asked Joomla interview questions and answers. This special piece of content is designed for people who are looking for a job as a Joomla developer.

This will be helpful to clear Joomla Interview. Here is the list of basic and conceptual Joomla Interview Questions and Answers:

What is Joomla?
Joomla is an open-source Content Management System (CMS), it allows users to develop online applications, e-commerce, blog sites, and websites. Joomla is built on a model view controller (MVC) architecture.

What is the position in Joomla?
Joomla site template divides the page into a various number of positions like nav, header, footer, top, bottom, module, etc.  This is nothing but a position. You can create as many positions in a template as you want, there is no restriction for it.

Explain what Joomla Modules are?
Modules are small content items that can be displayed anywhere in websites by assigning positions in the template. We can add multiple modules on a page at different positions.

What are the components in Joomla?
Components are responsible for the main content part in a template that makes changes on every click of the menu and displays the main functionality of the site. These are the core elements of Joomla!’s functionality. They include Content, Banners, Contact, News Feeds, Polls and Web Links.

By default what is the prefix Joomla has?
Joomla has a prefix like jos_, but during installation, you can set it according to you by default it generates a random prefix.

In Joomla CMS what is the file where database settings are stored?
Database settings are stored in the root directory under configuration.php.

How many files are required to build a module in Joomla?
Two files are required to build a fundamental module in Joomla:

  1. Mod_module_name.php
  2. mod_module_name.xml

 

What are the advantages of using Joomla?
Main advantages of using Joomla can be listed as:

  1. Joomla is open-source and free to use.
  2. It provides a lot of free components that are available in extensions.joomla.org.
  3. It has inbuilt permission and user role.
  4. One-click update.
  5. Provide simple, elegant and user-friendly templates free to use.
  6. Secure and user-friendly Interface for CMS.
  7. It can be used for eCommerce.
  8. Joomla generates SEO friendly URLs.
  9. Joomla is an MVC framework as well as CMS.

 

What are the limitations of Joomla?

  • Provide limited options
  • Plugin compatibility may cause an issue.
  • Its websites are heavy
  • Limited server resources and efficiency

 

Is Joomla a Blogging tool only?
Joomla can be used as a blog, but it is more powerful and rich in features compared to full blog systems like WordPress. Joomla should be preferred when your requirements are more than just blogging

By default how many tables Joomla have?
A fresh installation of Joomla can have 78 tables.

How many Joomla tables are related to users?
Table related to users in Joomla are :

  1. Jos_users
  2. Jos_usergroups
  3. jos_user_usergroup_map

 

How can you make a menu link that is not clickable?
You can use a link type separator/placeholder to create a menu link that is not clickable 

(doesn’t connect to anything or not to assign any component to it).

What meta description in Joomla Menu Manager?
Meta Description is basically used for SEO Purpose. It is a short description of the content and optional paragraph which is displayed in the results of search engines.

Name the editor used by Joomla content editor?
Joomla content editor uses TinyMCE Editor.

What Is The Default Super Administrator Account For Joomla Called?
Administrator

What is Mambot in Joomla?
A Mambot is a small, task-oriented function, mini-program or plugin. It is used to modify content before display, extend site search, add core functionality, etc. Mambots are renamed plugins in Joomla 1.5.

What is Joomla Plugins?
Plugins are a kind of Joomla extension in Joomla. A Plugin is very flexible and powerful for extending the framework functionality. It contains a bit of code that is used to execute the particular display output of a component or module when the page is built. The plugin functions which are associated with the event are executed in a sequence when a particular event occurs.

How To Link Inside Content And Another Content Item?
Get the URL for the particular page you want to link this to. Create a link using a specific editor or with HTML, if you have no WYSIWYG.

Spread the love

How to add additional fields to user profile in WordPress

WordPress is the most-popular CMS and provides unlimited flexibility to users to do anything they wish.

To maintain its flexibility and maintainability WordPress provides hooks. Using these hooks we can extend the functionality and customize the interfaces as per requirement.

WordPress provides metadata to add additional information with content.

Using these meta we can add number of custom fields with any content like post, page,media,user,category,terms etc.

Here we would know that how to add an additional field to user profile?
For example we have to add highest educational qualification of users.

So we need to to add a user meta for this field. Let the field name is highest_qualification.

We will hook the user meta to the hooks related to user profile. Available hooks for user profile are:

  1. show_user_profile
  2. edit_user_profile
  3. personal_options_update
  4. edit_user_profile_update

These hooks enable user to add and update the meta field. Lets have a look on code snippets:
STEP #1: Add form field when user is going to edit the profile details:

Create a function add_user_educational_qualification and hook it with show_user_profile and edit_user_profile.

<?php
    add_action( 'show_user_profile', 'add_user_educational_qualification' );
    add_action( 'edit_user_profile', 'add_user_educational_qualification' );
    function add_user_educational_qualification( $user ) { ?>
	    
    <table class="form-table">
     <tr>
      <th>
       <label for="address"><?php _e("Highest Educational Qualification");?></label>
     </th>
     <td>
      <input type="text" name="highest_qualification" id="highest_qualification" value="<?php echo esc_attr( get_the_author_meta( 'highest_qualification', $user->ID ) ); ?>" class="regular-text" />
     <span class="description"><?php _e("Please enter your heighest Educational Qualification."); ?></span>
    </td>
 </tr>
</table>
<?php }  ?>

STEP #2 : Now we need to save this information to user_meta table , so we need the hook that are used to save or update the user profile and details.

Create a function save_user_educational_qualification and hook it with personal_options_update and edit_user_profile_update.


	add_action( 'personal_options_update', 'save_user_educational_qualification' );
	add_action( 'edit_user_profile_update', 'save_user_educational_qualification' );

	function save_user_educational_qualification( $user_id ) {
	    if ( !current_user_can( 'edit_user', $user_id ) ) { 
	        return false; 
	    }
	    update_user_meta( $user_id, 'highest_qualification', $_POST['highest_qualification'] );
	}

STEP #3: Now we need to display this information any where in the website:

We are ready with our additional field highest_qualification. We have added it and saved it to database.

WordPress provide a function highest_qualification and using this function we can get the value of meta fields.

 


<?php 
   $meta_key = 'highest_qualification'; 
   $highest_qualification = get_user_meta( $user_id, $meta_key,true); 
?>
Spread the love

How to create a custom page template in WordPress?

What is WordPress Template?

WordPress Page Template is a simple PHP script embedded in HTML page where we can design the layout and put the contents as per our requirement.

There are two parts of a page template

  1. Header
  2. Body

Header is the information part and for WordPress use. WordPress recognize these information in Header. And decide whether it is a page template or not.

<?php
/**
* Template Name: Interview Sortout Custom Page
* Template Post Type: post, page
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/

Template Name – A template is named as {my template name}. This option will be reflect in Layout option when we will create a Page or Post. Template name is not

Template Post Type – This is the scope of template , that where can we use this template. We have to specify that what post type can use this template.

Body is the main content representation. It organize the heading, Thumb images, content, breadcrumb, sidebar etc.


<?php get_header();?>
<div class="container">
	<h2 class="blog-title"><?php the_title(); ?></h2>
	<main><?php the_content();?></main>
	<aside><?php dynamic_sidebar('right-side-bar' ); ?></aside>
</div>
<?php get_footer();?>

 

A complete Page Template:

 


<?php
/**
* Template Name: Interview Sortout Custom Page
* Template Post Type: post, page
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
get_header();?>
<div class="container">
	<h2 class="blog-title"><?php the_title(); ?></h2>
	<main><?php the_content();?></main>
	<aside><?php dynamic_sidebar('right-side-bar' ); ?></aside>
</div>
<?php get_footer();?>
Spread the love