CodeAndReload
Forum Replies Created
-
Glad you got it working!
The editor is adding [flashgame] shortcode.
If you’re using that shortcode ([flashgame]), you are using the version from your theme (1.5), so you probably haven’t actually rendered any output from 1.6 and 1.6’s functions never fire.
As for why it works in Firefox with that missing argument (if it does), I’m not sure. I assume that the browser is being more flexible that it currently is.
Upgrading to 1.6 still wouldn’t hurt, especially if you intend to use flashvars.
I just change the mc to tigu. I would be grateful if you could identify what is wrong here:
I think it would be alot easier to do that again with 1.6.
With your code defined and swfobject installed (if both are installed), I’m not going to try to predict if the editor is adding [flashgame] shortcodes or [swfobject] shortcodes.
The express-install issue is one I explicitly, changed from 1.5 to 1.6 along with proper support for flashvars.
I strongly recommend against including it in a theme like that, for this very reason, that your code will become out of date very quickly.
That is strange.
You don’t have an old version of the plugin somehow active do you?
There is supposed to be an argument between the swf-version and the flashvars that isn’t there.
I just checked the trunk and tag for 1.6 and it should be outputting that argument.
Line 275 of wp_swf_shortcode.php should be printing that argument.
$sw .= ‘, “” ‘;
Try deleting any older versions you have installed and 1.6 and reinstall 1.6 .
Can you be more specific in what isn’t working?
Do you mean the swf isn’t appearing and there is a message? Can you inspect the page in firebug, and take a screenshot of the script, and the div embed object?
You don’t have a plugin enquing a different version of swfobject do you?
Also are you getting any errors in the Javascript console?
It like all the other plugins in the WordPress official repository is licensed under a GPL license.
I’d recommend having your theme check to see if the plugin exists and is up-to-date via wp-cron, than get it from the official WordPress repository over including it directly in a theme, to make it easier to update as the SVN gets updated, especially if you do not want your theme to be GPL.
I don’t know what you’re using for a second wysiwyg editor, but it appears that however it is inserting content onto the page it is not parsing shortcodes.
Do any shortcodes work in the wysiwyg?
If not: see the do_shortcode function in the docs here: http://codex.wordpress.org/Function_Reference/do_shortcode .
I’d ask for shortcode support for however you have a second wysiwyg whether it is a theme or plugin, or look to see if the plugin or theme your using has any way to add a custom filter that will pass it through do_shortcode() and return the results.
Forum: Plugins
In reply to: [Nice Quotes Rotator] [Plugin: Nice Quotes Rotator] FailThe most common problem that causes that is blank quote(s) entered by the user.
Line A
Line B
Line CThis has 3 lines.
Line A
Line B
Line C
This has five lines, two of which are blank.
Make sure when you enter them that each carriage-return is a new quote.
Also make sure that if you are rotating links from a link-category that there is a link in that category, or that if you are rotating excerpts from posts that you have a post with an excerpt.
That should be the only thing necessary, provided the the_content filter (mc_content) function runs, the post has a mime-type of ‘application/x-shockwave-flash’, it is not a feed (is_feed() is false)
Some things to check:
- the_content filters are being applied
- Nothing is changing the_content as it is filtered after mc_content is run, maybe a plugin is changing the content after mc_content is run
- the media’s mime-type is “application/x-shockwave-flash”
- is_feed is false
- the $post global is initialized and is correct, perhaps a plugin is changing the $post global?
A filter is applied early to the_content:
add_filter( "the_content", "mc_content", -9999999999999999999);And when the filter is called on an attachment-page (attachment.php) the post object’s mime-type should be “application/x-shockwave-flash” then the filter should add that stuff
function mc_content ($content) { global $post; if (true && is_feed() && trim($post->post_content)) { global $post, $shortcode_tags; $tempElem = $shortcode_tags["swfobject"]; unset($shortcode_tags["swfobject"]); $contentA = strip_shortcodes( $post->post_content ); $shortcode_tags["swfobject"] = $tempElem; $content = do_shortcode($contentA); return $content; } elseif(is_feed()) { return $content; } <strong>elseif (get_post_mime_type( $post->ID )=="application/x-shockwave-flash"){ return "" . mc_swf_shortcode( null, $post->ID) . "<p>" .$post->post_excerpt ."</p><p>" .$post->post_content ."</p>"; }</strong> else return $content; }Here is a live example, so I know it does work on an attachment page.
http://codeandreload.com/post/gear-generator/gear-generator/WordPress does have functions to check the post’s mime type, and a way to treat a string as if it had been run through all the shortcodes.
if (get_post_mime_type( $the_posts_ID )=="application/x-shockwave-flash"){ echo do_shortcode("[swfobject]$the_posts_ID[/swfobject]"); }The above code should work as a kluge, but It would be nice to know why it isn’t working. You’ll need to change ‘$the_posts_ID’ with the post’s id.
[Please post code snippets between backticks or use the code button.]
There isn’t any need to. The Flash object is automatically inserted onto the attachment pages with the parameters specified on the attachment.
This should be fixed in the newest version.
IE for some reason did not like the last comma if there are arguments, and there is a workaround in the newest version.
Forum: Plugins
In reply to: No Testimonial Plugins are working!Try unzipping the plugin on your local machine, and upload the files to its own directory in your ‘wp-content/plugins/’ directory on the server.
If that works, then you may need to change the permission on your wp-content/plugins folder so that WordPress can store plugins on the server by uploading them through your browser.
Forum: Plugins
In reply to: No Testimonial Plugins are working!Is the wp-content/plugins directory writable by the web-server?
Can you auto-install any other plugins?
Forum: Plugins
In reply to: [Nice Quotes Rotator] [Plugin: Nice Quotes Rotator] 3 issues with WP 3.1.3Mark, The plugin is best used for quote rotation not a static quote. You could rotate a single quote, and that quote could be a shortcode, but that kinda defeats the purpose.
As for an quote/excerpt manager, I don’t really know of any, although I am leaving some suggestions in your other thread.
Forum: Plugins
In reply to: Looking for just the right Quotes pluginThis doesn’t seem like it should be something that hard to write, if you decide to write your own code.
Personally what I would do would be to create a post-category (so that an archive and RSS feed appears) for your quotes.
The widget would simple query and display the latest published quote. As posts/quotes with a ‘future’ status become published they should appear in your widget as the latest quote.
You can also create your own post-type for quotes, so they don’t appear with the rest of the posts in your main RSS feeds etc.
Forum: Plugins
In reply to: [Nice Quotes Rotator] [Plugin: Nice Quotes Rotator] 3 issues with WP 3.1.3Dirk,
Thanks for the comment. I really do appreciate the bug report.
Nice Quotes has been updated to version 0.9 with these fixes:Nice Quotes Issue 1: fixed the way you suggested.
Admin Page Issue 1: Defined $my_string as a null-string at the top of the function, in case I want to return something at a later date.
Admin Page Issue 2: is fixed by defining <u>labelStart</u>, and <u>labelEnd</u> as a null-string at the start of the function. These fields are for labels that are included with checkboxes and radio buttons, if it is not a checkbox or radio button it should be a null-string.
I also decided to increase the size of the textarea for quotes. Hopefully that will make it easier to add quotes; after using it for a while, I realized the default size in the DOM isn’t a practical size.