Pour utiliser Sharebutton vous devez vous connecter à l'interface administrateur du framework WebSite-PHP.
Une fois connecté vous devrez aller dans le menu configuration -> Configurer modules et activer le module Sharebutton.
Tutoriel 1 :
Facebook like share button
Fichier: /pages/tutorials/sharebutton/sharebutton-01.php
<?php
class Sharebutton01 extends Page {
public function InitializeComponent() {
parent::$PAGE_TITLE = "Facebook like share button";
$this->render = new FacebookLikeButton(
FacebookLikeButton::BUTTON_COUNT,
$this->getBaseURL());
// Enable third party cookies filter
$this->enableThirdPartyCookiesFilter();
}
}
?>
Tutoriel 2 :
Google like share button
Fichier: /pages/tutorials/sharebutton/sharebutton-02.php
<?php
class Sharebutton02 extends Page {
public function InitializeComponent() {
parent::$PAGE_TITLE = "Google like share button";
$this->render = new GoogleLikeButton(
GoogleLikeButton::BUTTON_STANDARD, true,
$this->getBaseURL());
// Enable third party cookies filter
$this->enableThirdPartyCookiesFilter();
}
}
?>
Tutoriel 3 :
Twitter like share button
Fichier: /pages/tutorials/sharebutton/sharebutton-03.php
<?php
class Sharebutton03 extends Page {
public function InitializeComponent() {
parent::$PAGE_TITLE = "Twitter like share button";
$this->render = new TwitterLikeButton(
$this->getBaseURL(),
TwitterLikeButton::BUTTON_HORIZONTAL_COUNT);
// Enable third party cookies filter
$this->enableThirdPartyCookiesFilter();
}
}
?>
Tutoriel 4 :
Add this share button
Fichier: /pages/tutorials/sharebutton/sharebutton-04.php
<?php
class Sharebutton04 extends Page {
public function InitializeComponent() {
parent::$PAGE_TITLE = "Add this share button";
$this->render = new ShareButton();
// Enable third party cookies filter
$this->enableThirdPartyCookiesFilter();
}
}
?>