Stack of codes.
Please comment below your opinion. We will try to improve and bring more accurate contents for you.

Tuesday, 2 October 2018

How to Use Sassy Social Share

How to use Sassy Social Share Shortcode?

Shortcode::

You can use [Sassy_Social_Share] Shortcode in the content of required 
page/post where you want to display Social Sharing interface.

Example:
[Sassy_Social_Share]

You can use following attributes in the Shortcode

Style:
Use style attribute to style the rendered Social Sharing interface

Example:
[Sassy_Social_Share style="background-color:#000;"]

Type::
Use type attribute to specify the type (“standard” or “floating”) of Social Sharing interface. Defaults (if not specified) to standard

Example::
[Sassy_Social_Share type="floating"]


Title (Works with “standard” type interface only):
Use Title attribute to specify title above Social Sharing interface.

Example
[Sassy_Social_Share title="Sharing is Caring"]


Count::
Use count attribute to enable the share counts on Social Sharing interface.
1 is to tell plugin to enable count. It is not the number of shares.

Example::
[Sassy_Social_Share count="1"]


total_shares::
Set total_shares attribute value to ON to enable total shares. Defaults (if not specified) to OFF

Example::
[Sassy_Social_Share total_shares="ON"]


Align (Works with “floating” type interface only):
Use align attribute to specify alignment (left or right) of Social Sharing interface. Defaults (if not specified) to left

Example
[Sassy_Social_Share type="floating"]
(Will align to left, as align is not specified)

[Sassy_Social_Share type="floating" align="right"]
(Will align to right)


Left (Works with “floating” type interface only)::
Use left attribute to specify the left offset (distance form the left side of the screen) of Social Sharing interface. Defaults (if not specified) to 0

Example::
[Sassy_Social_Share type="floating" left="500"]


Right (Works with “floating” type interface only, “align” attribute must be set to “right”)::
Use right attribute to specify the right offset (distance form the right side of the screen) of Social Sharing interface. Defaults (if not specified) to 0

Example::
[Sassy_Social_Share type="floating" align="right" right="500"]


Top (Works with “floating” type interface only)::
Use top attribute to specify the top offset (distance form the top of the screen) of Social Sharing interface. Defaults (if not specified) to 100

Example::
[Sassy_Social_Share type="floating" top="200"]


Url::
Use Url attribute to specify the url to be shared. Defaults (if not specified) to the webpage where shortcode is placed

Example:
[Sassy_Social_Share type="floating" url="http://website.com/example.php"]


# You can use shortcode in PHP file as following
<?php echo do_shortcode(‘SHORTCODE’) ?>
Replace SHORTCODE in above code with the required shortcode like
[Sassy_Social_Share style=”background-color:#000;”],
so the final code looks like following
<?php echo do_shortcode('[Sassy_Social_Share style="background-color:#000;"]') ?>


 

#Widget

You can navigate to the Appearance > Widgets section in the left sidebar and enable Sassy Social Share – Standard Widget and Sassy Social Share – Floating Widget widgets in the required area


source:
http://support.heateor.com/sassy-social-share-shortcode-and-widget/


Friday, 21 September 2018

How to Update the Current Browser URL

How to Update the Current Browser URL

# UPDATE THE CURRENT URL IN BROWSER::

<script>

ChangeUrl = function(page, url) {

    if (typeof (history.pushState) != "undefined") {

        var obj = { Page: page, Url: url };

        history.pushState(obj, obj.Page, obj.Url);

        $('.breadcrumb-get-a-pro').attr('href', url);

    } else {

        alert("Browser does not support HTML5.");

    }

}

</script>

Sunday, 16 September 2018

SQL update from one Table to another based on a ID match


SQL update from one Table to another based on a ID match


SQL update from one Table to another based on a ID match

MS SQL

UPDATE
 Sales_Import
SET
 Sales_Import.AccountNumber = RAN.AccountNumber
FROM
 Sales_Import SI
INNER JOIN
 RetrieveAccountNumber RAN
ON
 SI.LeadID = RAN.LeadID;
MySQL and MariaDB

UPDATE
 Sales_Import SI,
 RetrieveAccountNumber RAN
SET
 SI.AccountNumber = RAN.AccountNumber
WHERE
 SI.LeadID = RAN.LeadID;



http://www.stackofcodes.in/2017/12/05/sql-update-one-table-another-based-id-match/

Wednesday, 5 September 2018

Disable ONLY_FULL_GROUP_BY

Disable ONLY_FULL_GROUP_BY

Disable ONLY_FULL_GROUP_BY



Solution 1: Remove ONLY_FULL_GROUP_BY from mysql console
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));

Solution 2: Remove ONLY_FULL_GROUP_BY from phpmyadmin
– Open phpmyadmin & select localhost
– Click on menu Variables & scroll down for sql mode
– Click on edit button to change the values & remove ONLY_FULL_GROUP_BY & click on save







To keep your current mysql settings and
disable ONLY_FULL_GROUP_BY
I suggest to visit your phpmyadmin or whatever client you are using and type:
SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')  copy_me

next copy result to your my.ini file.
For mint:
sudo nano /etc/mysql/my.cnf
For ubuntu 16 and up:
sudo nano /etc/mysql/my.cnf
For ubuntu 14-16:
/etc/mysql/mysql.conf.d/mysqld.cnf


Source:
https://www.stackofcodes.in/2018/09/04/disable-only_full_group_by/


Stack Of Codes, stackofcodes, Stack your codes here, Open your coding for all, Php coding, Codeigniter, blogger, Stack of codes Developers, Php Framework, stackofcodes.in, best coding site, Stack the codes, place the code in stack, Stack of codes is the largest, most trusted online community for developers to learn and share their programming knowledge and build their carrers.