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:
    http://www.example.com/index.php?static=test
    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 - 76 through 90 (of 160 total)
  • @wairoanz
    Hi there and sorry if my questions didn’t make much sense 🙂
    I read earlier in the thread that for this plugin to work it relies on the default DIVs of ‘content’ and ‘menu’ – I wondered if I could use my own that I currently use on my index which are ‘#main-content’ and ‘#sidebar’.
    Hope this makes sense
    Karl

    @karlb:
    You can, but you’ll have to replace the regular expression that searches for the IDs in those divs.
    In a version I recently modified (I don’t know if I put it online or not) I made this expression a lot more complicated so that it could find the id even if you added extra attributes to the tag. But it still assumed that you were using the default names.
    @ringrocker:
    You’ve got the same problem KarlB is asking about. You’ve changed the IDs of the tags that come with the default WP install. There needs to be a div with an id=”content” followed by a div with an id=”menu”. If you don’t have these, EzStatic doesn’t do anything.
    As I’ve said, you can change the source of EzStatic to find the parts you want to replace, but since I can’t access your server to modify anything, you’re mostly on your own with only this simple suggestion: Make EzStatic capture everything from <div id="mitte" style="float: left;"> to <div id="mastfoot" align="center">.
    Incidentally, while I’m looking at your code, you’ve done some stuff with your IDs that won’t validate as XHTML – You can’t have two IDs that are the same. You have a bunch of divs IDed as “trenner”, for instance. I mention this not to berate your page design (which is pretty cool) but because getting your page to validate is a good first step to sorting out other issues.

    I’ve been following this plugin as a possible alternative to the static pages I created – ringmaster is correct on his assertion that if you change a style, it doesn’t propigate to the external pages very well, this is evident on my site, when you click on the “Latest Comments” link. So, I’m looking for an alternative, my problem is the two fold. 1, the fact that the files are still external to WP, meaning I still would have to use something to edit them. I could use the template editor section in the WP admin, but that’s not a real solution. The second issue, is a bigger deal for others than me is searchability, both within your own WP site, as well as having it searchable from a search engine.
    How does EzS handle any of these issues?
    TG

    I have my static pages in public_html\content and wp in public_html\blog. I would like to keep my static pages in the content directory and tried to tweak the ezstatic.php file, so far without success. Can I set the basedir for EzStatic to my Content directory but still keeping the index.php in the blog directory?
    I found “$contentfile = ABSPATH . $sfile . $ext;” in the php file and tried to change that to $contentfile = “..\content\” . $sfile . $ext;

    Hello,
    I’m very new to WP. I tried this plug in, but it seems it doesn’t work properly. When i click on the static page link it gives to me this error:
    Fatal error: Call to undefined function: ob_get_level() in c:\appserv\www\wordpress\wp-content\plugins\ezstatic.php on line 180
    Thank You
    Cialdo

    @techgnome:
    Maybe you need a wiki. You could run it inside of EzStatic. That’s my current project. It’s currently searchable and outputs SEF URLs (like http://www.asymptomatic.net/_wiki/MicroWiki). Unfortunately, it’s not quite ripe yet, especially since I keep making it work and then breaking it. Grr.
    When it’s done (this stuff works, it’s generation of SEF URLs that is causing problems at the moment) it’ll integrate into WordPress logins and only add one table to the database. It’s two just files, one is the engine (35k) and the other contains the default wiki pages. Interested in beta-ing?
    @Cialdo:
    I think your version of PHP might not be up to snuff. Open the ezstatic.php file and change the ob_get_level() to -1, and save it. Be sure that when you use EzStatic, you uncheck the compressed output option in the admin panel, I think it’s under Options->Reading. 🙂

    I’ll beta-test the microwiki 🙂

    ringmaster, maybe down the road, but not at the moment. I’ve experimented with integrating Wiki into WP before, and it still has the searchability problem as well as being able to run PHP (I *need* this to run some of my pages that show comment leaders and recent comments) – and it also runs into the problem of style changes to my site, which I’ve been doing alot of recently.
    I’ve got my own beginings of a static plugin that I have been toying with, and just today got what I think is the last piece of the puzzle that I need to run PHP code embeded in the post.
    TG

    @wairoanz:
    I just need to write some install docs and package it up before people can try it. Look for it soon. 🙂

    I have a little bit problem.
    The original file:
    http://realestate.or.id/archives-asli.php
    Using ezStatic:
    http://realestate.or.id/index.php?static=archives-asli
    Why it won’t appear properly?

    Just like Cialdo i also get the Call to undefined function: ob_get_level() in .... ....ins\ezstatic.php on line 180 … I have tried everything in this thread to get it to work. I am not that good at php to figure it out.

    @nofie:
    Is that the nicer archives plugin/hack? I’ve been meaning to try that with EzStatic. I can’t imagine why it wouldn’t work.
    @lukiss:
    Seriously… Change “ob_get_level()” to “-1” on that line in the EzStatic.php file, and the error should go away.

    @nofie:
    Aha.
    There is a problem with EzStatic & Nicer Archives. It would take me longer to describe the problem than to rewrite things so it works, so I’ve rewritten things.
    I’ve created a modified version of Nicer Archives that works with EzStatic. My modifications are ugly, and I would never write anything like this if I had adequate time, but it works. You can see the archives on my site:
    http://www.asymptomatic.net/_archives
    This URL also known as:
    http://www.asymptomatic.net/index.php?static=archives
    You can download the modified archives.php file in the EzStatic section:
    http://www.asymptomatic.net/wp-hacks
    You can buy all of your prescription meds at:
    …oh, nevermind.

    @ringmaster
    I did change ob_get_level to > -1 and stuff, still same error. ob_get_level still not defined messege :), checked that compressed output is off…
    The server is running PHP version: 4.1.2. Perhaps that could be the problem?

    @lukiss:
    You need to follow my directions explicitly… 🙂
    Replace the “ob_get_level()” with “-1” so that the whole statement reads:
    if(-1>0)
    Yes. I know that’s never true. Just trust me.

Viewing 15 replies - 76 through 90 (of 160 total)
  • You must be logged in to reply to this topic.