Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Conflict between Preview post and Random Quotes?

edited March 2007 in Vanilla 1.0 Help
Hi, Here's what I get after I installed Random Quotes and Preview Post add-ons: Warning: fopen(extensions/RandomQuotesPanel/quotes.txt) [function.fopen]: failed to open stream: No such file or directory in /home/xxxx/public_html/extensions/RandomQuotesPanel/default.php on line 26 Fatal error: Call to a member function on a non-object in /home/xxxxx/public_html/extensions/RandomQuotesPanel/default.php on line 26 I'd appreciate if someone can tell me what's wrong, tahnaks.


  • Options
    It's because Random Quotes uses relative paths, which makes it break when used together with the Preview extension.

    In RandomQuotesHeader/default.php $quotesPath = 'extensions/RandomQuotesHeader';should be $quotesPath = $GLOBALS['Configuration']['EXTENSIONS_PATH'].'RandomQuotesHeader';
    And in RandomQuotesPanel/default.php $quotesPath = 'extensions/RandomQuotesPanel'; should be $quotesPath = $GLOBALS['Configuration']['EXTENSIONS_PATH'].'RandomQuotesPanel';
  • Options
    edited March 2007
    bjrn, Tack så mycket!, Works fine now. One more question out of subject, how to control the number of quotes characters to show, it seems to cut off "."
  • Options
    Oh. I needed to update it anyway, thanks for pointing this out :)
  • Options
    As far as I can tell it should just read all lines from your quotes.txt file, and pick one line at random and display it. But then again, I've just skimmed it, and I bet Ø can help better than I can. :)

    The only reason I thought of the relative paths problem is because Transmogrifier had the same issue.
  • Options
    Ah yes, for some reason the last character just vanishes. But you can easily fix that by adding a blank space after the end of your quote. I'll try to have a look at this when I'll get a little more time.
This discussion has been closed.