OPiQuotations  v.03.00.00 — April 5, 2019
Namespaces | Variables
OPiQuotations-sharing.php File Reference

Return list of sharing buttons in a HTML format. More...

Go to the source code of this file.

Namespaces

 OPiCitations
 

Variables

 if (!isset( $_GET[ 'id']))
 
if(true) else
 
 $opiquotations = new OPiQuotations\OPiQuotations()
 
 $id = (int)$_GET['id']
 
 $quot = $opiquotations->quotation_by_id($id)
 
if($quot===null) $url = 'http://www.opimedia.be/OPiCitations/?id='.$id
 
 $twitter_max_length = 279
 
 $max_length = $twitter_max_length - 23 - 1
 
 $quot_short = $quot->to_text_twitter(null, null, $max_length)
 
 $quot_short_length = mb_strlen($quot_short) + 24
 
 $encoded_quot_short = rawurlencode($quot_short)
 
 $encoded_quot_all = rawurlencode($quot->to_text(true, 'fr', $url, true, array('Web')))
 
 $encoded_title
 
 $encoded_url = rawurlencode($url)
 

Detailed Description

Return list of sharing buttons in a HTML format.

(April 5, 2019)

Piece of OPiQuotations. https://bitbucket.org/OPiMedia/opiquotations

GPLv3 — Copyright (C) 2016, 2017, 2018, 2019 Olivier Pirson http://www.opimedia.be/

Definition in file OPiQuotations-sharing.php.

Variable Documentation

◆ $encoded_quot_all

$encoded_quot_all = rawurlencode($quot->to_text(true, 'fr', $url, true, array('Web')))

Definition at line 82 of file OPiQuotations-sharing.php.

◆ $encoded_quot_short

$encoded_quot_short = rawurlencode($quot_short)

Definition at line 80 of file OPiQuotations-sharing.php.

◆ $encoded_title

$encoded_title
Initial value:
= rawurlencode('OPiCitation n°'.$id
.(!$quot->is_maxim() && $quot->author()
? ' ('.$quot->author().')'
: ($quot->is_maxim() && $quot->nation()
? ' (nation '.$quot->nation().')'
: '')))

Definition at line 83 of file OPiQuotations-sharing.php.

◆ $encoded_url

$encoded_url = rawurlencode($url)

Definition at line 89 of file OPiQuotations-sharing.php.

◆ $id

$id = (int)$_GET['id']

◆ $max_length

$max_length = $twitter_max_length - 23 - 1

◆ $opiquotations

$opiquotations = new OPiQuotations\OPiQuotations()

Definition at line 64 of file OPiQuotations-sharing.php.

◆ $quot

$quot = $opiquotations->quotation_by_id($id)

◆ $quot_short

$quot_short = $quot->to_text_twitter(null, null, $max_length)

Definition at line 76 of file OPiQuotations-sharing.php.

◆ $quot_short_length

$quot_short_length = mb_strlen($quot_short) + 24

Definition at line 77 of file OPiQuotations-sharing.php.

◆ $twitter_max_length

$twitter_max_length = 279

Definition at line 74 of file OPiQuotations-sharing.php.

◆ $url

if ( $quot===null) $url = 'http://www.opimedia.be/OPiCitations/?id='.$id

Definition at line 72 of file OPiQuotations-sharing.php.

◆ else

if (true) else
Initial value:
{
#DEBUG_END
ini_set('display_errors', 'stderr')

Definition at line 38 of file OPiQuotations-sharing.php.

◆ if

if(!isset($_GET['id']))

Definition at line 18 of file OPiQuotations-sharing.php.