desie314
Forum Replies Created
-
Forum: Plugins
In reply to: [New Blog Defaults] setup()also missing
Post name
in common settings (permalinks)Forum: Plugins
In reply to: [New Blog Defaults] setup()a variable typo error is on line 440:
else {$newoptions['use_smiles'] = 0;}
change ‘use_smiles’ to ‘use_smilies’agreed, great plugin.
Forum: Hacks
In reply to: Can't disable user activation email — I'm very closeI figured it out. I was close. All I had to do was return false in my function.
I found the issue. It was an un-closed <div> tag in the easyrecipe-format.html file.
Forum: Networking WordPress
In reply to: wp_blog_version row not inserted after network blog creationalright, thanks.
Forum: Hacks
In reply to: add rewrite rules for a non-wordpress php fileI seem to have found a solution. I simply modified my .htaccess file as follows:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^getpage/?$ wp-content/custom-pages/getpage.php [QSA,L] RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L] </IfModule> # END WordPress
The only thing I did was add the following line:
RewriteRule ^getpage/?$ wp-content/custom-pages/getpage.php [QSA,L]
I have tried this before but it didn’t work. It may be the [QSA,L] that I found in a google search that makes it work this time.
I was initially trying to add this line to htaccess internally with the use of non_wp_rules but this did not update the htaccess file. Not even after flushing the rules with $wp_rewrite->flush_rules(); or by saving the settings on the admin permalink settings page.
I’m afraid that the htaccess file will be overwritten at some point and my rule will not be there.
Forum: Hacks
In reply to: need wp to make my external page links into 'pretty permalinks'yes I can still access wp-admin. I did not alter the htaccess file. I only did the php. I’m not sure if saving the permalink settings does a hard or soft flush. If it is hard then it will rewrite the htaccess file assuming it is able. But this doesn’t seem to affect any of the ‘old’ or ‘new’ links.
Forum: Hacks
In reply to: need wp to make my external page links into 'pretty permalinks'Solution FOUND!
Seems part of the problem was that my test file was in the root. I moved it to any subsequent folder and used this code in a plugin (would probably work in the theme functions.php file too) and it works.add_action('generate_rewrite_rules', 'geotags_add_rewrite_rules'); function geotags_add_rewrite_rules( $wp_rewrite ) { $new_rules = array( '^getpage/?$' => 'wp-content/custom-pages/getpage.php' . $wp_rewrite->preg_index(1) ); // Add the new rewrite rule into the top of the global rules array $wp_rewrite->rules = $new_rules + $wp_rewrite->rules; }
cache needs to be flushed in order for this to take effect so you can either save changes to the permalink settings page in the admin section or use this code:
add_action('admin_init', 'flush_rewrite_rules');
This solution was found in the wp codex at:
https://codex.www.ads-software.com/Custom_QueriesI actually gave up (for the day) and was looking up how to do custom queries and there it was, eureka!
Forum: Hacks
In reply to: need wp to make my external page links into 'pretty permalinks'any other suggestions? I’ve been fiddling with the $wp_rewrite object, still haven’t found a solution. And google isn’t helping atm.
Forum: Hacks
In reply to: need wp to make my external page links into 'pretty permalinks'Your solution seems to be correct but it is not working for some reason. I just get page not found. This is what I have in my .htaccess file (getpage.php is the name of the file):
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^getpage/? getpage.php [NC] </IfModule> # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L] </IfModule> # END WordPress
Forum: Networking WordPress
In reply to: data from deleted sites still in wp_usermetaThanks for the help!