(See https://www.gentoo.org/security/en/glsa/glsa-200603-01.xml)
]]>If I go to the Options > Permalinks tab without having an .htaccess file already in place and try to update my permalinks structure, I get the message saying “You should update your .htaccess now.” –> that’s all well and good except that *THERE IS NO TEXT at the bottom of the page for me to copy into an .htaccess file !!*
If I create an .htaccess file, put it into the correct directory and chmod it to 777, and then update the permalink structure from within wordpress, it tells me that “Permalink structure updated” — BUT IN REALITY THE HTACCESS FILE IS NOT MODIFIED AT ALL and permalinks do not work
This is very frustrating, since I can’t seem to find anyone else reporting this same bug !! Am I missing something here?? What could be causing this sort of behavior???
]]>wp_list_pages('sort_column=menu_order&depth=1&title_li=');
and I’m viewing a level 2 Page, no list item gets the current_page_item
class. Now of course this makes sense as the Page I’m viewing doesn’t get listed in the output.
However I was thinking that wp_list_pages()
should have an option (or perhaps do it by defualt) that the current Page’s closest relative (i.e. a parent) should get the class current_page_item
if the current Page’s depth is more than the depth set in the function.
Can anyone think of any drawbacks to this or why it shouldn’t be done? Thought I’d get a bit of a discussion on this before I made a patch and submitted a ticket.
]]>I have a workaround suggestion for those who want to use different ratios (i.e., not only 4×3 and 3×4) in their posts but still have nicely scaled thumbnails.
Two simple changes are necessary in two files. Don’t forget to backup!
In function “get_udims()” in “admin-functions.php” on line 1866 change “4 / 3” to “1” (without quotes).
Do the same thing in “inline-uploading.php” on line 82. You can’t screw anything up as these are the only appearances of “4 / 3” in both files.
Hopefully, I haven’t overlooked a better solution.
Mathias
]]>I had one problem, though – my host does not have PHP compiled with GD, so thumbnail generation were not working for me. At the same time, I have shell access, and it was really easy for me to download ImageMagick command line utility – which I did. I’m sure some users might be in the same situation, so I’ll share my findings.
Maybe the developers of WordPress will even consider including support for ImageMagick in the final release – since it should be very easy (took me only 1 hour).
But first – why use ImageMagick?
1) ImageMagick does not have to be compiled with PHP – very easy option when you don’t have GD.
2) ImageMagick is faster than GD and generates better quality thumbnails. It’s the library of choice for many gallery projects.
How do I get ImageMagick to work on my site?
a) Download ImageMagick package from https://www.imagemagick.org/script/download.php
b) Untar, put in a directory where the web server can execute the binaries.
c) Make minor (almost tiny!) changes to wp-admin/admin-functions.php:
1) Find the function wp_create_thumbnail(). Add the following as its first line:
return alex_hack_thumbnail_using_imagemagick($file, $max_side, $filter);
2) Copy the following function above wp_create_thumbnail():
function alex_hack_thumbnail_using_imagemagick($file, $max_side, $filter = '') {
// FIX THIS TO POINT TO YOUR IMAGEMAGICK INSTALLATION!!!
// Make sure that the web server can execute scripts from this directory.
$PATH_TO_CONVERT = "/home/alex94040/imagemagick/bin/";
if (file_exists($file)) {
$image_attr = getimagesize($file);
$image_attr = getimagesize($file);
// figure out the longest side
if ($image_attr[0] > $image_attr[1]) {
$image_width = $image_attr[0];
$image_height = $image_attr[1];
$image_new_width = $max_side;
$image_ratio = $image_width / $image_new_width;
$image_new_height = $image_height / $image_ratio;
//width is > height
} else {
$image_width = $image_attr[0];
$image_height = $image_attr[1];
$image_new_height = $max_side;
$image_ratio = $image_height / $image_new_height;
$image_new_width = $image_width / $image_ratio;
//height > width
}
// If no filters change the filename, we'll do a default transformation.
if ( basename($file) == $thumb = apply_filters('thumbnail_filename', basename($file)) )
$thumb = preg_replace('!(\.[^.]+)?$!', __('.thumbnail').'$1', basename($file), 1);
$thumbpath = str_replace(basename($file), $thumb, $file);
$convert_str = $PATH_TO_CONVERT.'convert'.
' -sample '.$image_new_width.'x'.$image_new_height. // new size
' "'.$file.'"'. // source file to convert
' "'.$thumbpath.'"'; // destination file = thumbnail
exec($convert_str, $array_output, $return_value); // call ImageMagick command line utility to do the conversion
if($return_value != 0) {
$error = __('Error while creating image '.$file.'! <br>Return Value: '.$return_value.', output:<br>');
$error .= __("<br>Command: ".$convert_str.'<br>');
}
} else {
$error = __('File not found');
}
if (!empty ($error)) {
return $error;
} else {
return $thumbpath;
}
}
3) Correct the path to the imagemagick installation in the $PATH_TO_CONVERT variable in the code that you just pasted.
Good luck!!
]]>Any thoughts or feedback regarding the design?
]]>i.e. Say you have 7 posts in the system; For the 1st post, post 1 of 7 will be outputted and for the 2nd post, post 2 of 7 will be outputted etc…
BTW, as a further note, post-id cannot be used i.e. it has to be the real item number and the not the allocated post id.
Thanks.
]]>I wanna forward my feed traffic to feedburner, but use the default feed URL so I can always take away feedburner without causing people to have to update their feed burners.
So, I put this in my htaccess above the wordpress rules:
RewriteRule ^feed/ https://feeds.feedburner.com/XYZ [NC]
In wordpress 1.5, this worked. In wordpress 2.0, it does not. I noticed WordPress 2.0 has a new way of making rewrite rules, showing only one rule rather then the usual many. I found $use_verbose_rules in classes.php. Setting it to true brought back the old rewrite behavior, and also allowed my feedburner redirects to start working.
So, my question is, is their any reason I shouldn’t use the verbose rules? Are they slower, or depreciated, or likely to break? Or was the change to simplify the rules or increase compatability?
Or is there a way I can get the forward to work without using verbose rules?
]]>I’m using WP-Cache 2.0.17 and a fair quantity of plugins. Serving dynamic pages takes more than a second. Serving cached pages takes on average 0.5 to 0.7 seconds. With the Dreamhost restriction for shared hosts of 30 processor minutes a day, that means that after serving roughyl 3,000 cached pages, I’m past my allocation. That’s not counting any uncached pages of which there are sure to be plenty.
Upon benchmarking the caching, the entire time — well, 90-95% of it — is spent in readfile()
. So that single PHP call is taking over half a second to read a simple HTML file and poop it out over the network.
Does this seem just utterly out of line? This basically means that anything over even a small readership — like when I got linked by Gizmodo which was when I got my warning email — causes me to go over my allocation.
I’ve got a support email in to them but frankly hold no hope. Just looking for confirmation that I’m not going totally crazy thinking that caching should be a whole lot better performing than that.
]]>I’ve been trying to get latest word press installed on a box with MySQL 4.1.14. And I’ve been getting the “can’t connect to database” error. After triple checking values, connecting to DB via ‘mysql’ on cmd line I did bit of research and found there is the issue with the MySQL password hash being increased from 16 to 41 bytes in 4.1.N.
Does anyone know if this is fixed yet? (If Word Press can handle it, or use the mysqli PHP lib at all??)
I have a hosting package where by I cannot login to mysql and issue the SET PASSWORD = OLD_PASSWORD(‘password’) command, and I’ve read that fixes it, so I’m a bit stuck.
Kinda about to switch to textpattern unfortunately cos all other blogs I work with are Word Press but it seems like it’s a bit of a shortcoming.
Any news on when this may be sorted?
Thanks
Simon Kittle
]]>