23. February 2012, 10:11
Okay, this cost me a lot of time and nerves.
Todo:
Videos coming from vimeo, they must be played in jwplayer. There must be a preroll ad, the URL to this video ad contains a 10-digit random number, which is the reason why I cannot use a config.xml file but have to configure it inline. And, to make it just a bit harder, I was asked to use the javascript API instead of the <embed> tag.
Problem:
The documentation is... well, it's not good. There are plenty of good examples for the <embed> tag version, but close to none for the javascript API. Additionally I asked for help in the jwplayer forums and the result was a very uninterested, uninformed reply. The person seemed to have a hard time following my description, demanded a link to an implemented version, blamed my video ad url, and finally, when he understood my problem, this: "Go post in the OVA plugin forum". Let me point out that it took 3 days for this 'advice' to come forth...
Solution:
The OVA Plugin Forum was very helpful, the answers were quick and competent, within a short amount of time I managed to make it work. Here is a complete example script:
-
<div id="container">Loading...</div><script type="text/javascript">
-
jwplayer('container').setup({
-
'width': 500,
-
'height': 300,
-
'file': 'http://player.vimeo.com/external/123456.sd.mp4?s=858afaac8eebccc7acb544e998799a3d',
-
'skin': 'jwplayer/bekle.zip',
-
'plugins': {
-
'jwplayer/ova-jw.swf': {
-
'ads': {
-
'notice': { 'textStyle': 'smalltext' },
-
'filterOnLinearAdMimeTypes': false,
-
'schedule': [
-
{
-
'zone': '47',
-
'position': 'pre-roll',
-
'server': {
-
'type': 'direct',
-
'tag': 'http://www.adververdomain.de/video?[<?php echo rand(1000000000, 9999999999); ?>]'
-
}
-
},
-
{
-
'zone': '48',
-
'position': 'auto:bottom',
-
'width': 320,
-
'height': 80,
-
'startTime': '00:00:02',
-
'duration': '5'
-
}
-
]
-
}
-
},
-
'sharing-3': {
-
'link': '<?php echo $_SERVER['PHP_SELF']; ?>'
-
},
-
'fbit-1': {
-
'link': '<?php echo $_SERVER['PHP_SELF']; ?>'
-
},
-
'plugins': {
-
'gapro-2': {}
-
}
-
},
-
'modes': [
-
{type: 'flash', src: 'jwplayer/player.swf'},
-
{type: 'html5'},
-
{type: 'download'}
-
]
-
});
-
</script>
Thanks again for competent and friendly help in the OVA Plugin forum!
13. February 2012, 13:45
If $.ajax and $.post don't return any value only in Safari, it might be a path problem.
http://www.domain.de/path/to/ajax.php - didn't work with Safari
/path/to/ajax.php - works with Safari as well!
1. February 2012, 11:27
If you set debug to true in wordpress, you might get a notice that wp_register_script or wp_enqueue_script was called incorrectly. The solution to this is to not call these functions directly but wrap them in an action:
Before:
-
if ( !is_admin() ) {
-
wp_deregister_script('jquery');
-
wp_register_script
('jquery',
("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"),
array('jquery'));
-
wp_enqueue_script('jquery');
-
}
After:
-
if ( !is_admin() ) {
-
add_action('wp_enqueue_scripts', 'enqueue_scripts');
-
}
-
-
function enqueue_scripts() {
-
wp_deregister_script('jquery');
-
wp_register_script
('jquery',
("http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"),
array('jquery'));
-
wp_enqueue_script('jquery');
-
}
And the notice is gone!
1. February 2012, 09:18
After migrating to another server, the downloadmanager plugin suddenly didn't show anything but the categories. The data were still available in WordPress, only they weren't showing on my page any more. This happens to many plugins after a server migration: nextgen, contactform7, wp-downloadmanager. Reason is the config data are serialized and after you change the paths of your mysql dump the data are no longer correct. The solution is to manually copy all relevant data from the old source to the new one, in this case: copy all empty Download Templates and change the path manually.
31. January 2012, 11:02
If I fetch my wordpress data with get_post, then post_content is unformatted. nl2br doesn't really help, but there is a better solution:
-
$p = get_post($id);
-
apply_filters('the_content', $p->post_content);
I just LOVE WordPress!
26. January 2012, 10:37
It took me a really long time to find out how to use the JW Player with the OVA Plugin, using the JW Embedder. So finally, this is the solution:
-
jwplayer("container").setup({
-
'flashplayer': "player.swf",
-
'width': 700,
-
'height': 400,
-
'file': 'video.mp4',
-
'plugins': {
-
'ova-trial': true
-
},
-
config: 'config.xml'
-
});
So easy... once you know it...
19. January 2012, 10:20
ContentFlow is a nice tool, but it seems that version 1.0.2 is not quite finished. Images disappeared, meaning that instead of one or more images there was just an empty DIV. After refreshing the page the image was displayed correctly. Of course I cannot ask visitors to refresh until all images are visible, so I googled the problem and realized: there is an older version that works a lot better:
ContentFlow 1.0.0
18. January 2012, 17:57
After transferring a project from server A to server B, suddenly the nextgen config data disappeared. The galeries on the page itself were no longer working, instead of a slideshow there were all images displayed without a style.
Obviously one field is not transferred correctly. To solve this problem, find an entry in wp_options where option_name = ngg_options. Copy option_value from your old database and paste it to the new one. This did the trick for me.
13. January 2012, 10:04
Possible causes:
1. Missing domain.
Even if it doesn't seem necessary - always enter a domain.
2. Sandbox Mode
Page Admins can see Apps even if they are in sandbox mode. If those page admins aren't app admins or testers though, they might just get this facebook error. I spent a lot of time looking for this problem until I realized one of my clients was only a page admin and tried to test the app prematurely.The solution to this is, of course: make page admins app admins/testers.
21. December 2011, 10:50
Internet Explorer doesn't handle transparent PNGs well. Up until about now I wasn't aware though that there can be problems with other Internet Explorer versions as well. I discovered that my transparent PNGs had a huge black border for no apparent reason.
Obviously that's jquery's fault - as soon as you work with the hide/show functions, this particular phenomenon can happen. So far I didn't find the time to carefully look up my problem and maybe find a better, more elegant solution. So far I solved the problem by saving the images in question as jpg or PNG in 8-bit mode. Or, if none of that helps, I found alternatives to the jquery functions.