PSR-2. I'm not a huge fan, but ugly consistency beats no consistency...
This commit is contained in:
@ -7,9 +7,10 @@
|
||||
* Further modified by Shish to remove the 7MB local QR generator
|
||||
* and replace it with a link to google chart APIs
|
||||
*/
|
||||
class QRImage extends Extension {
|
||||
public function onDisplayingImage(DisplayingImageEvent $event) {
|
||||
$this->theme->links_block(make_http(make_link('image/'.$event->image->id.'.jpg')));
|
||||
}
|
||||
class QRImage extends Extension
|
||||
{
|
||||
public function onDisplayingImage(DisplayingImageEvent $event)
|
||||
{
|
||||
$this->theme->links_block(make_http(make_link('image/'.$event->image->id.'.jpg')));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,15 @@
|
||||
<?php
|
||||
class QRImageTheme extends Themelet {
|
||||
public function links_block(string $link) {
|
||||
global $page;
|
||||
class QRImageTheme extends Themelet
|
||||
{
|
||||
public function links_block(string $link)
|
||||
{
|
||||
global $page;
|
||||
|
||||
$page->add_block( new Block(
|
||||
"QR Code","<img alt='QR Code' src='//chart.apis.google.com/chart?chs=150x150&cht=qr&chl={$link}' />","left",50));
|
||||
}
|
||||
$page->add_block(new Block(
|
||||
"QR Code",
|
||||
"<img alt='QR Code' src='//chart.apis.google.com/chart?chs=150x150&cht=qr&chl={$link}' />",
|
||||
"left",
|
||||
50
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user