


<?php
/*
Social Bookmarking snippet, v. 0.2
... author + parameter info ...
*/
#### determine page to be shared
$pgID = isset($pgID) ? $pgID : $modx->documentObject['id'];
$pgObj = $modx->getDocument($pgID, 'longtitle,introtext,privateweb');
if ($pgObj['privateweb']) { // page is not publicly accessible
// there is no point to render anything
return '';
}
## else -> public page; do what is required...
// include the main class file, create object
include_once($modx->config['base_path'] . 'assets/snippets/social/class.php');
$Social_links = new SocialBookmarks;
// settings, just set
$Social_links->ImagePath = '/assets/snippets/social/images/'; // path to images, trailing slash
$Social_links->SiteName = $modx->config['site_name']; // site name from config, replace it with a string if you want
// $Social_links->FeedLink = '/rss.xml'; // path to RSS feed, defaults to /rss.xml
// $Social_links->DEBUG = TRUE; // Debug=True puts a bold heading before each icon; defaults to FALSE
// $Social_links->ExcerptSize = 250; // excerpt size; default is 250 characters
// settings; pick up page info by default, or use parameters...
$Social_links->PageTitle = isset($pgTitle) ? $pgTitle : $pgObj['longtitle']; // long title used for the description
$Social_links->PageExcerpt = isset($pgExcerpt) ? $pgExcerpt : $pgObj['introtext']; // page excerpt, used for summary on some services (linkedin for e.g.)
$Social_links->PageLink = $modx->makeUrl($pgID, '', '', 'full');
if (isset($TagLine)) {
// text that goes above icons; defaults to 'Share'
$Social_links->TagLine = $TagLine;
}
// set up which services get shown, and the order
// use method $Social_links->ShowServices(); to create the default array, then edit it
$Services = array(
'BarraPunto',
// ...
// ...
// ...
'Diggita',
);
return $Social_links->render($Services);
?>
this post is my small contribution to development of this nice toolthanks for sharing!

if(isset($TagLine)) $Social_links->TagLine=$TagLine; // Text that goes above icons. Defaults to 'Share'
if(isset($TagLine)) {
// Text that goes above icons. Defaults to 'Share'
$Social_links->TagLine=$TagLine;
}if(isset($TagLine)) // Text that goes above icons. Defaults to 'Share' $Social_links->TagLine=$TagLine;

if ($var == 'yes') { $output = 'ABC'; } else { $output = '123'; }