Sharing on social networks
You can choose which pages are shared, on which networks and how share buttons are displayed and where. The implementation is careful to add just what is needed to a page like the tags in the <head> section of the document which are read by search engines and the code in JavaScript required to interface the server.
Configuration
The type of buttons and the position of the bar for sharing a page on social networks are configured by the parameters $socializing and $socializingmode of the file config.inc.
$socializing='inline'; // false, 'inline', 'bar', 'either', 'both'
$socializingmode='lite'; // 'lite', 'awesome'
If $socializing is inline, the bar is displayed at the end of the content of the page.
If $socializing is bar, the bar floats to the left of the page of the site. If the display is too small, the bar is hidden.
If $socializing is either, the bar floats to the left of the page of the site. It's hidden as soon as the display is too small and replaced by the bar at the end of the content of the page.
If $socializing is both, the bar is always displayed at the end of the content of the page but it also floats to the left of the page if the display is large enough.
If $socializing is false, the bar is not displayed.
NOTE: iZend Bootstrap always shows share buttons in the page, i.e. inline, and $socializing can only be set to true or false.
If $socializingmode is lite or awesome, the bar displays buttons which call the interface of the service with a URL.
In this mode, no JavaScript code is loaded and run by the navigator.
The display is therefore faster but no counter is available.
If $socializingmode is lite, the code displays icons in the buttons.
If $socializingmode is awesome, the code uses a character font to draw the logos of the services.


To use another set of icons, replace the file social.png in the folder images/theme and edit the CSS for the tags #socialbar and #sharebar in theme.css.


IMPORTANT: When $socializingmode is set to awesome, make sure the CSS file of Font Awesome is loaded by the navigator by editing the view head.phtml:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v7.2.0/css/all.css" media="all" />
<?php endif; ?>
You can copy the CSS of Font Awesome in a folder font-awesome in the folder css at the root of the website and modify the URL in the tag <link> in head.phtml.
Editing
Check the boxes facebook twitter linkedin pinit whatsapp to share the node on Facebook, Twitter, LinkedIn, Pinterest or WhatsApp.
An option for a node is only enabled if the same option is checked for the thread.
NOTE: Options are the same for all languages.
DB
The database records the options for nodes in the table node.
`node_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` INT UNSIGNED NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`visits` tinyint(1) NOT NULL DEFAULT '1',
`nocomment` tinyint(1) NOT NULL DEFAULT '0',
`nomorecomment` tinyint(1) NOT NULL DEFAULT '0',
`novote` tinyint(1) NOT NULL DEFAULT '0',
`nomorevote` tinyint(1) NOT NULL DEFAULT '0',
`ilike` tinyint(1) NOT NULL DEFAULT '1',
`tweet` tinyint(1) NOT NULL DEFAULT '1',
`plusone` tinyint(1) NOT NULL DEFAULT '1',
`linkedin` tinyint(1) NOT NULL DEFAULT '1',
`pinit` tinyint(1) NOT NULL DEFAULT '0',
`whatsapp` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`node_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
The options for threads are in the table thread.
`thread_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` INT NOT NULL DEFAULT '1',
`thread_type` enum('thread','folder','story','book','rss','newsletter') NOT NULL DEFAULT 'thread',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
`number` INT UNSIGNED NOT NULL,
`visits` tinyint(1) NOT NULL DEFAULT '1',
`nosearch` tinyint UNSIGNED NOT NULL DEFAULT '0',
`nocloud` tinyint UNSIGNED NOT NULL DEFAULT '0',
`nocomment` tinyint UNSIGNED NOT NULL DEFAULT '1',
`nomorecomment` tinyint(1) NOT NULL DEFAULT '0',
`novote` tinyint(1) NOT NULL DEFAULT '0',
`nomorevote` tinyint(1) NOT NULL DEFAULT '0',
`ilike` tinyint(1) NOT NULL DEFAULT '1',
`tweet` tinyint(1) NOT NULL DEFAULT '1',
`plusone` tinyint(1) NOT NULL DEFAULT '1',
`linkedin` tinyint(1) NOT NULL DEFAULT '1',
`pinit` tinyint(1) NOT NULL DEFAULT '1',
`whatsapp` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`thread_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
Views
| ilike.phtml | |
| tweetit.phtml | |
| linkedin.phtml | |
| pinit | pinit.phtml | whatsapp.phtml |
Comments