• 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:
    https://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 - 46 through 60 (of 160 total)
  • Thread Starter ringmaster

    (@ringmaster)

    Ok, that’s good, but what I need is exactly what I asked for. If you can visit the page above, view the rendered HTML source from your browser (literally, click View Source), and save that – that would be great. ??

    Thread Starter ringmaster

    (@ringmaster)

    @gravity:
    IM?
    ICQ: 2569335
    AIM: RngMstrOW
    MSM: a_passport [at] midnightcircus [dot] com
    Yahoo: ringmasterow

    Code has been fixed.
    Works really well now.. even if you do not have a default WP index template page.
    You can get the latest version 1.5 over at – https://www.asymptomatic.net/wp%2Dhacks/
    If you have any issues please keep this post going. if you encounter some global information at the top of your static page.. edit the EzStatic.php file and put a couple slashes in front:
    //foreach
    around line 165, until it is changed.
    Kind regards,
    Gravity..
    Thanks Ringmaster for your help.

    Just so you know Zfeeder via EZstatic does seem to work in 1.5, but it seems to ignore the template selected in the admin routine, and uses the bare bones “blue” template. I use BlueLogo. If I do the rewrite mod stuff as you mentioned, is that how I can pass the template into EZStatic? I just want to know if that is correct before I start using rewrite (It has caused me problems elsewhere before) .
    Nice job doing that fix.

    This is the first plugin I got to work! I’m too excited, but I have a small problem. Can I add content to the pages using wordpress? If so, how? I’ve added content directly to the text files, but it the text displays in the title font used in the template. How can I change this.
    Any help is appreciated. Thanks!

    @adb
    As far as editing the text from wordpress.. all you would have to do is go to your admin templates and type in the name of the file you want to edit from within the admin tool.. If your permissions are correct then you will see it and be able to edit it in the window above.
    As far as changing the font to be something else.. when you write your code for the text you are going to have to use some CSS there in the wp-layout.css file. What you do is create a new variable
    .nf { FONT-SIZE: 12px; COLOR: #EEE; } and then in the text file hopefully with a .htm or .html or .php extension you can add <font class=”nf”>the text to change</nf>
    then in your output the text should be changed based on the code changes you made. I hope that makes sense.
    If anyone knows of an easier method.. please do tell
    Kind regards,
    Gravity

    Thread Starter ringmaster

    (@ringmaster)

    @xyth:
    You need to make sure that whatever is changing your style (an reference to Alex’s style switcher, for instance) is in the head area of your index.php page, not in the content area of the body. It looks like you’ve got this sussed out anyway.
    @adb, gravity:
    Or… You can create a whole HTML page and reference that instead of the text file. If you use tags in the body of the page, they will render like tags normally do in your WordPress template.
    The added benefit of using a whole HTML page is that you can add stuff to the head area of your output. For example, if you had a CSS style that you wanted to apply only to the static page, you could include it in a <style> block in the <head> of your static .htm page, and EzStatic will embed that into the WP template output.
    Here is a sample page that shows what I’m talking about:
    https://www.asymptomatic.net/index.php?static=spin

    Hello Ringmaster,
    When you get a moment I would like you to come online.. I wanted to ask you something about the plugins..
    Gravity

    @ring: Zfeeder “almost” is working perfectly in your plugin. If your ready to stop trying an yell “Zfeeder is written by babboons”, I don’t blame you. However, if you want to see what isstill wrong, I left two links on my site, one called zfeeder which is my manual static page that works fine, and a link called zfeed include test, which works fine until you click on the “more” tab on a feed. Then it presents a page that is all categories dumped onto one page. Cool, but not quiet what it should display. Any ideas? Would doing the rewrite mod help?
    As always, thanks.

    Now I just need a way to inject a custom <title> into each static page… probably a standard bit i.e. “Site Name ” plus what is contained within <h3 class="storytitle">blah blah</h3> … giving me <title>Site Name - blah blah</title>. Any ideas Ringmaster?

    Thread Starter ringmaster

    (@ringmaster)

    @wairoanz:
    It should already do that title stuff. ??
    EzSatatic extracts the <title> tag from the included page and uses Javascript to fling it into your title with your WP site name. If that’s not working, give me an example of where it’s not.
    Thanks for the mod_rewrite rules!
    @xyth:
    Ugh, dude. Use CG_FeedReed. ??
    You should try the mod_rewrite stuff. That might fix up ZFeeder.
    @adb:
    Try using this and saving it with a .htm extension:
    <html>
    <head>
    <title>Put your title here</title>
    <style>.mystuff{font-size:10pt;font-weight:normal;}</style>
    </head>
    <body>
    <div class="mystuff">
    Put your text here
    </div>
    </body>
    </html>

    @ringmaster: Thanks, <Title> insert works a treat.

    hello,
    i am a newbie and i have a lot of problems because i have zero knowledge about php and wordpress.
    as written in the instructions i have installed ezstatic and get the message
    ” Warning: (null)() [ref.outcontrol]: output handler ‘ob_gzhandler’ cannot be used twice in Unknown on line 0 “.
    >> https://www.zauselmonster.de/wp/index.php?static=test
    in another installation of wordpress it works very well. i can not understand why this error occurs..
    what can i do to kill this error?

    I have another problem. Using th code Ringmaster suggested, when I add content to the “about” page it goes behind the index–the text doesn’t wrap. How can I correct this?

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