DISQUS

Development on a shoestring: Verse of the Day WordPress Plugin

  • Nicole · 4 years ago
    I tried to install this on my blog but I keep getting this error:

    Warning: main(/home/kissmegr/public_html/blog/wp-includes/rss-functions.php): failed to open stream: No such file or directory in /home/kissmegr/public_html/blog/wp-content/plugins/wp-votd-plugin.php on line 19

    Fatal error: main(): Failed opening required '/home/kissmegr/public_html/blog/wp-includes/rss-functions.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/kissmegr/public_html/blog/wp-content/plugins/wp-votd-plugin.php on line 19

    Any suggestions?
  • Tony · 4 years ago
    Beautiful plugin! I'm a real big fan of the NLT, is there any chance of that version being made available?
  • Andy Thompson · 4 years ago
    Glenn, AWESOME job, as always. I'll be switching soon!

    Tony,

    I don't know that the NLT is available in an RSS feed yet. Bible Gateway only offers these versions:

    http://www.biblegateway.com/usage/linking/votdl...
  • Andy Thompson · 4 years ago
    You can delete my comment about how to add the NLT -- as I failed to check it before I posted. Corrected comment follows that one.

    I am teh loser.
  • Nicole · 4 years ago
    Hey Glenn! You are such a nice guy!! Thanks for clearing that up for me. I'm going to try to upgrade my WP in the next week or so. I was going to go ahead and try it out in WP 1.2 though but when I click on your zip file it says that it isn't found on the server. Just wanted to let you know. I guess I'll check back in later.
  • Glenn · 4 years ago
    Seems wp-plugins.org have changed the layout of the site a tad. Have changed the link, should work now.
  • Paul - SteelerDirtFreak · 4 years ago
    Thanks for this great plugin! I just installed it (and didn't break anything!) Very nice addition to the plugins collection.
  • Tony · 4 years ago
    Andy,

    Thanks for the info.
  • Andy Thompson · 4 years ago
    Welcome!

    I switched to Glenn's plug-in. This is so much sleeker than the very hacked up version of Chait's FeedRead I was using!

    I changed it up a little bit, Glenn -- let me know if that's a problem. And THANKS for your hard work!
  • Glenn · 4 years ago
    Change all you want, it's released under the GPL so you can do whatever you want to it.

    I'm just glad it's of use to people.
  • Andy Thompson · 4 years ago
    How do I change the update / delta function to check the feed more than once a day? Say, every 12 hours? Mine isn't getting updated until 3pm local time.
  • Glenn · 4 years ago
    $update = ($delta = (24*60*60));

    that is 24 hours (24 hrs x 60 min x 60 sec). Change the 24 to how ever many hours you want.

    Alternatively if you want the file to be updated at a certain time of day. Delete the votdcache.php file in your wp-content dir and reload your site at the time you want it to happen, it will then update at that time every day.

    Of course if you want it to happen at midnight you'll have to be up then. But as you've got a little daughter Andy, you should be as familiar with the ungodly hours of the day as I am :)
  • Fr. Daniel · 4 years ago
    Please forgive my ignorance when it comes to code, including CSS, PHP, etc. I'm just someone who wants some nice features to work on my blog. WP is great but sometimes, all the tech stuff is over my head.

    You mention adding wp_votd() to the code. Where should this line be added? What file? I tried adding it to my sidebar.php file so it would display similar to your site but that didn't work.
  • Chris · 4 years ago
    Fr. Daniel,

    To add the code, place this where you want it on your blog (say, your side bar):



    Should you want to manipulate it, say, change the feed, you would have:



    Now, the first code is right. I'm acutally posting for 2 reasons (besides to respond to you!) ;)

    My second reason is, it seems no matter how I enter any tags, the default (ESV) is always shown. Am I entering this code correctly (per above)?

    Thank you.
  • Chris · 4 years ago
    Ooops...it seems the comment box cut off my code. Let me try this (if this doesn't show up, could someone help out?):

    First piece: "" (take the quotes out to place in your blog code.

    Second piece (to change the feed):

    ""

    Hope this shows up... :)
  • Glenn · 4 years ago
    ?php wp-votd('niv'); ?
  • Alyn · 4 years ago
    Umm, maybe I am missing something but I put

    Verse of the day:


    into my sidebar.php but I just get the horrible error:

    Fatal error: Call to undefined function: votd() in /home/catalyst/public_html/wordpress/wp-content/themes/Benevolence/sidebar.php on line 19

    I am running WordPress 1.5 but am a little stumped!

    Thanks
  • Glenn · 4 years ago
    ?php wp_votd(); ? into the your sidebar, after installing enabling the plugin.
  • Alyn · 4 years ago
    ?php wp-votd(); ? in my sidebar (and in the above post) but I forgot that the posting stripped out my HTML... oops.

    So, to recap, when I paste

    Verse of the Day:
    ?php wp-votd(); ?

    into my sidebar, it gives me the error

    Fatal error: Call to undefined function: votd() in /home/catalyst/public_html/wordpress/wp-content/themes/Benevolence/sidebar.php on line 19

    Not sure what the problem is.
  • Fr. Daniel · 4 years ago
    Alyn, this is the same problem I'm having. Even with a specific version name ('esv') in the line, I get the "fatal error" message.
  • Glenn · 4 years ago
    ?php wp_votd(); ? not ?php wp-votd(); ?

    There has been some confusion over this, not the leaset reason being that I typed it wrong a couple of times in the post :(

    So, in clarity the code you need to have is ?php wp_votd(); ? or, if you want the niv: ?php wp_votd('niv'); ?, or the kjv ?php wp_votd('kjv'); ?

    I'm very sorry for the confusion, major mea culpa!
  • Tim · 4 years ago
    I uploaded the files to my plug-in directory. I activated the plug-in (I am using WP 1.5). I added the code to my sidebar but nothing shows up. Any suggestions?
  • Mena · 4 years ago
    Hello!
    I use WP 1.2
    I tried installing the files and I enabled the plugin, added the code to my page and got this error:

    Warning: fopen(/home/mydirectory/public_html/blog/wp-content/votdcache.php): failed to open stream: Permission denied in /home/mydirectory/public_html/blog/wp-content/plugins/wp-votd-plugin.php on line 83

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/mydirectory/public_html/blog/wp-content/plugins/wp-votd-plugin.php on line 84

    Warning: fclose(): supplied argument is not a valid stream resource in /home/mydirectory/public_html/blog/wp-content/plugins/wp-votd-plugin.php on line 85

    I had the magpierss folder and the votd file in the plugins directory as specified. When it didn't work, I tried moving magpierss to the wp-content directory, but that took down my whole blog with an error. Any ideas why it won't work? Thanks!
  • Glenn · 4 years ago
    /home/mydirectory/public_html/blog/wp-content/votdcache.php

    If you have access to a command-line you need to type chmod 666 /home/mydirectory/public_html/blog/wp-content/votdcache.php and that should fix the problem.

    If you don't have command-line access, your ftp program should allow you to do the same thing.
  • John · 4 years ago
    I installed your plugin using the wp-plugin-manager one click install.
    1. there is no votdcache.php file (is this normal?)
    2. I got error like #24, and I tried #25 to fix it.
    3. The error report were gone, but there's nothing showed, just blank, nothing.
    any ideas?

    thanks and GBU for this plugin :)
  • Glenn · 4 years ago
    wp_votd('esv',true);, which will force the script to update each time the page is loaded. (If it works you'll probably want to change it back because it will increase load times on your pages)
  • John · 4 years ago
    Thanks, it worked fine. :)
  • John · 4 years ago
    if I may add, I uncomment the str_replace part of the script (the one that commented "Replace HTML entities - not used") because I use the NIV version (i think it will do for KJV also).
    another thing i changed is '', '' to "", ""

    i did these steps because the validator at w3c complains of my site being not a valid XHTML..

    i'm sure you know what i mean.
  • John · 4 years ago
    there were supposed to be an "amp;" part after the second ampersand sign in "", "" .. :P
    sorry for comment-ing all the time..
  • Glenn · 4 years ago
    That's cool, glad to know people are using the plugin!

    The str_replace wasn't implemented simply because I ran out of time to implement a proper entity replacer that would allow for when the feed itself had already replaced the entities, but as long as it works for you, it's all good.
  • Mena · 4 years ago
    It's a no go for me. I can't get it to work even with the fix you gave JOhn.:(
  • Mike Rosowski · 4 years ago
    Thanks for the extra info Glenn. #27 is what it took for it to work for me. I had to create the file,give permissions to it, change in template to wp_votd('esv',true); then it worked and I could change back.

    I am excited to have it working. Thanks for the plugin.
  • Dave · 4 years ago
    I'm using WP 1.5. I installed the plugin and wrote into my sidebar template, and I got the same error message as Mena:

    Warning: fopen(D:\davensusan\wp-content/votdcache.php): failed to open stream: Permission denied in D:\davensusan\wp-content\plugins\wp-votd-plugin.php on line 82

    Warning: fwrite(): supplied argument is not a valid stream resource in D:\davensusan\wp-content\plugins\wp-votd-plugin.php on line 83

    Warning: fclose(): supplied argument is not a valid stream resource in D:\davensusan\wp-content\plugins\wp-votd-plugin.php on line 84

    Like Fr. Daniel, I know nothing about writing code. I would just like to have my sidebar look like yours. I'm told that Mena's solution doesn't apply to me because that's for a Unix server, and I'm on a Windows server.
  • Glenn · 4 years ago
    D:\davensusan\wp-content\votdcache.php

    If this is a hosting account, talk to your support people, they should be able to step you though it (or more likely, do it for you). If not, and this is a machine you have direct access to, http://www.microsoft.com/technet/prodtechnol/wi... has instructions on how to set file permissions. Basically you want to give full control to the IIS user, which is usually called IUSR_[computername].

    I have no idea why Microsoft decided to make the setting of file permissions be so difficult, but that's the way it is I'm afraid.
  • Aaron · 4 years ago
    Great idea and implementation. I am unable too change bibles though, even though I change the abbreviation in the code I inserted and even changed it via the Plugin Editor.

    Any thoughts?
  • Glenn · 4 years ago
    wp_votd('niv');

    Also, remember, the script only upates once a day, unless you set the second parameter to true (see comment 33 for example), so if you change the version you won't see the change reflected on the site until the scrpit updates.
  • Aaron · 4 years ago
    That was it! I was expecting it to refresh immediately. I also change the refresh rate to 4 hours as mentioned in above. Excellant work!
  • Jonathan · 4 years ago
    Hey everybody,

    I wasn't aware that there were so many people interested in applying a verse-of-the-day to their sites! Kudos to you, Glenn, for the plugin. I'm at work right now, but will be downloading WP 1.5 tonight when I get home. I'll also be installing this plugin!

    Thanks again
  • Stephen · 4 years ago
    Everything works! Your plugin is really great. I have one question: How do I make the text of the Bible verse fit into a format that I want?
  • Neil · 4 years ago
    When I put the code on my blog page it gives this error message:

    Warning: fopen(d:\inetpub\cfotos\wp\wp-content/votdcache.php): failed to open stream: Permission denied in d:\inetpub\cfotos\wp\wp-content\plugins\wp-votd-plugin.php on line 94

    Warning: fwrite(): supplied argument is not a valid stream resource in d:\inetpub\cfotos\wp\wp-content\plugins\wp-votd-plugin.php on line 95

    Warning: fclose(): supplied argument is not a valid stream resource in d:\inetpub\cfotos\wp\wp-content\plugins\wp-votd-plugin.php on line 96
  • Glenn · 4 years ago
    25 for a solution.
  • Sandy · 4 years ago
    PlayMonteCarlo is Europe?s number one online casino. They offer distinctive online casino games such as (Multiplayer) Blackjack, Roulette, Caribbean Poker, Slots and even Horse Racing and Scratch Cards.
  • wings · 4 years ago
    I put the download into content/plugins. I activated it. Nothing came up. I do not know where to put the code..... I use Word press 1.5.1.3 ver.
  • Glenn · 4 years ago
    You need to put the code in one of your template files, i.e in the /wp-content/themes/

    Usually it will be on the sidebar, but it can go where ever you like.
  • Jackie · 4 years ago
    Please bear with a WP newbie - Exactly how do I control the font that appears in the sidebar?
    BTW - installation was flawless. I put it at the top of the sidebar.
    Thanks for a awesome plugin.
  • Glenn · 4 years ago
    here and here.

    But in short, the verse text is contained inside a HTML paragraph element with an id of 'votd'. What this means is that if you open up your css document (in your case it's wp-content/themes/ocadia/style.css) and go to the bottom of the file and insert the following:

    #votd {
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    color: red;
    }

    it will make the VotD text 12 pixels in size, in the Verdana font and coloured red. You'll probably want to style it somewhat different to that though :)

    Glad to hear it all worked the way it's supposed to!
  • Jackie · 4 years ago
    Thank you Glenn!
    That was exactly what I needed.
    I am slowly but surely getting the hang of Word Press.
  • Tom Coburn · 4 years ago
    anyone know how to do this with straight PHP?

    There is a church here in town that wants me to design a website for them.. They don't want a blog, but they want this "Verse of the Day" thing... the NIV version..

    so I was just wondering if anyone knew how to do this with straight PHP rather then thru a plugin?

    thanks
  • david · 4 years ago
    great plugin, worked right out of the box :)
  • Jason · 4 years ago
    im just getting a blog set up but cant seem to get the wp_votd() function to display anything. ive tried setting the $force_refresh variable to true - nothing. thoughts?

    notes: the plugin is activated, wp 1.5.2, code on sidebar (verse of the day
    ).

    thanks for your help!
  • Jason · 4 years ago
    disregard. :-) after troubleshooting further, i found that dieloud helped. it couldnt find the file or access the file. looked in www logs and found it was looking in wp-content, not in root. moved the file, forced a refresh and wallah!

    thanks, glenn for a great plugin!
  • Chris · 4 years ago
    Hi, i was wondering, how would you configure this if you wanted to show 2 votd's, say, ESV on one side of my site, and KJV on the other? when I do it, it shows either one or the other on both sides, because it's caching whichever is the active one, and displaying it on both sides
  • Glenn · 4 years ago
    Chris, I'm really not sure, it was never desinged to run like that. I think in that case you may be better off looking at bible gateway's javascript service, you could stick 2 of them on your site.
  • vetto · 4 years ago
    in the template. Still no display. No error, no verse...just nothing. Any Ideas where to go to troubleshoot?

    BTW, thanks allowing this support in the blog post, it is always great to see a contributer stand by his or her contribution.
  • Glenn · 4 years ago
    Hi vetto, this plugin has been updated, please go to http://blog.slaven.net.au/archives/2005/10/17/v... for the new version, it should fix your problem.