Support » Plugins » EzStatic Plugin

  • I know there are a bunch of static-making plugins out there, but I thought I would toss this out as an easy (if inefficient) way to implement static pages.
    Get a copy of EzStatic.php and put it in your plugins directory. Activate it.
    Put a file in your web root (same directory as index.php). It can be html or php. Take the base name of the file (for “test.php” use “test”) and incorporate it into a URL like so:
    The plugin will find your file, execute it, and embed it into your WP template. If your file was a php file, you can even use WP functions inside it.
    No messy file editing or deleting, just activate the plugin. Another proof of concept plugin from yours truly. Enjoy!

Viewing 15 replies - 16 through 30 (of 160 total)
  • Can’t download the last versions of this or Adhesive, it requires authentication.

    Thanks for another great plugin! A feature request:-) It would be very handy to have the possibility to have the possibility to include static pages other than from the root directory.

    ringmaster: i like you idea, i think it’s brilliant, but sadly i can’t use it as i modified the index.php too much 🙁

    Ringmaster, DL folder is still protected. The suspense is building….

    It’s always the stupid stuff that gets you.
    Files are unprotected.

    I have been unable to put an PHP include statement into the referenced file, even when the file has a .php extension. It seems to just ignore those lines. Everything else seems to work great. Assuming this plugin does not support php includes like <? include(‘showbook.php’) ?> , and I’m doing something else wrong, It would be a nice feature.

    I’m not sure what your issue is. Check out my sample. I changed it so that it uses an include to include a WP function.

    I was wrong, it is picking up the includes. If the include is simple text, it seems fine. I don’t know enough about how wordpress works internally to know exactly what is happening, but I will explain the symptom and maybe someone will do some additional testing. I have several applications (a simple guestbook, Zfeeder, etc) that work fine in manually created static pages where I cut out everything in my index.php within the content division, and manually insert a php include statement in the empty content area. These pages work great. If I do the same thing using EZStatic, I get array errors, or nothing returned from the include. I’m guessing the difference is in how the final page is called (index.php ?static=newname.php, vs just linking to newnameplusindex.php)
    I know I’m not providing enough info to troubleshoot this, but there is atleast one other person getting the same error with Zfeeder if we use ezstatic, but no error in a manually created WP static page.
    I will try to find time this week to write a few simple routines that might give me more info to share with you.

    How badass is ZFeeder? I’m looking for an RSS plugin anyway. If I’m convinced, I could troubleshoot it.

    As it turns out, ZFeeder uses a ton of globals via includes, and doesn’t encapsulate very well at all. I’ll give you an example:
    A function contained in a file included by the main zfeeder.php, parseOpmlFile(), accepts an OPML filename parameter and returns a string value as a success result. In that function, it sets a global variable that is accessed by the main file. (This is kind of sloppy, IMO.)
    Because EzStatic includes the main ZFeeder file inside a function, the globals in the second-tier include aren’t in the same scope as the main zfeeder.php file, therefore they can’t be accessed correctly.
    This is a bug that should be reported to the ZFeeder folks, since they seem to be under the impression you can just drop their include statement anywhere and get working feeds. They should probably instead either return those global results by reference (that’s kinda taboo in PHP, but doable), or return ‘false’ on error and the actual results on success, which is what most people seem to do.
    You might consider a different reader. Ever try FoF? That seems to work via EzStatic.

    Really a great plug-in! Is it somehow possible to display also static files that are not in the wp directory?

    Yes, the latest version does this if you specify the path in addition to the file. For example:

    Ok, indeed that seems to work! What about the following: I have my blog located in and some static HTML files in I am in the process of moving them to WP but that might take a while due to linking [yes… used front page:( ].
    I tried now: but that does not seem to work. Any suggestions on this one?

    Zfeeder is pretty slick, so I will probably stick with it at the price of one manual static file to maintain after updates etc. Thanks for the great plugin, it will save lots of effort downstream.

    Latest version (1.3) can include ZFeeder. Man, that was a task…
    Anyway, the links that ZFeeder makes are a little wonky when you use EzStatic, since it kills the querystring, which is what tells EzStatic to include ZFeeder in the first place. So, if you did use EzStatic to include ZFeeder, you would likely benefit from adding some stuff to your mod_rewrite rules that automatically added the required EzStatic querystring and appended the ZFeeder stuff to that.
    I leave this as an exercise for the reader. 🙂

Viewing 15 replies - 16 through 30 (of 160 total)
  • The topic ‘EzStatic Plugin’ is closed to new replies.