zeug
Forum Replies Created
-
It’s a bit of a shotgun method but you can try this in functions.php … works for me across thumbnails, tiled gallery and Woocommerce:
//Add rel=lightbox add_filter('the_content', 'addlightboxrel', 12); add_filter('get_comment_text', 'addlightboxrel'); function addlightboxrel ($content) { global $post; $pattern = "/<a(.*?)href=('|\")([^>]*).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>(.*?)<\/a>/i"; $replacement = '<a$1href=$2$3.$4$5 rel="lightbox['.$post->ID.']"$6>$7</a>'; $content = preg_replace($pattern, $replacement, $content); return $content; }
Plugin is working smoothly for my YouTube gallery as a backend single post addon to Tubepress. One snag I’ve hit though is it doesn’t seem to trigger Subscribe2 email announcements of new videos.
Subscribe2 uses the Post status transitions hook to detect new posts and your plugin doesn’t seem to trigger the hook. Have had a trawl through the code but can’t find where to put the add_action to get this working.
Any ideas or future updates for this functionality?
Forum: Plugins
In reply to: [Plugin: WP Download Codes] Incomplete downloadsFinally got it working! Apparently on php5 incomplete downloads can still be a problem unless you flush each buffer read while in the loop. Here’s a cut n paste from php.net replacing the // Stream file section.
// Stream file $handle = fopen($dc_location, 'rb'); $chunksize = 1*(1024*1024); // how many bytes per chunk $buffer = ''; $cnt =0; if ($handle === false) { return false; } while (!feof($handle)) { $buffer = fread($handle, $chunksize); echo $buffer; ob_flush(); flush(); if ($retbytes) { $cnt += strlen($buffer); } } $status = fclose($handle); if ($retbytes && $status) { return $cnt; // return num. bytes delivered like readfile() does. } return $status;
Forum: Plugins
In reply to: [Plugin: WP Download Codes] Incomplete downloadsStill no luck here, running dc on wp292 and PHP version 5.2.9
Have tried several hacks on dc_download.php but nothing works.
Anyone? Anyone? Bueller?
Forum: Fixing WordPress
In reply to: Rich Text Editor problem in WordPress 2.1.2If by “rich text editing” you mean something to replace tinyMCE then try Google. I think Dean’s FCKeditor for WordPress might be okay for 2.1.2.
Forum: Fixing WordPress
In reply to: embedded videoYou could paste those embeds in via the code editor if you’re using WordPress 2.12. Or you could try the kmil flashembed or my Anarchy Media Player plugins. Both of these have a flash embed button in the rich text ‘html’ editor that will embed custom flash movies. You’d have to copy and paste the fvars though. They also embed using javascript which is now the preferred method for all IE7 embeds.
Bright Cove and peoplexchange both look interesting and I might just add them to the AMP automated embeds.
Forum: Fixing WordPress
In reply to: Rich Text Editor problem in WordPress 2.1.2Hi natkarthik,
Does your browser report any javascript errors in the editor?
From what I’ve seen most of these tinyMCE problems are usually due to caching, either your browser cache or server side proxy caching which can be a bit more difficult to clear.
Then there’s the browser specific errors where it works in firefox but not in explorer or vice versa. Could be cache or one of various bugs depending on what versions you’re running.
With wp 2.1.x though there’s also a new problem cropping up on some server/php combinations where realpath is undefined and tinyMCE file_get_contents throws an error. It’s mainly affecting plugins that load external buttons to the rte though but might also be a problem for some wp installs. This one is as yet unresolved but is in trac with a fix scheduled for wp 2.1.3 that could make a difference… hopefully.
The problem here is that tinyMCE is a moving target and while the upgrade to the version in wp 2.1 fixed a lot of problems and is a lot more refined than the version in wp 2.0 it’s still a work in progress.
Forum: Fixing WordPress
In reply to: File Upload LinksSame problem here with WP installed in sub directory, drag and drop leaves out the install directory although the ‘send to editor’ option works. There seems to be a bug introduced in version 2.02 as 2.01 drag and drop works.
Are there any workarounds for this yet?