Posts

changes into code

sudo apt install poppler-utils pandoc unoconv ocrmypdf libreoffice ===================== sudo chown -R www-data:www-data /var/www/html/merger/ sudo chmod -R 755 /var/www/html/merger/ sudo chmod -R 777 /var/www/html/merger/uploads/ sudo chmod -R 777 /var/www/html/merger/merged/ sudo chmod -R 777 /var/www/html/merger/temp/

wordpress plugin boilerplate

  Ideal Folder Structure (Industry-standard) log -manager/ │ ├── log -manager.php (Main plugin file) │ ├── includes/ │ ├── class - log -manager.php │ ├── class - log -manager- admin .php │ ├── class - log -manager-logger.php │ └── class - log -manager-db.php │ ├── assets/ │ ├── css/ │ └── js/ │ └── uninstall.php 1️⃣ Main Plugin File ( log-manager.php ) 👉 ONLY bootstraps the plugin <?php /** * Plugin Name: Log Manager * Description: WordPress Log Manager Plugin * Version: 1.0.0 */ if (! defined ( 'ABSPATH' )) exit ; define ( 'LM_PATH' , plugin_dir_path ( __FILE__ )); define ( 'LM_URL' , plugin_dir_url ( __FILE__ )); require_once LM_PATH . 'includes/class-log-manager.php' ; function run_log_manager ( ) { $plugin = new Log_Manager (); $plugin -> run (); } run_log_manager (); 2️⃣ Core Plugin Class ( class-log-manager.php ) 👉 Controls everything <?php class Log_Manager { public functio...

graphql mutation in wpgraphql

 mutation MyMutation {   registerUser(     input: {username: "abacus", email: "abacus@gmail.com", password: "abacus123", firstName: "abacusjames", lastName: "nito"}   ) {     user {       auth {         authToken         refreshToken         authTokenExpiration         refreshTokenExpiration       }       id       email       roles {         nodes {           name         }       }     }   } } =========================================== contact form 7 submission with rate limiter ===>  add_action('rest_api_init', function () {     register_rest_route('wp/v2', '/cf7/submit', array(         'methods'  => 'POST',         'callback' => 'mcbot_...

Donation

Image
 Hi user! If you appriciate my work , then you can send me welcome gift!  Meme template https://drive.google.com/drive/folders/11tu9TcU9_fxWI9h-2zKvXUux9yiH8rlz as  now, in india , we only focuses on UPI payment! If you have any quqery! then whatsapp me: 9330497982 if you want to donate me via Google Pay or any UPI App then scan the below link and payout to me!

STRAPI

Image
  Strapi helps us to provide pre-made cms backend. In strapi everything is about content type.   Topic: Weird Things About STRAPI Topic: Document Save States When we want to store a post into strapi, that time it gives us 2 options: “publish”, “save”. When we create content as publish/save it creates 2 different records. First 2 are for “save” and the rest 2 are for “publish”. Good thing is when creating a new publish/save it delta the OLD one ID and create a NEW one. Topic: Content Type change in strapi We can add multiple fields into strapi content type. For changing the Column Type we need go in inside /src/your-content-type/schema.json /* OLD ONE */ "attributes": {     "title": {       "type": "string"     },     "description": {       "type": "text",   "length": 80     }, /* NEW ONE */ "description": {    ...

LAMP stack install linux

 step 1: sudo apt install apache2  step 2:  sudo apt install mysql-server -y sudo mysql > CREATE USER 'new_user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * . * TO 'new_user'@'localhost'; FLUSH PRIVILEGES; STEP 3:  sudo apt install php php-mysql php-gd libapache2-mod-php  STEP 4:  sudo apt install nano phpmyadmin Step 4.1: configure phpmyadmin after installation  sudo nano /etc/apache2/apache2.conf Include /etc/phpmyadmin/apache.conf sudo service apache2 restart STEP 5: set the var/www/html access sudo chown -R $USER:$USER /var/www/html sudo chmod -R 777 /var/www/html sudo usermod -aG www-data $USER sudo systemctl restart apache2 ==================================================== for wordpress directory permission:  define('FS_METHOD','direct'); 

MCSL 216 MCA NEW Practical ~ common questions suggestions

Topic: JS VALIDATION   Q1. Design a form for booking room through a Hotel website. The form should have relevant fields (make suitable assumptions). Further, the form should have Submit and Reset button. Now, perform following: Marks: 20   Solution: <html>     <title>hotel form booking</title>     <body>         <br>         <h2>Hotel Form</h2>         <br>           <form id="booking_form">             <label for="p_name">Person Name</label> <br>             <input type="text" id="p_name" name="p_name">          ...