Like Button
Popis
Přidá na stránku oblíbený LikeButton s možností ShareButtonu.
| Verze | 2.0 |
|---|---|
| Download | https://github.com/f3l1x/nette/ |
| Git | https://github.com/…er/FbToolsNS |
| Forum thread | http://forum.nette.org/…icek-pluginu |
| Autor | Milan Felix Sulc |
| Licence | WTFPL |
(default)
(with faces)
(button)
(box)
Přehled
| Proměná | Default |
| url | http://www.example.com |
| send | true |
| layout | standart |
| width | 300 |
| scheme | light |
| font | arial |
| display | like |
| faces | false |
| html5 | true |
Příklad použití
DI
factories:
FbToolsScript:
class: \FbTools\Script
FbToolsLikeButton:
class: \FbTools\LikeButton
setup:
- setContext(...)
- setUrl('http://www.mojestranka.cz')
- setWidth(150)
.. or ..
- setAll([
url: 'http://www.mojestranka.cz',
font: 'netusim',
send: false,
])
Presenter
protected function createComponentLikeButton()
{
$fb = $this->context->createFbToolsLikeButton();
$fb->setUrl('http://www.g00gl.c0m');
return $fb;
}
Šablona
{control likeButton, url => "http://www.anypage.com", send => false}
Vykreslovani
- {control fbLikeButton}
defaultní zobrazení ![]()
- {control fbLikeButton:box}
zobrazení box_count 
- {control fbLikeButton:button}
zobrazení button_count ![]()
- {control fbLikeButton:faces}
zobrazení faces = true 
{control likeButton, url=>„http://example.com“, width=>99, height=>100, type=>1, font=>tahoma}
Historie
2.0
- Nette 2.0 a PHP 5.3
1.1
- fluent interface
Komentáře 
talpa | 19. 10. 2011, 2:36 | comment
kam chcete vlozit opravenou verzi pro namespaces 5.3 ? Talpa

iguana007 | 14. 6. 2011, 7:41 | comment
Kdyby někdo řešil locales, tak tady je seznam (xml): http://www.facebook.com/…kLocales.xml
Potom stačí jen přidat setter, getter a doplnit metodu parseParams. Pak už můžete v presenteru při tvorbě komponenty volat něco jako: