Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Use of strtok() function in php

It is basically the string function and its used to split the string into smaller strings but other than this we have also other string functions to split the string like explode (return the complete split string in an array). But strtok is di...

PHP: Read CSV FILE, Write CSV FILE and READWRITE CSV FILE

1> Read CSV file When you read the CSV file in php you use the code given below.Here we use the fopen(), fgetcsv() functions to read the csv file. The below code reads data from a CSV file read.csv <?php if (($handle = fopen("re...

Display node form in a different page of in a block

Sometimes we need to display our node form in some other pages or simply in a block of front page. Here is the code snippet which can render our node form in any block or any other page: for a page: module_load_include('inc', 'node', 'n...

Recursive In CakePHP

Hello Readers By default cakephp will get the data of the Model that you are querying for and the data of the Models that are linked to the main Model. So, by using recursive in cakephp you will get the data of the single association as wel...

$this->request and $this->data in cakephp

Hello Readers, Generally, we use the $this->request and $this->data in cakephp to get and post the data in application as well as in API's. So, below we describe in brief about the request. $this->request: Above, request is the de...

Create a custom shipping method in Magento

Magento supports various shipping methods by default like flat rate, free shipping etc. To view the list of shipping methods available go to "System->Configuration". Under left menu select "Sales" section and then select "Shipping Methods" tab...

how to restrict file access to specific user roles

Drupal has great features for files management. Website user with required permissions can set the content type and manage the file upload process. User has the authority to set the content type as well as file size to upload. If you want to resi...

Adding attributes to short code in wordpress

Welcome to Findnerd. We all knows the power of shortcodes. It is very simple way to create a new functonality. We are going to discuss the way how we can add attributes in shortcode. We can give any name to shortcode and then manage attributes us...

How to detect browsers in wordpress

Welcome to FindNerd In some situation we have to detect the browser and perform the different operations on different ones. If we talk about the WordPress then there are many global variables available to detect the browser on which you are pro...

Adding terms to Taxonomy in wordpress

Welcome to Findnerd. We all knows we can build our own custom taxonomies and insert the terms in taxonomies. There is one function available to insert the terms in perticular taxonomy named wp_insert_terms which takes three parameters. First one ...

Listing custom taxonomy terms in WordPress

Most used concept of the WordPress is custom taxonomies as well as custom post. We can build our own custom post as well as taxonomies. If you want to list terms of your custom taxonomies then you can simply use function named get_terms which ta...

Adding Captcha to Contact form 7 in wordpress

Welcome to Findnerd. One of the most used plugin named custom form7 which is useful to manage the contact us page of the website. We need to show the captcha in contact us form. If you start the customization in contact form 7 then it is very lon...

Wordpress Creating a custom taxonomy

Welcome to Findnerd. We are using wordpress function named register_taxonomy to create a new custom taxonomy. There are many in-bulid taxonomies like categories,tags and Link categories. This functions takes three parameters. First one is name of...

Password Protect Website Directory Using .htaccess File

Hello Reasders Here, we protect the directory using .htaccess file Before doing this, we will first need to create a .htaccess file(.htaccess file is the configuration file for the Apache HTTP server) which can be used to affect the directo...

Laravel 4.x Installation And Server Requirements

Step by Step installation of laravel 4.x. Step 1: For laravel first we should have composer. So for composer download composer.phar and if you use window then you should use composer window installer. Step 2: After uploading compose...

Middleware In laravel 4.x

Middleware is one of the important part of any application. The code which we want to stick between request/response life cycle which is not necessary part of our application logic. That is called as middleware. Let take a example to know more a...

Create a custom payment method in magento

Magento provides many payment methods by default but sometime we need to add some custom payment methods . So in this blog I am explaining how do we create basic custom payment method. First need to understand the structure of the files - ...

Get Multiple Checkbox Values in PHP

Hello Readers, If you select one or more then one checkbox value in php you can easily use the below code. Here first you make a html (index.html) index.html: <form action="checkbox.php" method="post"> <label class="head"&g...

Wordpress Creating a simple short code

Shortcodes are the power of the wordpress. You can simply create shortcodes and call it via the do_shortcode function or on pasting it on editor. For adding a shortcode, you ned to use the hook add_shortcode. We are going to share the script for ...

Create new button in wordpress editor

Welcome to Findnerd. We are going to discuss the steps to create new buttons and show the hidden buttons of editor. We all know that wordpress bydefault using editor TinyMCE. There are many hidden options/button available in the editor so you can...

Paypal verify Card details for make payment

Hello guys, Its really helpful for integration Paypal in PHP to verify card details. To integrate it, first you have to download the PHP-Paypal SDK, below is the direct link https://github.com/paypal/PayPal-PHP-SDK/releases // 1. Autoload...

How to login in Cakephp using Email and Password or Username and Password

Hello Readers, If you want to login the cakephp application using the email or username and password Use the below code: $username=$REQUEST['login']; $email=$REQUEST['login']; $password=$REQUEST['password']; Here $REQUEST be the super...

Using CakePHP FormHelper with Bootstrap Forms

Hello Readers , If you are using Cakephp and not use Cakephp FormHelper then its a bad technique of coding . To use Cakephp FormHelper first of all declare FormHelper in controller . So we have the piece of Html code below which we need to...

Timezone and more problems with Cakephp 1.3 and PHP 5.3.2

Hello Readers, We have heard this Timezone Warning many times whenever we build Cakephp project from scratch. The warning message is as below: Warning: strtotime() [http://php.net/function.strtotime]: It is not safe to rely on the sys...

How to echo out current URL in Cake's view?

Hello Readers , If you want to echo out the current URL in cakephp then follow the below codes. Current URL: http://example.com/controller/action/?query=12 We can do it this way like. <?php echo $this->request->here; ?> ...

Routing in Laravel 4.x

In any project routing plays an important role.In laravel 4.x we will define our routes in routes.php which is in app/routes.php. In laravel 4.x the basic routes consist of a URL and a clousure callback. Example: Basic Get Route Route::ge...

Validation in Laravel 4.x

In any project validation plays an important role.In laravel 4.x we have validation class which is used to validating data and validating error message. Basic Validation Example: $validator = Validator::make( array('name' => 'Dayl...

FirePHP

Debugging means finding out the bugs.We all need to be sure that our applications is bug free, so here we have another tool for debugging our application that is "FIREPHP". Firephp is a Firefox extension, similiar to FireBug. It enables you t...

Basic Query Using Eloquent ORM in laravel 4.x

As we know Every DB table has a corresponding "Model" that is helpful to interct with the table. By using Eloquent we can implement query using MODEL NAME. The basic query using Eloquent ORM in laravel 4.x are All Query: $users = User...

Dynamically remove the model validation in cakephp

Hello Readers; If you want to remove the validation in cakephp from the Model dynamically then use the below one line code. $this->validator()->remove('username'); The above validation completely remove all rules for a field.(Her...

PHP Access Specifiers (Public, Private, Protected)

Hello Readers, The below are php accesss specifiers which are commonly used in php: Public: When you declare Public Method or function in PHP. It can be used as Publicly into the Class (so as to be seen by other people). Public scope...

CakePHP: Call to a member function setFlash() on a non-object

Hello Readers, We have a session helper in cakephp which is known as setFlash() basically use for showing messages after login successfully , user registration etc. First of all we have to assign the session helper in Controller. Code us...

Cross-Origin Request Blocked on wordpress

Cross domain request is a HTTP request from other domain. Browsers do not support the XmlHttpRequest from other domain. Cross origin resource sharing provides a way to allow these type of requests. You need to set the headers to allow the other ...

Modifying Comments section look and feel in wordpress?

WordPress provides comment feature. Website needs comment section for reviews which makes visitor engagement on web page. You can change the look and feel of the comment section. In default WordPress themes we have comment.php which is responsib...

How to create Query-based template files?

Welcome to wordpress discussion. Today we are going to discuss the database related functions in wordpress. We can simply create query to display the different types of posts. We start the discussion with hook named pre_get_posts which calls the...

Wordpress Template File List

Wordpress provides different templates to manage the website like comment.php is useful to manage the comment box. We are going to discuss these different templates which are useful in theme development. Suppose we want to show the specif...

Display Instagram photos from different account to my webpage

Welcome to this blog. You can get the photos from Instagram by setting up the username in the url. You can simply use the ajax request and to avoid the cross domain issue you can use the whateverorigin.org in your url. You can use the dataType...

Modifying search results look and feel in WordPress?

Wordpress themes includes different files for different purpose like single.php for showing the single post. We make the changes in search.php to modify the look and feel of the search results. You can see this file in default wordpress themes an...

How to add a PHP page to WordPress?

If you want to create php pages in wordpress or in other way you want to create templates in WordPress then you need to simply create a file in your activated theme and write below code in top of the file. After that you can create a wordpress...

Retrieve WordPress root directory path?

Wordpress provides different powerful functions which are useful for different prospective. We are going to discuss one function named get_home_path(). Through this function we can get the path of root directory in your wordpress setup. We can si...

How to manage Inventory settings in Magento

The product inventory settings can be added in two ways, 1.1) system settings for all the products 1.2) and individually, i.e. you can edit the settings for each product. To access and configure system settings, log into the admin panel, na...

Send an Email using email component in cakephp

Hello reader if you want to send email using the email component in cakephp you need to run the email component of cakephp ex You should place email send routine in your AppController: function _sendMail($to,$subject,$template) { $th...

How to Hide RSS link in WooCommerce

If you want to change or hide RSS link in the primary navigation of your WooCommerce website, without getting into the php files. Use below 2 line code to make this possible- #navigation ul.rss {display:none !important} #navigation ul.rss.car...

Customise a product tab in woocommerce using 'woocommerce_product_tabs' action hook

Hello Friends, The below code will help you to Customize a product tab in woo commerce using 'woocommerce_product_tabs' action hook, first you have to replace the description tab with a custom function. <?php add_filter( 'woocomme...

How to hide sort by price option in WooCommerce

Hello friends, If you want to get rid of sort by price option in you Woo-Commerce site. you can use below css code to hide it: .orderby option[value="price"]{ display: none; } Hope this help you.

What should be Valid OAuth redirect URIs for Facebook App

If you are getting this error "Given URL is not permitted by the Application configuration:". You need to define "OAuth Redirect URIs" on your facebook app setting. To resolve this, please follow the below step: 1) Open your facebook developer...

Commonly used php directives (php.ini)

Below are commonly used php directives, which can be changed in php.ini file (we use Linux so its path is like that: /etc/php5/apache2/php.ini) or its called php configuration file or php configure setting. 1> By default the execution time ...

How to resolve the 404 error page after changing menu alias in Joomla administrator

In Joomla admin when we creating Menu and give the menu alias name it's working fine. But sometimes, the case when we change the alias name of one menu. For example: we change example.com/mymenualias1 to example.com/mymenualias2 We are r...

How to get any File Name to PHP File using Command Line?

In Ubuntu system, first check for the PHP. For checking open the terminal, using command **Ctrl +Alt +T** and type whereis php If PHP present in system, above command display the path of PHP Make a PHP file from where you can acce...

Set robots in magento for cms pages

Robots is useful to prevent your website from search engines indexing. You can simply add robots.txt in your website as well as set the default robots settings from admin. Go to configuration->system->design section to set the value for ro...
1 36 44
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: