allowMethod ('getUrl'); $this->allowMethod ('getDescription'); $this->allowMethod ('getNobr'); } function onAssignRecord () { $record = $this->getRecord (); $this->setUrl ($record->uri); $this->setWidth ($record->width); $this->setHeight ($record->height); $this->setNobr ($record->nobr != 0); $href = $record->screenshot_href->href; if (strlen ($href)) { $this->setHref ('http://www.template-help.com' . $href); } $screenshot_description = ORM::factory ('screenshotdescription', $record->screenshot_description_id); $this->setDescription ($screenshot_description->description); } function setHref ($href) { $this->href = $href; } function getHref () { $macro = $this->getMacrophage (); $macro->addMacro ('PAGE-NAME', $this->getVisibleName ()); return $macro->run ($this->href); } function setVisibleName ($description) { $this->description = $description; } function getVisibleName () { return $this->description; } function setDescription ($description) { $this->description = $description; } function getDescription () { return $this->description; } function setUrl ($url) { $this->url = $url; } function getUrl () { return $this->getBaseUrl () . $this->url; return Setting_Model::screenshotLocation () . $this->url; return $this->url; } function setWidth ($width) { $this->width = $width; } function getWidth () { return $this->width; } function setHeight ($height) { $this->height = $height; } function getHeight () { return $this->height; } function isHead () { return !(($this->getWidth () <= 467) && ($this->getWidth () != 0)); } function needIframe () { return substr ($this->url, -5) == '.html'; } function setNobr ($nobr) { $this->nobr = $nobr; } function getNobr () { return $this->nobr; } function setBaseUrl ($base_url) { $this->base_url = $base_url; } function getBaseUrl () { return $this->base_url; } }