Wizards Toolkit Documentation

Social.php

This contains Wizards Toolkit functions involving social media.

These functions have not been tested since 2013. Need to review and verify.

All rights reserved.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Tags
author
Programming Labs
license
All rights reserved
version
2.0

Table of Contents

wzSocialSmartLayer()  : null
Add the 'AddThis' SmartLayers to your website
wzHtmShowTwitter()  : string
Add a Twitter Feed to the website
wzSocialFollowUs()  : string
Add the 'AddThis' Follow Us to your website
wzHtmShowSocial()  : string
Add the 'AddThis' small footprint sharing links widget to your website

Functions

wzSocialSmartLayer()

Add the 'AddThis' SmartLayers to your website

wzSocialSmartLayer( string  $fncAddThisID , string  $fncFaceBookID , string  $fncTwitterID ) : null

Adds necessary Javascript to page just before

Parameters
$fncAddThisID : string

is the AddThis unique identifier you get when signing up with their service

$fncFaceBookID : string

the Facebook page link

$fncTwitterID : string

the Twitter account ID

Return values
null

nothing returned because automatically adds JS to page before head

wzHtmShowTwitter()

Add a Twitter Feed to the website

wzHtmShowTwitter (string  $fncTwitterAcct , string  $fncWidgetID [, int  $fncWidth = '' ] [, int  $fncHeight = '' ]) : string

Adds necessary Javascript to page just before

Parameters
$fncTwitterAcct : string

the Twitter account ID

$fncWidgetID : string

this has to be gotten from Twitter for this particular account

$fncWidth : int = ''

optional way to pass width

$fncHeight : int = ''

optional way to pass Height

Return values
string

the HTML that will contain the Twitter feed

wzSocialFollowUs()

Add the 'AddThis' Follow Us to your website

wzSocialFollowUs ( string  $fncAddThisID , string  $fncFaceBookID , string  $fncTwitterID ) : string

Most of time should instead use wzSocialSmartLayer above Adds necessary Javascript to page just before

Parameters
$fncAddThisID : string

is the AddThis unique identifier you get when signing up with their service

$fncFaceBookID : string

the Facebook page link

$fncTwitterID : string

the Twitter account ID

Return values
string

the HTML that will contain the "Follow Us" code

wzHtmShowSocial()

Add the 'AddThis' small footprint sharing links widget to your website

wzHtmShowSocial( string  $fncLocation) : string

Most of time should instead use wzSocialSmartLayer above instead Adds necessary Javascript to page just before

Displays Social Media bar (facebook, emailthis, del.icio.us, etc.) Specify 'top' and/or 'footer' (if you want it in both places) for $fncLocation variable.

Variables to add to the calling page for site specificity:

  1. Email subject and email body
  2. Facebook link

Add these images to the imgs/ folder off the root:

  1. delicious.gif
  2. emailthis.png
  3. googlesbm.png

Add these styles to the site's style sheet and adapt as needed:


.facebook_top { width: 215px; float: left; clear:both; font: 10px Verdana, Arial, Helvetica, sans-serif; margin: 10px 0 10px 0; text-align: left; }
.facebook_footer { font: 10px Verdana, Arial, Helvetica, sans-serif; margin: 10px 0 10px 0; text-align: left; display: inline;}

Example on how to call this function:

 $pgEmailSubject = wzHtmlEncode("My Wizards Toolkit Web Site");

 $pgEmailBody   = wzHtmlEncode('I built this in less time than you would guess. Take a look!');

 $pgFacebookURL = 'http://www.facebook.com/WizardsToolkit';

 wzSearchReplace("<!-- @Social@ -->", wzHtmShowSocial('top', $pgEmailSubject, $pgEmailBody, $pgFacebookURL));
Parameters
$fncLocation : string

'top' or 'footer' location

Return values
string

the HTML that will contain the widget code

Search results