Download the PHP package sqweb/symfony_bundle without Composer

On this page you can find all versions of the php package sqweb/symfony_bundle. 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 symfony_bundle

SQweb Symfony Package

Build Status

This package allows you to easily integrate SQweb on your Symfony powered website.

Requirements

This SDK has been tested with PHP 5.5 and greater.

We are unable to provide official support for earlier versions. For more information about end of life PHP branches, see this page.

Install

This package is intended for websites powered by Symfony.

If you're using WordPress, we've made it easy for you. Download the SQweb plugin directly from WordPress.org, or check out the source here.

Using Symfony 3.x

  1. In your project root, execute composer require mltpss/symfony-bundle. Now, go to app/AppKernel.php and add this line to your bundles array:

  2. Add in your app/config/config.yml after # Twig configuration

  3. And at the end of your config.yml add :

Don't forget to set your id_site, sitename and lang accordingly.

For additional settings, see "Options" below.

Using Symfony 4.x

  1. Be sure you are using the twig bundle, if not, execute the following command in your project root: composer require twig

  2. Now go to packages/twig.yaml and copy paste the following piece of code. Be sure to use your real id_site on this line: id_site: 00000 and replace "website_name" with your actual website name.

    Don't forget to set your id_site, sitename and lang accordingly.

    For additional settings, see "Options" below.

  3. In your project root, execute composer require mltpss/symfony-bundle.

Usage

1. Tagging your pages

This function outputs the SQweb JavaScript tag. Insert it before the closing </body> tag in your HTML.

If you previously had a SQweb JavaScript tag, make sure to remove it to avoid any conflicts.

2. Checking the credits of your subscribers

This variable is true if the user subscribe to multipass and false if not, so that you can disable ads and/or unlock premium content.

Use it like this:

3. a) Showing the Multipass button

Finally, use this code to display the Multipass button on your pages:

We have differents size for the button here is how to use them e.g:

Example Buttons

3. b) Customizing the Multipass button

If you want to customize our different type of button, edit the following in your config.yaml file.

For instance:

Will display Hello world instead of Premium with Multipass on the regular button for logged out visitors.

Button Model Logged in Logged out
Tiny connected_tiny login_tiny
Regular connected login
Large - before black dot N / A btn_unlimited
Large - after black dot N / A btn_noads
Large connected connected_s N / A

4. More functions

Display a support div for your users

php {{sqweb.supportBlock|raw}}

Will display the block. We recommand you to use it in combination with our other limiting fuctions, like this:

Display only a part of your content to non premium users

Example:

Will display for free users:

Display your content later for non paying users

Example:

Limit the number of articles free users can read per day

For instance, if I want to display only 5 articles to free users:

Options

Unless otherwise noted, these options default to false. You can set them in your configuration file eg: config.yml.

Option Description
id_site Sets your website SQweb ID. Ex: 123456.
sitename The name that will appear on the large version of our button. You must set this variable.
debug Output various messages to the browser console while the plugin executes.
dwide Set to false to only enable SQweb on the current domain. Defaults to true.
lang You may pick between en_US, and fr_FR.
autologin Automatically login Multipass users on your website.

Contributing

We welcome contributions and improvements.

Coding Style

All PHP code must conform to the PSR2 Standard.

Bugs and Security Vulnerabilities

If you encounter any bug or unexpected behavior, you can either report it on Github using the bug tracker, or via email at [email protected]. We will be in touch as soon as possible.

If you discover a security vulnerability within SQweb or this plugin, please e-mail [email protected]. Vulnerabilities will be promptly addressed.

License

Copyright (C) 2016 – SQweb

This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.


All versions of symfony_bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
twig/twig Version ^2.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 sqweb/symfony_bundle contains the following files

Loading the files please wait ....