Wordpress Image Gallery Using External Images - wordpress

I would like to know of any known image or video gallery plugins that use external media sources instead of having to upload via wordpress media library.
Worst case, is there a plugin that can performed a scheduled / updates only import from a file server?
Thanks in advance!

You can use the following code jointly with ImageZone.
With ImageZone you can collect external images and share them, while the code will render them into html. The code looks like:
// where do you want to add the gallery
<div id="GalleryId"></div>
<style>...</style>
// this is generated by imagezone
<script type="text/json" id="GalleryId">...</script>
<script type="text/javascript">
function setup(gid){
}
setup("GalleryId");
</script>
and you could make it a wp shortcode

Related

prettyphoto media wordpress plugin opening the image as a url not in popup box

I'm working in wordpress with twitter bootstrap theme.i want to use prettyphoto media wordpress plugin to show my newsletters but when i clicked on any image its opening it as a url not in popup box. i have used it before in my another wordpress sites and its working fine but not now.
Here is my code to open an image:
<img src="http://projects.flashonmind.com/hoppworldwide/wp-content/uploads/2013/10/mar01.jpg" alt="This is the title" />
When i have checked the console in mozilla its showing that $(...).prettyPhoto is not a function.
Actualy there are two scripts in my full width template which i have used for some menu content when i remove these scripts its working fine but i have to use these script so where i have to put my scripts now here are the scripts:
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script>
$(document).ready(function(){
$(".sec-menu").mouseover(function(e) {
$("#my-account").css("display","block");
});
$(".sec-menu").mouseout(function(e) {
$("#my-account").css("display","none");
});
});
</script>
Please include jQuery => 1.8.3 on your theme header to use prettyPhoto.

Loading javascript conditionally in Wordpress functions.php

I created a child theme of the TwentyTwelve theme in Wordpress for my photography website.
In the photo gallery pages, clicking on a thumbnail image either triggers Fancybox or Photoswipe, depending on the screen size (if <500px Photoswipe is used as it's probably a mobile device).
For better performance I would like to load only the required javascript, Fancybox or Photoswipe, but not both of them.
I'm not using plugins for Fancybox/Photoswipe but load them in the child theme functions.php using wp_enqueue_style and wp_enqueue_script
the choice between Fancybox/Photoswipe is made in another javascript file, also enqueued in functions.php: according to the result of jQuery(window).width(); it triggers either Fancybox or Photoswipe on certain elements:
jQuery(document).ready(function() {
windows_size = jQuery(window).width();
if( windows_size > 500) { // Load Fancybox
jQuery(".brick a").fancybox({
[...]
else { // Load Photoswipe
jQuery(".brick a").photoSwipe({
[...]
I cannot use any of the WP functions like is_page(...), as both scripts are fired on the same page
I don't know if it would be possible, using Wordpress, to load all required files for Photoswipe (js and css) in the javascript above
I'd rather not use the user-agent to detect a mobile device
I searched on Google and on StackOverflow but couldn't find any answer specifically related to Wordpress and this situation.
Thanks for your help.
I saw this the other day, and it looks like he's trying to do the same thing as you -- "How to load JavaScript conditionally with media queries in WordPress":
http://blog.logo24.com/2013/07/23/javascript-media-queries-wordpress/
His solution is JavaScript, rather than PHP, and comes with some caveats.

use javascripts objects into a wordpress theme

I save an html page that has an image rotator that work by using javascript, and after I save it work correctly.
I convert this html page to a wordpress theme but the rotator don't work anymore.
what's the problem?
please help me.
Wordpress insert embeded jquery script using wp_enqueue_script.
Check that jQuery inserted just one time in your theme! You can disable auto insertion by adding this code in function.php file:
wp_deregister_script('jquery');
and take a look at this.

How to configure MediaElements.js plugin to load JS files in WordPress footer?

I have been tearing my hair out trying to move all the JavaScript files from the header to the footer in a WordPress blog I am working on.
Currently I am trying to configure MediaElements.js plugin. I am trying to load all the plugin's JS files in the footer.
I've discovered that the mejs_add_header() function in the mediaelement-js-wp.php loads the javascript and css.
function mejs_add_header(){
$dir = WP_PLUGIN_URL.'/media-element-html5-video-and-audio-player/mediaelement/';
echo <<<_end_
<link rel="stylesheet" href="{$dir}mediaelementplayer.min.css" type="text/css" />
<script src="{$dir}mediaelement-and-player.min.js" type="text/javascript"></script>
_end_;
}
The Javascript isn't being loaded using the WordPress enqueue_script() function. Instead of making changes to this file, is there a way of configuring the plugin to load JS file in the footer?
Appreciate any help.
Haven't heard about that plugin before, but try this somewhere in your functions.php:
remove_action('wp_head', 'mejs_add_header');
add_action('wp_footer', 'mejs_add_header');
And if that doesn't work then try looking for where and how that function is being called.
~ K

How can I set the main theme-font dynamically, in WordPress

I have created a theme where I already have a custom options page where I let the user set text for footer, twitter user and some other things and that works well.
Now i'd like to add the functionality of letting the user that installed the theme select which font that should be used for content on the site. How can i accomplish this? I can probably create a php file that outputs something like:
<style type="text/css">
body{
font-family: <?php echo get_option('my-font');?>;
}
</style>
and include that file in header.php, but that means that I have to hit php for every request for this css and I want to avoid that if posssible.
Actually, I'd recommend placing that code directly in your header.php file. You'll already be parsing PHP code, so there's no reason you can't parse that get_option() request at the same time. I've used a similar system to generate a random header image on each page load based on WordPress options before as well.
For one theme I built, there were CSS options aplenty, so I decided to generate static CSS files when the user made changes. To get around caching, I would store the timestamp of the last update, and echo it out as a parameter in the CSS URL;
<link rel="stylesheet" type="text/css" href="/path/to/generated/css.css?ver=<?php form_option('theme_name_css_timestamp'); ?>" />

Resources