• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Other [PAID] XenPorta Block for use with XenQuotation


Well-known member
Original Add-on: http://xenforo.com/community/resources/xenquotation.180/

It comes with a XenPorta block, but when you attempt to install, you get the "Not a valid XML File" note.

Here is the code to the original:

<?xml version="1.0" encoding="utf-8"?>
  <module_template><![CDATA[<xen:include template="xenquote_sidebar_random_quote"><xen:map from="$XenQuotation" to="$quote" /><xen:set var="$title">{xen:phrase xenquote_random_quotation}</xen:set></xen:include>]]></module_template>
* EWRporta random quotation block module.
class EWRporta_Block_XenQuotation extends XenForo_Model
    public function getModule()
        if (!$addon = $this->getModelFromCache('XenForo_Model_AddOn')->getAddOnById('XenQuotation') || empty($addon['active']))
            return "killModule";
        $quoteModel = $this->getModelFromCache('XenQuotation_Model_Quote');
        $fetchOptions = $quoteModel->getPermissionBasedQuoteFetchOptions();
        $quote = $quoteModel->getRandomQuotation($fetchOptions);
        if ($quote)
            // add the random quote to the sidebar
            // no quotations to display, hide the module (makes it a pain
            // to debug though if you're expecting it to be there)
            return "killModule";
        return $quote;
I know someone here is much better at this than me, but I'd be willing to pay someone for a few minutes work.... I don't think it would take long, I just don't have a clue where to start. If anyone is interested, please feel free to PM me what you'd charge to do this.