prakashdrupal
prakashdrupal
Untitled
23 posts
Don't wanna be here? Send us removal request.
prakashdrupal · 3 years ago
Text
How to generate Random Id in ReactJs
How to generate Random Id in ReactJs
<pre class=”wp-block-preformatted”> export function generateRandomId() { lettempId=Math.random().toString() letuid=tempId.substr(2, tempId.length-1) returnuid } </pre>
View On WordPress
0 notes
prakashdrupal · 3 years ago
Text
The function that returns the first or first two letters from a name in ReactJs
The function that returns the first or first two letters from a name in ReactJs
View On WordPress
0 notes
prakashdrupal · 4 years ago
Text
The following is a list of Drupal interview questions for Technical skills Senior Drupal Developers
The following is a list of Drupal interview questions for Technical skills Senior Drupal Developers
If we save any node then that, which table gets saved in the database.If we save any user profile data save in which table gets saved in the database.How to Fetch Data From Database & Display Drupal 8 How to store data in a database from custom form and render data in a twig template? Drupal 8.Which table stores the content type fields? How does one add CSS or JS to a specific page?If I create a…
View On WordPress
0 notes
prakashdrupal · 4 years ago
Text
How to Get Featured Image from WordPress REST API
How to Get Featured Image from WordPress REST API
Luckily, there are few ways that you can get the featured image after calling the REST API. Method 1: Use Better REST API featured images plugin. I don’t recommend to use this plugin unless you are super lazy. Method 2: Add ?_embed at the end of the URL. Take a look at the example below https://example.com/wp-json/wp/v2/posts?_embed Your featured image is…
View On WordPress
0 notes
prakashdrupal · 4 years ago
Text
How to get author meta into post endpoint in api v2 in Wordpress
How to get author meta into post endpoint in api v2 in WordPress
function wpse_20160421_get_author_meta($object, $field_name, $request) { $user_data = get_userdata($object['author']); // get user data from author ID. $array_data = (array)($user_data->data); // object to array conversion. $array_data['first_name'] = get_user_meta($object['author'], 'first_name', true); $array_data['last_name'] = get_user_meta($object['author'], 'last_name', true); //…
View On WordPress
0 notes
prakashdrupal · 4 years ago
Text
Using Woocommerce as backend & ReactJS as frontend?
Using Woocommerce as backend & ReactJS as frontend?
Coming soon!
View On WordPress
0 notes
prakashdrupal · 4 years ago
Text
The 10 most critical Drupal security risks
The 10 most critical Drupal security risks
View On WordPress
0 notes
prakashdrupal · 6 years ago
Text
Drupal 8 interview questions for experienced Drupal Developer
Drupal 8 interview questions for experienced Drupal Developer
Where do I download a base theme for Drupal 8?
As of this writing, you don’t. It’s true that there are a few themes that have tried to keep pace with Drupal 8 in the pre-beta phase. These are admirable efforts, but none have kept up with the rapid pace of D8 development.I tried my normal go-to, Adaptive Theme, but the D8 version was unusable, and threw tons of fatal…
View On WordPress
0 notes
prakashdrupal · 7 years ago
Text
Woocommerce basic sql queries to fetch data for phpmyadmin
Woocommerce basic sql queries to fetch data for phpmyadmin
Below are some basic MySQL queries for getting WooCommerce products, categories, orders, and order items from the database. All of the queries assume the default “wp_” prefix to the database tables, so you may need to modify those prefixes if your tables are named differently. I’ve also left some example product and order numbers in place to complete the syntax of the queries. I’ve highlighted…
View On WordPress
0 notes
prakashdrupal · 8 years ago
Text
How to Reset admin password in drupal 7
How to Reset admin password in drupal 7
Drupal 7 stores a salted sha512 hash.You can always use the user_hash_password(‘mypassword’) function (located in includes/password.inc) to make yourself a new one, then paste it into the database.
View On WordPress
0 notes
prakashdrupal · 8 years ago
Text
How To Change Siteurl Localhost To Live Server From in WordPress
How To Change Siteurl Localhost To Live Server From in WordPress
UPDATE wp_options SET option_value = replace(option_value, 'http://localhost/loaclwordpress/', 'http://livewordpress.com') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://localhost/localwordpress/','http://livewordpress.com'); UPDATE wp_posts SET post_content = replace(post_content, 'http://localhost/loaclwordpress/',…
View On WordPress
0 notes
prakashdrupal · 8 years ago
Text
How to toggle class jquery
How to toggle class jquery
$(function() { $(".mega-menu-toggle").click(function(){ $(this).toggleClass()("mega-menu-open"); }) });
View On WordPress
0 notes
prakashdrupal · 8 years ago
Text
Different Types of jQuery Document Ready Examples
Different Types of jQuery Document Ready Examples
Tumblr media
These are the different types of Document Ready functions typically used in jQuery. If you want to run, execute any event in JavaScript you must put as soon as document gets ready. you should call it inside $(document).ready() function other wise event may not execute properly.
Following Code included inside $(document).ready() will only run only when the DOM(Document Object Model) is ready to…
View On WordPress
0 notes
prakashdrupal · 9 years ago
Text
How to Get Backup Site and Database in Codeigniter
How to Get Backup Site and Database in Codeigniter
Here I have developed an application in Codeigniter which will help you to take backup as per your wish wnenever you want to take backup. While most web hosting company do a daily backup of a customer’s database and site, relying on them to make backups and provide them at no cost is risky also.
Never take chances when your website is on the line. Make frequent backups !
You can see the comments…
View On WordPress
0 notes
prakashdrupal · 9 years ago
Text
How To Create Custom Drupal like module
How To Create Custom Drupal like module
Let’s start by creating the new Drupal module. To do that we should first create a folder called likepost in the sites\all\modules\custom directory of your Drupal installation as shown below:
Inside this folder, you should create a file called likepost.info with the following contents:
name = likepost description = This module allows the user to like posts in Drupal. core = 7.x
This file is…
View On WordPress
0 notes
prakashdrupal · 9 years ago
Text
How To Create an Example CRUD Module in Drupal 7
How To Create an Example CRUD Module in Drupal 7
There are two basic files require to create a module i.e .info file (contains basic information of module like title, description, configuration link path, module version, Drupal version e.t.c) and .module file (contains functions which implement Drupal hooks to display menu and table e.t.c on admin panel or front site).
Here I also used .install file to create and drop our schema or custom table…
View On WordPress
0 notes
prakashdrupal · 9 years ago
Text
Question: What are JavaScript types?
Following are the JavaScript types: 1.Number 2.String 3.Boolean 4.Object 5.Null 6.Function 7.Undefined
Question: Is JavaScript a case-sensitive language?
Yes! JavaScript is a case-sensitive language. This means that language keywords, variables, function names, and any other identifiers must always be typed with a consistent capitalization of letters.
Question:
View On WordPress
0 notes