1. 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

Discussion in 'Resource and Add-on Requests' started by Sheldon, Jun 27, 2012.

  1. Sheldon

    Sheldon 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 
            if (!
    $addon $this->getModelFromCache('XenForo_Model_AddOn')->getAddOnById('XenQuotation') || empty($addon['active']))
    $quoteModel $this->getModelFromCache('XenQuotation_Model_Quote');
    $fetchOptions $quoteModel->getPermissionBasedQuoteFetchOptions();
    $quote $quoteModel->getRandomQuotation($fetchOptions);
            if (
    // 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";
    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.
    Yorick likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    I think I've fixed the XML file, but I haven't tested it.

    Attached Files:

    Sheldon likes this.
  3. Sheldon

    Sheldon Well-Known Member

    Works perfectly.


    You are awesome. What do I owe ya?
    Yorick likes this.
  4. Chris D

    Chris D XenForo Developer Staff Member

  5. Chris D

    Chris D XenForo Developer Staff Member

    Thank you, Stewart.
    Sheldon likes this.

Share This Page