Download the PHP package setkyar/laravel-customize-shares without Composer

On this page you can find all versions of the php package setkyar/laravel-customize-shares. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-customize-shares

Customize your Laravel social sharing icons & designs.

Customize your social sharing icons easily. By Default, Package already include Facebook, Google+, LinkedIn, Twitter. But you can add more easily.

Install

Pull package through Composer. Run

composer require setkyar/laravel-customize-shares

Add service provider within config/app.php

'providers' => [
   SetKyar\CustomShares\CustomSharesProvider::class,
];

Run the following command for configuration

php artisan vendor:publish --provider="SetKyar\CustomShares\CustomSharesProvider" --tag="config"

Run the following command for views

php artisan vendor:publish --provider="SetKyar\CustomShares\CustomSharesProvider" --tag="views"

Usage

To customize your social icons add image with img tag. Customize like the following in config/shares-config.php

'facebook'  => '<img src="your_custom_fb_icon_url" alt="Share to Faebook">'

or add social icon class like the following

'facebook'  => '<i class="fa fa-facebook-official"></i>'

You can add one by one social share and can use collection as well.

One by one example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    @include('share::facebook')
    <br>
    @include('share::twitter')
    <br>
    @include('share::gplus')
    <br>
    @include('share::linkedin')
</body>
</html>

Collection example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    @include('share::social_collection')
</body>
</html>

Add new social

By default, Package already include Facebook, Google+, LinkedIn, Twitter. If you want to add more social media, add new on resources/views/vendor/customize-share . You can learn easily by checking other social media. If you want to add default value on config, you can add on config/shares-config.php

Popup (Small new window)

By default, if user click on share. The share link will open in new full window. But if you want to made small new window like the following image

You have to add the following JavaScript code

<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<script>

    var popupSize = {
        width: 780,
        height: 550
    };

    $(document).on('click', '.your-class > a', function(e){

        var
            verticalPos = Math.floor(($(window).width() - popupSize.width) / 2),
            horisontalPos = Math.floor(($(window).height() - popupSize.height) / 2);

        var popup = window.open($(this).prop('href'), 'social',
            'width='+popupSize.width+',height='+popupSize.height+
            ',left='+verticalPos+',top='+horisontalPos+
            ',location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1');

        if (popup) {
            popup.focus();
            e.preventDefault();
        }

    });
</script>

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Security

If you discover any security related issues, please email [email protected] com instead of using the issue tracker.

Credits


All versions of laravel-customize-shares with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package setkyar/laravel-customize-shares contains the following files

Loading the files please wait ....