/** Create a list of social bookmarks from the database entered list * @return string $html * */ public function socialbookmarking() { $html = '<div id="bookmarks" class="removePrint"><p>Social Bookmarking: '; $social = new Bookmarks(); $books = $social->getValidBookmarks(); foreach ($books as $service) { $targetHref = str_replace('{title}', $this->view->title(), $service['url']); $targetHref = str_replace('{link}', $this->view->CurUrl(), $targetHref); $image = $service['image']; list($w, $h) = getimagesize($this->view->baseUrl() . 'images/social/' . $image); $serviceIcon = '<a class="social-img" href="' . $this->view->escape($targetHref) . '" title="Share this page on ' . $service['service'] . '"><img src="' . $this->view->baseUrl() . '/images/social/' . $image . '" alt="Favicon for ' . $service['service'] . '" width="' . $w . '" height="' . $h . '"/></a>'; $html .= $serviceIcon; } $html .= '</p></div>'; return $html; }