[Widget 2.x] Display Random Banners, Quotations, FAQs, Logos, Sub-headers & More

[Widget 2.x] Display Random Banners, Quotations, FAQs, Logos, Sub-headers & More

Neutral Singh

Well-known member
Neutral Singh submitted a new resource:

[Widget] Display Random Quotes / Quotations / FAQs - Display quotations or frequently asked questions at any widgets location or anywhere!

Display favorite quotations or frequently asked questions anywhere in the forum!

Widgets > Add Widgets > HTML Widget

- Widget definition: HTML

- Widget key: quotes

- Title: Quotations or Frequently Asked Questions

- Display in positions: Choose one or more locations

- Display condition: Optional

- Template:

Code:
<font size=2; color="darkviolet";>
    <xf:comment>Random Quotes/Quotations</xf:comment>
    <xf:set var="$quote.1">Your Quote Goes Here...

Read more about this resource...
 
Hey. Thank you for this addon. When I follow the exact steps, I get this -

Oops! We ran into some problems.
Line 13: Syntax error - Template name: public:_widget_quotes

Not sure why :/ Hope you can help. Thanks
 
Change the last line to: {$quote.{{ rand(1,10)|raw}}}.

Change the 10 to match the number of quotes.

HTML:
<font size=2; color="darkviolet";>
    <xf:comment>Random Quotations, Tips, FAQs, Logos, Sub-headers and Everything Else!</xf:comment>
    <xf:set var="$quote.1">Your Quote Goes Here! 1</xf:set>
    <xf:set var="$quote.2">Your Quote Goes Here! 2</xf:set>
    <xf:set var="$quote.3">Your Quote Goes Here! 3</xf:set>
    <xf:set var="$quote.4">Your Quote Goes Here! 4</xf:set>
    <xf:set var="$quote.5">Your Quote Goes Here! 5</xf:set>
    <xf:set var="$quote.6">Your Quote Goes Here! 6</xf:set>
    <xf:set var="$quote.7">Your Quote Goes Here! 7</xf:set>
    <xf:set var="$quote.8">Your Quote Goes Here! 8</xf:set>
    <xf:set var="$quote.9">Your Quote Goes Here! 9</xf:set>
    <xf:set var="$quote.10">Your Quote Goes Here! 10</xf:set>
    {$quote.{{ rand(1,10)|raw}}}
</font>
 
Back
Top Bottom