Updates from saif Toggle Comment Threads | Keyboard Shortcuts

  • saif 9:56 am on December 31, 2012 Permalink | Reply  

    2012 in review 

    The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

    Here’s an excerpt:

    600 people reached the top of Mt. Everest in 2012. This blog got about 7,100 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 12 years to get that many views.

    Click here to see the complete report.

  • saif 7:55 am on October 10, 2012 Permalink | Reply
    Tags: featured image, post thumbnail,   

    WordPress ‘Featured Image’, how to use… 

    WordPress stands for most common and popular CMS now a days. Sometimes we need just a media field for a image to be added in a post. WordPress latest 3+ version has this facility, so you don’t need to use any ‘custom field type’.

    In default theme, this feature enabled by default, but when you are using a custom made theme or a theme of your choice which you downloaded, but not supported ‘featured Image’ section, then what to do.

    Its very simple for wp developer to add that support to your theme. Add below code to your theme’s functions.php file :


    Now you will see that section in your admin sidebar when adding/editing any page/post. And also you will find option at your ‘Screen Options’ section as below, so from there you can enable/disable that for future need.

    In right sidebar, ‘Featured Image’ section after adding a image:

    Now, You knew how to add theme support and how to add an image on admin panel. So to show this image on front-end, in any single post/page or in any loop, just add below code to show it between wp post loop:

    <?php the_post_thumbnail();?>

    This will show that image as you added in admin panel with that image ratio. Note that this code will execute when you are using wordpress’s default loop code like <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> and <?php endwhile;  ?>

    If you use custom loop code using other function like get_posts() or custom query like $wpdb->get_results(), then it depends on that way and you have to pull data with correspondence format.

    Use, modify and share your thoughts and happy blogging 🙂

  • saif 7:39 am on October 9, 2012 Permalink | Reply
    Tags: agile, scrum, software development   

    Agile Methodology, an analysis to its title 

    Agile Methodology:

    • an approach to project management
    • it works at iterative, incremental way
    • its also known as ‘inspect-and-adapt’ approach with ‘analysis-paralysis’ way.

    Agile Software Development is a group of software development method including most used popular SCRUM with the tool ScrumWorks Pro.

    The main concept behind it:

    Agile methods break tasks into small increments with minimal planning and do not directly involve long-term planning. Iterations are short time frames (timeboxes) that typically last from one to four weeks. Each iteration involves a cross functional team working in all functions: planning, requirements analysis, design, coding, unit testing, and acceptance testing. At the end of the iteration a working product is demonstrated to stakeholders. This minimizes overall risk and allows the project to adapt to changes quickly. An iteration might not add enough functionality to warrant a market release, but the goal is to have an available release (with minimal bugs) at the end of each iteration.  Multiple iterations might be required to release a product or new features.

    Team size is typically small (5-9 people) to simplify team communication and team collaboration.No matter what development disciplines are required, each agile team will contain a customer representative. This person is appointed by stakeholders to act on their behalf

    And the meeting for these teams, sometimes referred as daily stand-ups or daily scrum meetings, are held in at the same place and same time every day and should last no more than 15 minutes. Standing up usually enforces that rule.”

    There is a common debate between old Waterfall and Agile method. Now the question is why agile and why not waterfall?

    Waterfall method tell us for a sequential workflow. like making requirements, design, coding, testing and so on, that is one by one.
    But the problem here is : at the end of a project, a team might have built the software it was asked to build, but, in the time it took to create, business realities have changed so dramatically that the product is irrelevant. In that scenario, a company has spent time and money to create software that no one wants. Couldn’t it have been possible to ensure the end product would still be relevant before it was actually finished?

    Yes, it can be done by agile way, an iterative, incremental system where a group of teams finish their assigned work by their team meeting, collaborating with client within a short time frame and finally done with a successful software which make sense.

    Well-known agile software development methods include:

    Today, up to this, happy agiling, be right back with SCRUM soon 🙂

  • saif 8:49 am on April 27, 2012 Permalink | Reply
    Tags: excerpt, how to, pages,   

    Add Page Excerpt Option in WordPress Admin Panel 

    WordPress is not a blogging platform now, has many other features, options, resources, plugins to fulfill your requirements.

    In some wp version(like 3.1), for ‘pages’, no ‘excerpt’ option, even not option in ‘Screen Options’ to display it . So an easy way to add this to your wp admin panel, follow below steps:

    add the following code to your functions.php file.

     //Add Excerpts to Pages 
    function themeprefix_add_page_excerpt_support() {
     add_post_type_support( 'page', 'excerpt' ); 
    add_action('init', 'themeprefix_add_page_excerpt_support'); 

    We have done this excerpt option by a wordpress hook. At first we used add_post_type_support function to use a specific post type option then we packed within a function. And this function called by a worpress hook/filter to make it available for admin panel.

    Functions.php is found in “wp-content\themes\[your-currently-active-theme]\”.

    Cheers 🙂

  • saif 4:57 am on December 2, 2011 Permalink | Reply
    Tags: CMS, htaccess issue, OpenCart, opencart config   

    OpenCart config url,dir path problem and htaccess issue 

    Opencart is another easy, robust and handy e-commerce CMS. For beginner, there are some common problem related to URL, Directory path and .htaccess issues.

    Following issues need to keep in mind during installation, moving to another server or installation on windows:

    • Use trailing slash after the url like define(‘HTTP_SERVER’, ‘localhost/myproject/’) otherwise it may not load all css, images and js files.
    • For windows, use path like define(‘DIR_APPLICATION’, ‘F:\wamp\www\myproject/catalog/’); as well as for other settings. It may be ok in normal way like define(‘DIR_APPLICATION’, ‘F:/wamp/www/myproject/admin/’);
    • For htaccess, if your store/project is in your document root which is generally public_html on cpanel servers that is ok for for default RewriteBase, but if it’s in a subfolder you will need to edit the file and change the ‘RewriteBase /’ to ‘RewriteBase /subfoldername/’

    That’s all for some common issue. Have fun with open source opencart 🙂

  • saif 12:15 pm on June 14, 2011 Permalink | Reply  

    isset() use techniques in php 


    isset() is the most commonly used php construct as well as a good friend of  a programmer. we frequently use it to check whether a variable has been set or not. it returns true if the variable has been set otherwise false… also return false if the variable has been set to null.

    isset() is the only one of the three language constructs that accepts an arbitrary amount of parameters. Its accurate prototype is as follows:

    isset($var1, $var2, $var3, …);
    It only returns true, if all the variables have been defined; otherwise, it returns false. This is useful when you want to check if the required input variables for your script have really been sent by the client, saving you a series of single isset() checks.

    So writing it with arbitrary parameters can be interesting upon your need! cheers!

  • saif 1:53 pm on June 6, 2011 Permalink | Reply
    Tags: , site   

    Get website favicon by single line 

    Getting website favicon is more easy now. Google gave us many things till now to do and share web info, development and so on. Google gave a nice shared stuff to get any site’s favicon by a sigle line :


    So check out this for Yahoo’s favicon. By changing the desired site’s url, u can get any site’s favicon as well. Have fun and cheers!

  • saif 9:48 am on March 15, 2011 Permalink | Reply
    Tags: interview, php programmer, question   

    Interview question set for a advanced PHP Programmer 

    Recently, I got a chance to face some questions which make sense for a PHP Programmer, who can rethink all about web development what he has been learned yet. I thought i can share those among yourselves just for sharing that what could be the questions for a advanced PHP Programmer.

    Questions are as follows. I will try to give answers here and discussion about these time to time. Looking forward to hear from you guys about any question listed below.

    • Question: You are committing a file with bug fixes to the SVN, there is an issue with a conflict in the file what does this mean? How do you solve it?
    • Question: How would you find out what files were out of date within SVN and commit those specific files into a revision with a log message via the command line?
    • Question: How do you use memcached to optimize mysql queries?
    • Question: How do you iterate an array in smarty?
    • Question: PHP errors are not displaying on the page you are developing. You only have SFTP Access to change files. How do you display the errors?
    • Question: What is better and more efficient in development time for a large scale enterprise PHP / MySQL application. Using packages and open source classes or developing your own solutions?
    • Question: What are the risks of using user inputted data in SQL queries and how to eliminate this risk ?
    • Question: You have been given a specification and been briefed on a project. The specification included work that was already completed for the project but there are many bugs and you did not write this code. What do you do?
    • Question: There is a bug in your code, what do you do?
    • Question: Recently users are complaining they are being logged out of the site. The site uses sessions and php. Also recently a new webserver was added, bringing the total to 2. What could be causing this and how would it be solved?
    • Question: You need to create a search function for a website with over 30.000 searches per hour on a record set of 1.000.000 text records. How would you do this using MySQL?
    • Question: You need to integrate an external website’s data that does not have a API – describe this process.
    • Question: You’ve written a news service in PHP that needs to used by many external websites. How would you allow those websites to use your functions to display the news on their site ?
    • Question: You want to create an AJAX suggestion box that displays in real time suggestions related to the content of the search textfield. Describe how this process would work.

    I think, some questions are really good and every PHP Programmer should know about those terms.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc
%d bloggers like this: