WordPress.org

Ready to get started?Download WordPress

Forums

New Pluign: Faked Folders (62 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    First note on this plugin: the edit-link for posts that are attached to a faked folder does link to your own site instead of to the get_settings('siteurl'). You maybe should switch that ;-)

  2. hugo
    Member
    Posted 10 years ago #

    Additional problem: your plugin conflicts with the wpstats plugin. The call to the_stats does break when you access a static page. Actually this came into play by using the default template - you use the index.php page for this? You might want to elaborate a bit more on what to do with templates and where to place them.

  3. hugo
    Member
    Posted 10 years ago #

    Ok, more digging, more problems ;-)
    I now understand where templates are stored and how to work with them. I did discover though that there are some problems with plugins and faked folders. Somehow my plugins don't get loaded, the defined functions in the plugins are not available.
    Another problem I found was that the rewrite rules do create a p= parameter, but the plugin itself does try to use the p parameter, but it isn't set from $_GET[]. You do check $_GET['static'], but you use $p directly. I don't understand what the use of isset ($name) is in your plugin code where you "take over" wordpress, as that variable is nowhere defined. The $p not initialized problem is easily overcome by pulling it out of the $_GET[] array. But the problem with the plugins is still there.
    I do use WordPress 1.2.

  4. hugo
    Member
    Posted 10 years ago #

    Weird. The plugins are now loaded correctly, the only thing that still is missing is the $p thing. Don't know why and don't know how, but it does work now. Nonetheless it's exactly the plugin I waited for ;-)

  5. Stevarino
    Member
    Posted 10 years ago #

    Thanks for the feedback! This should really teach me not to release plugins during hectic times...
    Anon: The changes were made. Sorry about that! When I was coding that part I had other things on my mind I guess (ahh, mosquito... the perfect scapegoat!). ;)
    Hugo: to be honest I'm not quite sure what's going on with the variable scope in that section of code... My only thought is there must be some extract() or something similar hidden somewhere... I do know that my PHP installation is strict in that regard (well as strict about variables as PHP can be), so if it works here it should work there. :)
    As far as your plugin problem, I've "fixed" that. New installations of Faked Folders will transfer their currently activated plugins over to any created folders (they can still pick and choose which plugins they want in the edit screen however).
    And that brings us to v1.01. :D

  6. TechGnome
    Moderator
    Posted 10 years ago #

    *adds this to my list of things to try out one of these days.*

  7. slim
    Member
    Posted 10 years ago #

    I think I am having troubles installing this plugin.
    the install seemed to go well, and so did activation. However when a Tried to assign a document to a folder, I was confronted with this error:

    Warning: file(/srv/www/htdocs/bryan/.htaccess): failed to open stream: No such file or directory in /srv/www/htdocs/bryan/wp-content/plugins/faked-folders.php on line 355
    Warning: implode(): Bad arguments. in /srv/www/htdocs/bryan/wp-content/plugins/faked-folders.php on line 355

    Does HTAccess need to be present for this plugin to work?
    Has anyone else encountered this error?
    thanks
    -bryan bell

  8. Stevarino
    Member
    Posted 10 years ago #

    Unfortunately yah, it does run on .htaccess juice. If you have another method you want implemented, let me know because I'm interested in making this plugin as compatible as possible...

  9. hugo
    Member
    Posted 10 years ago #

    BTW: if you patch wp-admin/edit-post-advanced.php to include "static" as a status option for post editing, you will be able to edit static pages without the problem that the status is reset to draft on each edit.

  10. quayso
    Member
    Posted 10 years ago #

    Yes, Guvner, I was getting the same errors, but I didn't know if I had done something incorrectly. I tried to change the permissions on all the files that I thought the folder may be using, but that fixed nothing. Any suggestions?

  11. Dextrine
    Member
    Posted 10 years ago #

    Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /www/xx/xx/public_html/1 on line 40
    Im getting this kinda error? Any ideas why?

  12. Stevarino
    Member
    Posted 10 years ago #

    Dextrine: it looks like a template error, but that's just me guessing. Where are you getting these errors? How much of the plugin can you get running?
    And error pages. Love the idea, have no clue why I didn't think of that before. :)
    They are possible with this plugin (I got mine working) but they require a bit of messing with the .htaccess file itself. I'm not sure what caused the errors you guys got, but I'm curious what rewrite rule you used. To make things easier for the next batch that tries this I'm going to incorporate error pages into the next release. Thanks for the feedback!

  13. lazymonster
    Member
    Posted 10 years ago #

    That's what I'm looking for I think. Thanks a lot, I'll give it a try :)
    Can I include PHP scripting in the text files?

  14. grumm3t
    Member
    Posted 10 years ago #

    I am still getting the errors as Guvner's first post, and I checked out the code and it has to do with trying to write to /tmp .
    For some reason that fails (I should have access to /tmp) and it won't fall back onto the local file fakedfolders.txt.
    I commented out using /tmp and forced it to use my 666/777 chmod'd fakedfolders.txt and it still says it doesn't have access to write to the file.

  15. rsbenedict
    Member
    Posted 10 years ago #

    I, too, get the same errors as Guvner's post. Any ideas?
    Thanks!

  16. lazymonster
    Member
    Posted 10 years ago #

    i'm getting the same error too, i guess it hasn't been fixed :(

  17. Stevarino
    Member
    Posted 10 years ago #

    How... odd. :\ To be honest the plugin should automatically update the database and it will say something like "database updated to version 2.0" or something.
    And what did you mean by "the error document actually picks the post with the corresponding id from the parent directory which is better then nothing." What exactly is happening here?
    About the modified database bit. My plugin runs off 3 of it's own tables and two fields in the posts table, so even heavy database modification should be okay. As long as you have WP 1.2 you should be fine. Which version are you using btw?

  18. Stevarino
    Member
    Posted 10 years ago #

    "I'll try installing 1.2 tonight and see if the plugin will work, then I can try and discover what change – between versions – is causing the plugin to fail."
    Sounds good! I'm going to install the 1.3 alpha tonight and we'll hopefully find a solution. :) But right now, work calls.

  19. Anonymous
    Unregistered
    Posted 10 years ago #

    Hi, I'm trying your plugin as well. Using 1.2 mingus.
    I got the same error message as Guvner (static_template_access column not found) but fixed it by manually adding the column using phpMyAdmin.
    I also added the mod rewrite rules to my .htaccessfile.
    I was trying to create an about page, which points to
    http://site/about/about-me/
    and it gives the same error as the one Guvner got. Warning: fopen bla bla bla..
    Fatal Error
    Unable to create temp file or pre-designated file.
    To continue using this plugin, please create a blank file called "fakedfolders.txt" in your WP root directory and chmod it to be 666.
    I create the fakedfolder.txt file in root and chmod it. After that, all I get is a blank page with nothing on it.

  20. Anonymous
    Unregistered
    Posted 10 years ago #

    Heh, nevermind.
    Just figured out I had to manually edit the Templates section.
    Good plugin, just needs a little proper documentation. Newbies can get a little lost. Keep up the good work, really appreciate your effort. ;)

  21. TheMole
    Member
    Posted 10 years ago #

    Okay, I may be stupid. But how do you link to these "static articles" I can't find a URL that I can link to, say from the menu on the side or anything like that.
    Anyone? :)
    Thanks.

  22. Anonymous
    Unregistered
    Posted 10 years ago #

    Heh, I don't think there is anyway to link them other than to manually code it into a link list or something.

  23. Guvner
    Member
    Posted 10 years ago #

    What exactly do you mean by "manually edit the Template section", I'm still getting the error and would love to get this to work.

  24. Guvner
    Member
    Posted 10 years ago #

    Well it's a dubious honour to have inflated this thread with the 'Guvner bug' :-)
    I'm getting this error when I try to view static posts, whether error pages or normal static pages. All my templates are sparkly new new to a fresh install this afternoon.

  25. Stevarino
    Member
    Posted 10 years ago #

    Yes, even the Guvner Bug has it's silver lining. :)
    Okay, that info REALLY clears things up for me that you are getting these while trying to view your created static pages. In your last post about this bug you said you got the errors on line 837; are you sure that's right? The way you describe it I imagine the line number to be >1040 or so...
    I remember I once had a host who had their PHP installed in a really funky way in that what the ini-functions and phpinfo() would show wouldn't necessarily be accurate. I'm beginning to worry that we have this case here. So if the error is between lines 1168 to 1176 (and only if) try making the following change:
    if( ini_get('safe_mode') == '' &&
    TO:
    if( false &&
    Hopefully that will bump you out of that error (and yes, I fixed the bug where people get stuck on the "create fakedfolders.txt" message). :)
    To be honest I didn't think you would have a template error. The way you were describing it and how you were handling it made me think that you would have figured it out by now.

  26. Guvner
    Member
    Posted 10 years ago #

    Bingo *large bow*, but now I've got it working I'm sure I'll break it again very soon. Thank you very much for your patience and an essential plugin.

  27. wairoanz
    Member
    Posted 10 years ago #

    And I too had the same problems as Dextro and Guvner. I'm using WordPress 1.2

  28. ieure
    Member
    Posted 10 years ago #

    I've found 2 bugs with Faked Folders 2.0.
    1. implode() is called with the wrong number of arguments, which prevents this plugin from working on PHP < 4.3.0.
    2. When doing a clean install of 2.0 (not an upgrade), the static_template_access column is not created.
    This patch fixes both issues.
    Though I have gotten it installed, I have not managed to get it working. I've added a .htaccess that WP can modify, and it has all the correct mod_rewrite rules, but I'm unable to access any of my static pages.
    I created a folder named 'Static', and added a page to it, 'test'. When I go to http://www.mysite.com/Static/test , I get a 404.
    I tried going to http://www.mysite.com/index.php?static=true&name=test - what the RewriteRule appears to redirect to - but I get a white page with some PHP errors:

    Warning: fopen("1", "w") - Permission denied in /path/to/mysite/wordpress/wp-content/plugins/faked-folders.php on line 1171
    Warning: Supplied argument is not a valid File-Handle resource in /path/to/mysite/wordpress/wp-content/plugins/faked-folders.php on line 1172
    Warning: Supplied argument is not a valid File-Handle resource in /path/to/mysite/wordpress/wp-content/plugins/faked-folders.php on line 1173
    Fatal error: Failed opening required '1' (include_path='.') in /path/to/mysite/wordpress/wp-content/plugins/faked-folders.php on line 1175

    Any suggestions?

  29. ieure
    Member
    Posted 10 years ago #

    FWIW, I changed the ini_get() statement to 'false', and I get the same errors.

  30. TheMole
    Member
    Posted 10 years ago #

    I mean, what is the URL of the static page? For example. I've created a fake folder called '/CoreContent/' and put a article into it called 'test.'
    How do I view this page?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.