smartyd
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: WordPress Video] validation errorWell, using advice from this site (https://www.sohtanaka.com/web-design/valid-xhtml-youtube-embed-code/) I got the page to validate, but I can’t get it to obey any height and width definition. Here is the stripped code that validates:
// Youtube Code define("YOUTUBE_REGEXP", "/\[youtube (:print:+)\]/"); define("YOUTUBE_TARGET", "<object type=\"application/x-shockwave-flash\" data=\"https://www.youtube.com/v/###URL###&fs=1&border=1&color1=0x2b405b&color2=0x6b8ab6\"><param name=\"movie\" value=\"https://www.youtube.com/v/###URL###&fs=1&border=1&color1=0x2b405b&color2=0x6b8ab6\" /></object>"); function youtube_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = YOUTUBE_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); return ($output); } function youtube_plugin($content) { return (preg_replace_callback(YOUTUBE_REGEXP, 'youtube_plugin_callback', $content)); } add_filter('the_content', 'youtube_plugin',1); add_filter('the_content_rss', 'youtube_plugin'); add_filter('comment_text', 'youtube_plugin'); ?>
I tried adding a “class” inside the object and defining the height and width in the CSS stylesheet, but nothing. Any ideas? Thanks
Forum: Plugins
In reply to: [Plugin: WordPress Video] validation errorThis is the Youtube plugin code:
// Youtube Code define("YOUTUBE_WIDTH", 260); // default width define("YOUTUBE_HEIGHT", 200); // default height define("YOUTUBE_REGEXP", "/\[youtube (:print:+)\]/"); define("YOUTUBE_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"https://www.youtube.com/v/###URL###&fs=1&border=1&color1=0x2b405b&color2=0x6b8ab6\" /><param name=\"allowfullscreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><embed src=\"https://www.youtube.com/v/###URL###&fs=1&border=1&color1=0x2b405b&color2=0x6b8ab6\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"###WIDTH###\" height=\"###HEIGHT###\"></embed></object>"); function youtube_plugin_callback($match) { $tag_parts = explode(" ", rtrim($match[0], "]")); $output = YOUTUBE_TARGET; $output = str_replace("###URL###", $tag_parts[1], $output); if (count($tag_parts) > 2) { if ($tag_parts[2] == 0) { $output = str_replace("###WIDTH###", YOUTUBE_WIDTH, $output); } else { $output = str_replace("###WIDTH###", $tag_parts[2], $output); } if ($tag_parts[3] == 0) { $output = str_replace("###HEIGHT###", YOUTUBE_HEIGHT, $output); } else { $output = str_replace("###HEIGHT###", $tag_parts[3], $output); } } else { $output = str_replace("###WIDTH###", YOUTUBE_WIDTH, $output); $output = str_replace("###HEIGHT###", YOUTUBE_HEIGHT, $output); } return ($output); } function youtube_plugin($content) { return (preg_replace_callback(YOUTUBE_REGEXP, 'youtube_plugin_callback', $content)); } add_filter('the_content', 'youtube_plugin',1); add_filter('the_content_rss', 'youtube_plugin'); add_filter('comment_text', 'youtube_plugin'); ?>
Anyone know what about this is not xhtml compliant?
Forum: Fixing WordPress
In reply to: How to create a different mouseover bkgd for each menu list item?Is this an example of what you’re looking for? Very cool, but I don’t know how to do it.
https://www.coastmusictherapy.com/oresearch.html (see bottom menu)Forum: Plugins
In reply to: How to do this invisible table-like menu?OK, looking at the source code, it appears to be frame based. Can I do this in WP?
Forum: Fixing WordPress
In reply to: Blog text position?I like your header, Jason. Now get some content on there!
Alchymyth’s answer solved my own question–or helped me solve my own. I wanted to indent the content of one particular post more than the others, so I just copied the padding code between divs in the post itself. Love it! See the post
https://www.theamazingagingmind.com/2010/life-is-but-a-dream/Forum: Fixing WordPress
In reply to: can i add a post with background imageA much simpler way to add a background image to any post is simply to add a div tag in the post itself.
For example, in this post I have the content wrapped between these tags:<div style="background: url(https://www.theamazingagingmind.com/wordpress/wp-content/uploads/2010/06/Claude-Monet-The-Blue-Row-Boat.jpg);"> </div>
Cheers
Forum: Fixing WordPress
In reply to: invalid markup problemWhat a relief! Thanks for the link. I went out into the world and ran a bunch of well-known sites on the w3c checker, and they all have tons of errors. But I shall be among the few with only a few thanks to you. : )
Forum: Fixing WordPress
In reply to: invalid markup problemIn looking over the list of invalid markups, it’s evident EVERYTHING I add to this site produces invalid markup: youtube, amazon associate, statcounter, all images!! Argh! Is this due to WordPress 3.0 bugs or what?
Never mind. Got the answer from another thread (stuck the object within div tags).
Glad you discovered your problem. Most of my plugins are causing problems, though they all work in all the browsers (?). I’m leaving them be for the time being, but need help with certain forbidden codes I’ve been using.
For all the embeded youtubes on my site, I want them centered (see https://www.theamazingagingmind.com/2010/harvie-krumpet-claymation-teaches-a-lesson-in-living/). They show as centered on three browsers I use, but the Validation site says I can’t do it the way I’m doing it. Currently, I’m just putting <center> </center> tags around the whole object code. Forbidden. How would I go about centering these objects correctly?
Thanks!Wow, I just checked mine too (190 erros!). Didn’t know you could check for such. Thanks for the link, esmi. I’m starting with index.php as I recognize one of the errors as being in that file. It helps to have the line numbers!
Forum: Plugins
In reply to: [Plugin: Smarter Navigation] What about query_posts?Got it. Changed to:
<div class=”alignleft”><?php previous_post_link(‘%link’, ‘%title’, FALSE, ’30’) ?></div>
<div class=”alignright”><?php next_post_link(‘%link’, ‘%title’, FALSE, ’30’) ?></div>Forum: Plugins
In reply to: [Plugin: Smarter Navigation] What about query_posts?My ‘main’ doesn’t have those lines. But here is my paginate.php which I assume is where I would want to make the changes:
<div id=”pnav”>
<div class=”alignleft”><?php previous_post_link(‘« %link’) ?></div>
<div class=”alignright”><?php next_post_link(‘%link »’) ?></div>
</div>
<?php } else if (is_page()) { ?>
<div id=”pnav”>
<?php link_pages(‘Page: ‘, ”, ‘number’); ?>
</div>
<?php } else { ?>
<div id=”pnav”>
<div class=”alignleft”><?php previous_posts_link(‘Previous Post’); ?></div>
<div class=”alignright”><?php next_posts_link(‘Next Post’); ?></div>
</div>
<?php } ?>Where would I put the category I don’t want to be included in the “previous” and “next” links?
(See how the navigation works when calling up a single page on https://www.theamazingagingmind.com)
Thanks!Forum: Fixing WordPress
In reply to: WP edits not recognizedCorrect. I’d like it to show one full post and then excerpts for the rest. I think it was you, esmi, who suggested the line
<?php $i = 0; while (have_posts()) : the_post(); $i++; ?>
as a way of doing this. It worked for a while, but now it doesn’t anymore. Did I change it in the course of editing other stuff? Do you have any clue why it doesn’t work anymore?
ThanksForum: Fixing WordPress
In reply to: WP edits not recognizedThe url. Right.
https://www.theamazingagingmind.com