Embedding a YouTube or Vimeo video in your slider – Themes & Co

Embedding a YouTube or Vimeo video in your slider – Themes & Co. Well, now that Responsive is running, it would be so cool to make this look like AirBNB or Twitter and have a video running in a slider. How cool is that.

Turns out it is a little bit harder to do that I thought. Nicholas posted just yesterday something that goes into functions.php (you can copy the functions.php from the customizr class and put it into the child class). But cool!

The Forbidden Kingdom (aka the Monkey King retold)

_Sorry for the strange post yesterday, WordPress configuration error in wp_config.php_

“The Forbidden Kingdom”:http://imdb.com/title/tt0865556/ (功夫之王 gong1 fu1 zhi1 wang2 or Kung Fu’s King) is now showing. Its a rip off of the Monkey King (“孙悟空”:http://en.wikipedia.org/wiki/Sun_Wukong sun2 wu3 kong4) from Journey to the West (“西游记”:http://en.wikipedia.org/wiki/Journey_to_the_West xi1 you2 ji4,lit. western travel story). Made me really nostalgic for China. Half the audience was Chinese. A terrific show even if not very accurate. But, Jet Li (“李连杰”:http://en.wikipedia.org/wiki/Jet_Li li3 lian2 jie2)was awesome and rather than being kind of a stupid “chink” parody (I can say that!), Jackie Chan (“成龙“:http://en.wikipedia.org/wiki/Jackie_Chan cheng2 long2)was funny but good.

Great action scenes and of course, “Liu Yi Fei”:http://imdb.com/name/nm1703577/ (”刘亦菲”:http://en.wikipedia.org/wiki/Liu_Yifei” liu4 yi4 fei1)was the tough chick in the flick and “Li Bing Bing”:http://imdb.com/name/nm0508356/ (“李冰冰”:http://wiki.d-addicts.com/Li_Bing_Bing” li3 bing1 bing1) was a great evil chick 🙂 !

WordPress not displaying Chinese correctly

I thought it was Scribefire, but it looks like “WordPress”:http://wordpress.org/support/topic/124544 has a configuration problem in displaying Chinese correctly. Apparently, with “Fantastico”:http://codex.wordpress.org/Upgrading_WordPress_Extended#Special_note_for_Fantastico_Upgrades there are two lines int he wp-config.php file for DB_CHARSET and DB_COLLATE that have to be removed. This seems to apply to WordPress 2.2 but my new WordPress 2.5 had this problem as well, so I deleted those two lines.

“Leeping Loon”:http://leepingloon.com/?p=13 has a completely different fix that has to do with the SQL Database. You have to change the SQL Data collation setting to UTF8-UNICODE-CI and you then go to phpMyAdmin and change the collation settings.

Zenphoto

_MG_1173_4_5_tonemappedOK, finally flopped Nextgen Gallery for ZenPhoto even though I can’t get the widget to work. But, let’s try integration. First, you should see a “Photos”:http://tongfamily.com/zenphoto button now at the top. You do need a password to see anything though 🙂

But to get it to actually integrate into the blog is the trick. First there is actually putting an image from ZenPhoto into WordPress. This isn’t quite photoblogging, but is somewhat useful. You can either hack around looking for the address or use Zenphotopress to do this as you can see above. The nice thing about Zenphotopress is that it shows you thumbnails of what you want to see.

_MG_1173As an aside the first image is an HDR image that is a combination of three exposures using Photomatix. And then you have the photo as it was originally.

WordPress Widgets

Quick review of widgets and WordPress. BTW, does anyone think the WordPress 2.5 is confusing compared with 2.3? sticking the really important plugins and settings to the right to be confusing and there are so many entries under Manage it makes no sense to me.
h2. Thumbs up:

* WordPress Auto Update. Hey every program should have this. It automatically finds and updates your WordPress

h2. Thumbs down

* IM online. This is supposed to figure out what is online and what is not. Always says don’t know and really slows the site down. A common problem judging from the comments on the WordPress extensions. I deleted it. Too bad, having one place to see that you are online would be really useful.

* Nextgen Gallery. This is actually a wonderful program, just lacks the ability to password protect hierarchically. Some templates don’t work with its widgets.
* PHP Gallery. I’ve used before, but the integration with WordPress just seems broken.

h2. Don’t know yet

* Multiblog WordPress. Eventually I’ll need this, but right now by default each WordPress is its own installation and needs it own maintenance
* ZenPhoto. Seems to be working well right now, but we’ll see. Has the features, but can’t get the integration with WordPress to work right. Seems to require lots of open passwords for things like ZenLatest Post.

WordPress Automatic Upgrade

Wow, this http://wordpress.org/extend/plugins/wordpress-automatic-upgrade/ is just so cool. Upgrades WordPress automatically. I had 2.3 and wanted to get to 2.5 and it just did it!

It also upgrades automatically the plug ins that I have. WordPress does use lots and lots of plugins so this is really convenient. Should really be a part of WordPress IMHO

Lost my old site…

WordPress seems to hide old files of mine, so although I have my complete MovableType site, when I type for instance “http://tongfamily.com/mt.index.php”:http://tongfamily.com/mt.index.php, even though the file is there, I get a 404 not found. This seems to a problem with rewrite rules as changing thename to mt.index.html lets you see the file fine.

In looking at .htaccess, I see WordPress has done some rewriting:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

So off to figure out what this all means,

“RewriteBase”:http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteBase tells Apache that no matter how you came into with whatever URL, you should just assume you came in at the root of the website. So if you came in a http://tongfamily.com/foo, it rewrites it to http://tongfamily.com/

“RewriteCond”:http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond seems pretty straightforward, it says when does a rewrite happen, if the filename requested that is the full local filesystem path name where ! means not an -f means where the coming file isn’t a regular file or a !-d means or is not a directory. If that is true, so you can’t find it as either a file or directly, then

“RewriteRule”:http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteRule says take . which is any single character and rewrite it to /index.php and the L means that this is the last rule so you can stop preprocessing.

Nextgen Gallery

With a hoster that provides a nominal 1.5TB in storage, it sure is tempting to put some photos up. In experimenting, Nextgen Gallery seems popular with WordPress and it seems to work (unlike Gallery which doesn’t). Here are some photos. Main thing I haven’t figured out is how password protection works but I think you have to hack around with .htaccess. Also, the widget doesn’t interact correctly with cutline theme.

Finally, it is a little confusing, but to actually make a gallery, you need to add certain things in [brackets]. The http://wordpress.org/extend/plugins/nextgen-gallery/faq/ is the only place that explains what they are.

The biggest bug I’ve run into so far has to do with how permissions are created. It looks like some FTP uploaders like Cyberduck likes to create folders with 600 permissions, but then Apache can’t access the files, so you want things as 644 on them. Another problem is that by default a newly created gallery has no preview image, so you think it isn’t working, but you have to manually select it.

Aloso unless you look at the code, it is unclear what a gallery is (this confusing is what most people call an album, that is the lowest level thing that holds photos while an album has a collection of galleries. There are a bunch of other erros that http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/faq/ has documented. The basic issue is that these [bracket] things have to have a Page Link to so that it knows where to look to replace the [bracket] junk like with the gallery number there.

The pragmas are list here. BTW there are *no spaces* in all of this, jam all the words together with the letters.

For a slideshow :
For a album : [album=id,extend] or [album=id,compact]
For a gallery :
For a single picture : [singlepic=id,width,height,mode,float]
For a image browser : [imagebrowser=id]

Then if you load the way cool viewers called SimpleViewer and ThickViewer, you can add

[simpleviewer=id,width,height] which puts the simpleview inline
[simpleviewer=id,width,height,*&amp;amp;lt; img src=”image.jpg” /&amp;amp;gt;*] is the magic to get a popup

To show a gallery inside the TiltViewer enter the follow code :

[tiltviewer=id,width,height,*text or link*]