Sunday, December 23, 2018

Changing default avatar size cropped/used by BuddyPress,

How to change BuddyPress Avatar Thumbnail size and Profile image:

1) create a bp-custom.php file in your wp-content/plugins directory.
2) add that codes

if ( ! defined( 'BP_AVATAR_THUMB_WIDTH' ) )
    define( 'BP_AVATAR_THUMB_WIDTH', 80 ); //change this with your desired thumb width

if ( ! defined( 'BP_AVATAR_THUMB_HEIGHT' ) )
    define( 'BP_AVATAR_THUMB_HEIGHT', 80 ); //change this with your desired thumb height

if ( ! defined( 'BP_AVATAR_FULL_WIDTH' ) )
    define( 'BP_AVATAR_FULL_WIDTH', 310 ); //change this with your desired full size,weel I changed it to 260 :)

if ( ! defined( 'BP_AVATAR_FULL_HEIGHT' ) )
    define( 'BP_AVATAR_FULL_HEIGHT', 310 ); //change this to default height for full avatar

Thank You.

Monday, April 2, 2018

How to install Zen Coding (now called Emmet) with Sublime Text 3

Now I'm going to tell the full instruction of how to add Emmet on Sublime Text 3.

1st we have to install package controller.
go to and collect code
I'm using Sublime Text 3
My code:
import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( '' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

2nd open Sublime Text 3. go to view > show consol 

3rd past that code and pass enter.

4th close this Sublime Text 3 application and open it again

5th after open Sublime Text 3 again go to tools and open command palette see

6th type inatall package and chick on it see

7th type emmet and click on it.

last you can see this page

8th restart sublime text 3 again.

Now you can enjoy your code. Type html:5 and ctrl + e !!!

Friday, December 15, 2017

Tanda Router configurations and WiFi configuration laptop and how to change admin password if you have not member

One Broadband internet that will run on one pc with router data cable and one laptop with wifi.
So you can follow this instruction
Open your Laptop
hardware: connect the broadband line to your laptop directly
click right on wifi icon and go to open network and sharing center

go to change adapter setting

click on ethernet property or local area connection properly

double click on internet protocol version 4 and setup all internet provider address. Select Use the following IP and put all field and select use the DNS server address and put all file. You can get those setting from your internet provider when they have given 1st connection on your personal computer or laptop directly with landline.

I will prefer you will want always setup connection directly on pc, not laptop. After their setup, you can collect that information

Collect mac address. Open cmd and type ipconfig/all from your PC
you can see ethernet adapter physical address so copy this address and collect

click on configure

then enter mac address on this value. Remember this mac address will be your pc mac address

try to connect if not connect then collect username and password to your internet provider.

click on setup new connection

and put your username and password

now the internet will be connected to a laptop with direct line.

Now Wifi Configuration: 
reset the router manually from router reset button 

After rest router tanda will create a user and back part of the router there is a pin number that is the password of your wifi but not working 

login with tanda with username admin and password admin also
and do 

click on advance and go to MAC Clone and add your pc mac address that is your pc mac address, change your admin password.

Laptop will be connected to a wifi connection

connect internet provider line to the router and now pc will run from the direct router with data cable and laptop will be connected to wifi. 

Thank You. 

Sunday, December 10, 2017

JavaScript Intro

What is javascript?

  • Javascript is lightweight, cross-platform, object-oriented computer programming language 
  • Javascript is one of three core technologies  of web development
  • Client-side: javascript was traditionally only used in browser 
  • Server-side: we can use javascript on the server as well with node.js 
jquery is a library of javascript or framework angular js and react 

console.log: It is a common object/method provided by debuggers (including the Chrome debugger and Firebug) that allow a script to log data (or objects in most cases) to the JavaScript console

PRIMITIVE Javascript Datatype:
Primitive this is not an object. simple datatype

  1. Number: Floating point number, for decimals and integer 
  2. String: Sequence of characters, used for text
  3. Boolean:  logical data type that can only be true and false 
  4. Undefine: Date type of variable which does not have a value yet
  5. Null: Also means 'non-existent'
Javascript has dynamic typing 

Friday, October 27, 2017

how to change laravel login and registration view

1st go to web.php you can see auth routing . Here  route is method and this is special routing
where define this routes?

You can see a class Router. On this class routes method is available 
You can see a Auth function 

we know that there are 3 rules of routing:
1) url, 
2) URL::to
3) route

on this function you can see how define URL with route  

SO for login page 

showLoginForm function is working.  
But after checking loginController we can't see showLoginForm fucntion. 

You can see AuthenticatesUsers this is not a method and this not a function this is a trait 
see on this AuthenticatesUsers we can see this function. 

Now you can  understand where is view file go to recourse> auth> login.blade.php 

How to connect mysql database with laravel

1st to go phpmyadmin
2nd create a database. and go to .evn file, find DB_CONNECTION=mysql line and add database name that you have created on phpmyadmin
3rd user will be root for homeserver

password will be blank like 

connection is completed.

How i will create a table on laravel database:
go to database >migration 

you can see 2 files 

enter on those file and on those file you can see 3 classes . 1st one is Schema

when we create table we will must use Schema file that's the process on laravel 

there are 2 functions one is up and another is down. with up class table is created and with down function table is dropped 

Which function define with type of table column : go to

you can see Available Column Types table 

How to run Schema file  extrude on server  :
open terminal and write php artisan migrate 

but we can catch an error and exception. 
this cause from 5.3 laravel 
when you will make any column unique or index then the total column size must be between 767 bytes 

now you will not get any error and exception. 

Thank You.

Auth class installation

1st check where will be add new file after install auth class
controller,  resource> views and routes > web.php 

open terminal:

php artisan make:auth
 make sure

3 new file change after installing auth class: 
controller: homeController.php
view: home.blade.php, layout and auth
routes: web.php

Route::get('/home', 'HomeController@index')->name('home');

In project we will get access now public/login and public/register url