Hola,
Gracias
coso, yo también veo muy elegante el código:
Código PHP:
<?php
// lightbox.class.php
function lightbox($pluginData){
return new LightBox($pluginData);
}
class LightBox extends GbPlugin
{
public function OnActivatePlugin(){}
public function OnDeactivatePlugin(){}
public function PrinterCallback($printerName){
if($printerName == GBPLUGINS_PRINTER_THEME_HEADER){
JScript::SetVariables(array(
'gblbTextOf' => $this->_rp('of'),
'gblbTextImage' => $this->_rp('Image'),
'gblbTextClose' => $this->_rp('Close [X]'),
'gblbTextHelpClose' => $this->_rp('Click to close'),
'gblbTextHelpInteract' => $this->_rp('Hove to interact'),
'gblbTextCloseInfo' => $this->_rp('Click outside image to close')
));
$jsDir = $this->GetDirJScriptsUrl();
$this->IncludeJScriptsInTheme(array(
$jsDir.'jquery.js',
$jsDir.'jquery.lightbox.js',
$jsDir.'lightbox.config.js'
));
}
return true;
}
}
?>
Código:
// lightbox.config.js
// DOM ready!
$(function(){
// Vars defined at "lightbox.class.php"
$.Lightbox.construct({
'text':{
'about':{
'link': '',
'text': '',
'title': ''
},
'of': gblbTextOf,
'image': gblbTextImage,
'close': gblbTextClose,
'closeInfo': gblbTextCloseInfo,
'help':{
'close': gblbTextHelpClose,
'interact': gblbTextHelpInteract
}
}
});
});