/** * @param $listingSID * @return mixed * @throws Exception */ public function postListing($listingSID) { $listing = SJB_ListingManager::getObjectBySID($listingSID); if (!$listing instanceof SJB_Listing) { $params = array($listingSID); $message = 'Listing #$param_0 does not exist in system'; throw new SJB_FeedException($message, $params); } $listingInfo = SJB_ListingManager::createTemplateStructureForListing($listing); $listingUrl = SJB_ListingManager::getListingUrlBySID($listingSID); $link = " {$listingUrl} {$this->feedInfo['hash_tags']}"; $userInfo = SJB_Array::get($listingInfo, 'user'); $this->tp->assign('post_template', $this->feedInfo['post_template']); $this->tp->assign('listing', $listingInfo); $this->tp->assign('user', $userInfo); $text = $this->tp->fetch($this->template); $picture = $userInfo['Logo']['file_url'] == null ? SJB_System::getSystemSettings('SITE_URL') . '/' . SJB_TemplatePathManager::getAbsoluteImagePath(SJB_TemplateSupplier::getUserCurrentTheme(), 'main', 'logo.png') : $userInfo['Logo']['file_url']; return $this->postToWall($listingSID, $text . $link, $listingUrl, $picture); }
/** * Returns image URI of specified module * * @param string $image_name Image name * @return string Image URI */ function getModuleImageURI($image_name) { return SJB_System::getSystemSettings('SITE_URL') . "/" . SJB_TemplatePathManager::getAbsoluteImagePath(self::$theme, $this->module_name, $image_name); }