tjworld
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Help, individual/single page showing multiple posts.I’m simply dragging and dropping them in Presentation > Widgets. The theme has two sidebars and I’ve got “Recent Posts” in the left sidebar.
Forum: Fixing WordPress
In reply to: Help, individual/single page showing multiple posts.I just experienced this confusing issue. I have two identical wordpress blogs with the same code and themes on different domains.
One domain had the problem where displaying a single post actually displayed all posts.
I inserted some debug code in wp-include/query.php to monitor the have_post() loop and the SQL request built into $this->request.
From that I noticed that the domain with the problem was using the default sidebar widgets which include the “Recent entries” widget.
On the domain without the problem I had configured the sidebar widgets myself. It uses the “Recent Posts” widget.
The HTML source code generated by the two looks different; DOM IDs and CSS class differences.
Anyhow, I fixed it by configuring custom widgets on the problem domain including using the “Recent Posts” widget.
It looks like, when using the default widgets, the value of $this->posts (a count of posts) is set to the number of posts found by the SQL query issued by the default “Recent Entries” widget, whereas when using the “Recent Posts” widget $this->posts = 1.
That value causes the have_posts() function to loop over multiple posts even in the theme’s “Single Posts” template.
Forum: Requests and Feedback
In reply to: Bug? Formatting for object or embed tagsThis is a bug of sorts in wpautop() in the file /wp-includes/functions-formatting.php
I patched it to work for Google Video embedded Flash player tags.
The simple fix is as follows:
In
function wpautop($pee, $br = 1) {
Add “object|” to three of the regular expressions.
The expressions are the first two that begin:
$pee = preg_replace('!(<(?:table|thead|tfoot|
which, after inserting “object|” before “table” become:
$pee = preg_replace('!(<(?:object|table|thead|tfoot|
Next, find the line that begins:
if ($br) $pee = preg_replace(
And on the following line:
$pee = preg_replace('!(</?(?:table|thead|
insert “object|” before “table” so it becomes:
$pee = preg_replace('!(</?(?:object|table|thead|
You can apply the same principle to some other tags that are mangled by the auto-formatting.
Forum: Requests and Feedback
In reply to: virtual hosts and siteurlI’ve just experienced the exact same issue, and was about to make the same change.
Its a real problem when you’ve got multiple domain names pointing to the same site.
My alteration also deals with SSL connections, and only uses the port when its not port 80.
$siteurl = ($_SERVER[“HTTPS”]==’on’ ? ‘https://’ : ‘https://’).$_SERVER[“SERVER_NAME”].($_SERVER[“SERVER_PORT”] != 80 ? ‘:’.$_SERVER[“SERVER_PORT”] : ”);
Forum: Plugins
In reply to: Fade Anything – How to fade new postInclude this Javascript file in your page
https://www.ads-software.com/support/bb-scripts/fat.js
Create your new element and its children, and their content, using W3C DOM methods:
var mytag = document.createElement(‘div’);
mytag.id = ‘1049395’; // unique name
// …
(for examples see function newTagCompletion() in https://www.ads-software.com/support/bb-scripts/topic.js)// call the fade function
Fat.fade_element(newcomment.id);Forum: Plugins
In reply to: wp-plugged-in-1.5.2 is missing wp-photoAnd another!
It’s missing wp-mobile.php and wp-mobile.css. When trying to view a full article from an RSS feed, clicking on the full-article link brings up a 404 Page not found error.
I copied the 2 files from the 1.5.1 ZIP and it worked.
Forum: Plugins
In reply to: wp-plugged-in-1.5.2 is missing wp-photoI found another bug: when clicking the RSS feed links Firefox complains that the XML is invalid:
XML Parsing Error: xml processing instruction not at start of external entity
Location: https://blog.tjworld.net/index.php/feed/
Line Number 2, Column 1:This is caused by an extra blank line at the end of “\wp-blog-header.php” after the closing PHP tag “?>” – simply delete the blank line so the closing tag is on the last line of the file, and save it.
Forum: Plugins
In reply to: wp-plugged-in-1.5.2 is missing wp-photoI posted this to let others know who might not realise the issue.
If you read what the author says you’d know he doesn’t support his software (He’s a WordPress developer too!) and wants all comments and support issues placed here in the WP Support forums.
Forum: Plugins
In reply to: wp-plugged-in-1.5.2 is missing wp-photoI should have added that copying the two files from the previous Zip appears to solve the issue – although there’s no knowing if they have been updated since.
Also, on PHP 5.0.5 they cause the following warning:
Warning: Call-time pass-by-reference has been deprecated – argument passed by value; If you would like to pass it by reference, modify the declaration of getimagesize(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in …\wp-plugged-in-1.5.2\wp-photos.php on line 40