/** * Called after arguments have been parsed, parameters are set and validated. * * Returns the output as raw HTML. * * @return string Raw HTMl */ public function getOutput() { $output = "<div id=\"disqus_thread\" class=\"{$this->getCSSClasses()}\" style=\""; if ($this->width->hasBeenSet()) { $output .= "width:{$this->width->getOutput()}px;"; } if ($this->height->hasBeenSet()) { $output .= "height:{$this->height->getOutput()}px;"; } $output .= "\"></div>"; $output .= "\n<script type=\"text/javascript\">"; $output .= "\nvar disqus_shortname='{$this->shortname->getOutput()}';"; if ($this->id->hasBeenSet()) { $output .= "\nvar disqus_identifier='{$this->id->getOutput()}';"; } $output .= "\nvar disqus_title='{$this->title->getOutput()}';"; $output .= "\nvar disqus_url='{$this->url->getOutput()}';"; if ($this->dev->hasBeenSet()) { $output .= "\nvar disqus_developer=1;"; } $output .= "\n(function() {\r\nvar dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;\r\ndsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';\r\n(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);\r\n})()"; $output .= "</script>"; $output .= "<noscript>Please enable JavaScript to view the <a href=\"http://disqus.com/?ref_noscript\">comments powered by Disqus.</a></noscript>"; // $output .= "<a href=\"http://disqus.com\" class=\"dsq-brlink\">comments powered by <span class=\"logo-disqus\">Disqus</span></a>"; return $output; }
/** * Called after arguments have been parsed, parameters are set and validated. * * Returns the output as raw HTML. * * @return string raw HTML */ public function getOutput() { $output = "<a class=\"FlattrButton\" style=\"display:none;\" href=\"{$this->url->getOutput()}\" title=\"{$this->title->getOutput()}\""; if ($this->uid->hasBeenSet()) { $output .= " data-flattr-uid=\"{$this->uid->getOutput()}\""; } if ($this->category->hasBeenSet()) { $output .= " data-flattr-category=\"{$this->category->getOutput()}\""; } if ($this->language->hasBeenSet()) { $output .= " data-flattr-language=\"{$this->language->getOutput()}\""; } if ($this->tags->hasBeenSet()) { $output .= " data-flattr-tags=\"{$this->tags->getOutput()}\""; } if ($this->compact->hasBeenSet()) { $output .= " data-flattr-button=\"compact\""; } if ($this->nopopout->hasBeenSet()) { $output .= " data-flattr-popout=\"0\""; } if ($this->hidden->hasBeenSet()) { $output .= " data-flattr-hidden=\"1\""; } $output .= ">"; $output .= $this->description->getOutput(); $output .= "</a>"; $output .= "<script type=\"text/javascript\" src=\"http://api.flattr.com/js/0.6/load.js?mode=auto\"></script>"; if ($this->left->hasBeenSet() || $this->right->hasBeenSet()) { $output = "<div class=\"{$this->getCSSClasses()}\">{$output}</div>"; } return $output; }