Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Conflict between Preview post and Random Quotes?

sjeepssjeeps New
edited March 2007 in Questions
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.

Comments

  • 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';
  • sjeepssjeeps New
    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 "."
  • Oh. I needed to update it anyway, thanks for pointing this out :)
  • 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.
  • 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.