But it seems to take 10-15 seconds or so after the file was deleted to regenerate. It just shows errors that the file is missing in the meantime which kinda sucks but is not a deal breaker I suppose since we won't update the file daily or anything.
I still can't get the version to work which was stated as optimal. I tried this:
Which I didn't do, my developer did for whatever reason so I'd be afraid to have to change that. If it is messing it up maybe there is a way to do a non-index url that isn't being messed with in the htaccess?
This is our index.php file as well incase it's causing any issue? Not sure if it needs something in it to know about the _GET or isset or whatever.
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
* @package WordPress
* Tells WordPress to load the WordPress theme and output it.
* @var bool
/** Loads the WordPress Environment and Template */
As far as the note on "calls" missing. I'm not quite sure what that is. I am no php person, just trying to get this thing to work.
Thanks for any additional help guys :) :) :)
07-20-2013, 04:38 AM
Would really appreciate the help. Thank you so much!
07-20-2013, 09:21 AM
In your WP .htaccess in the line
RewriteRule . /index.php [L]
change [L] to [L,QSA] which means QueryStringAppend and should tell apache to pass get parameters to the script as well.
In case of checking deleted file, it would be regenerated on request to wordpress, not to ipb, keep this in mind. If your ipb is requested more frequently than wp, of course you will see errors until wp is requested.
07-20-2013, 09:23 AM
Also you may call clearstatcache() function before is_file() so that it checked the file on filesystem itself instead of filesystem cache.
07-21-2013, 05:17 PM
Ok, deleting the files and refreshing the blog page instead of the forum makes the one option immediate. I was refreshing the forum page waiting for the changes to take effect.
I couldn't figure out how to include the clearstatcache function but I doubt it's a big deal now that I know to refresh the blog.
The url isset thing still didn't work even with the htaccess file edited as instructed. Eitherway this is pretty simple as I have it. About the only thing that could be simpler is if the file auto updated the txt file IF the original file was altered so that we didn't have to bother deleting files for them to be regenerated. But it's no biggie doing it this way. At least it's not making a million saves to the file on every refresh like the original way. Especially since we are doing it for 3-4 different areas which was resaving 3-4 different files every time.
I left one as the original way to resave each time. Reason why is that we have that one randomly showing 4 posts. So on the live blog it shows 4 different posts on each refresh. But if we did the text-file delete option like on the rest of them then it only would show the same 4 posts unless I deleted the file on every single refresh...LOL. But by regenerating the file each time it regenerates those posts at random as instructed so it shows 4 random posts at our forum each time. I'm not sure if there is a better way of doing that without all the resaving of the file but at least this makes it so that it works.
07-21-2013, 05:37 PM
Actually I guess the original way still doesn't re-generate the random images until the wordpress page has been refreshed by someone. So refreshing the forum page does nothing.
Fortunately our blog is visited a fair amount of times making things random enough but in a perfect world i guess I would handle the header card system the same as the others with the delete file regeneration. But then have the txt file contain the randomize code. It can't do that as-is because we would need to run the wordpress environment at the forum to do so but I don't know... at some point I might figure out a way to randomize those 4 posts without the need for the WP loop to do it.