xiyangchou
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Virtue] Add Social Icons in Virtue Theme.topbar-widget .virtue_social_widget a { width: 30px; }
Forum: Themes and Templates
In reply to: [Virtue] Add Social Icons in Virtue ThemeI’ve done this to make the icons bigger, however the hover affect on the right side of the icons is non-existant. I can’t figure out how to center the icons in the . Any clues? I’m using font-size:22px;
Forum: Themes and Templates
In reply to: [Virtue] Add Social Icons in Virtue ThemeI’ve done this to make the icons bigger, however the hover affect on the right side of the icons is non-existant. I can’t figure out how to center the icons in the . Any clues? I’m using font-size:22px;
Here’s the basic idea:
you can get the thumbnail for the video by using this address:
https://img.youtube.com/vi/VIDEOIDGOESHERE/0.jpg (can also use 1.jpg, 2.jpg or 3.jpg)what I did was this:
$output = get_the_content(); $output = str_replace("https://www.youtube.com/watch?v=", "", $output); <p><a class="lbpModal" href="https://www.youtube.com/embed/'. $output .'?wmode=transparent&fs=1&hl=en&modestbranding=1&loop=0&iv_load_policy=3&showsearch=0&rel=0&theme=dark"><img class="video" src="'. get_bloginfo('template_url') .'/img/video.png" /></a><img class="videoPicture" src="https://img.youtube.com/vi/'. $output .'/0.jpg" />';
I created an image to overlay on the thumbnail so you knew it was a video and tweaked that with css. This code loads the video image I made and the youtube thumbnail and the link is a property of the video image. The
<a class="lbpModal">
is whatever class you set your secondary lightbox settings to be.Forum: Fixing WordPress
In reply to: [Plugin: Flickr Gallery] Use external lightbox/fancybox?with a little messing around in the code, you can get it to generate the necessary rel=”lightbox” for every image. Make sure you turn off the lightbox option built into the gallery. You can make this work (but as Dan said against Flickr’s TOS). I’ve found a way to do it though and I don’t know a whole lot about js.
ok…you know what…this code bites and I’m a total noob…
I would like to know your solution daljirman. Otto…maybe you could help me out. Here is my code so far. Each filter will work on its own, but I’m trying to get them both to operate at the same time.
<?php // Youtube function wp_youtube() { $video = get_the_content(); $video = preg_replace('#\[video\]https://www.youtube.com/watch\?v=(.*?)\[/video\]#i', '<object type="application/x-shockwave-flash" data="https://www.youtube-nocookie.com/v/\\1&rel=0"><param name="movie" value="https://www.youtube-nocookie.com/v/\\1&rel=0" /><param name="wmode" value="opaque" /></object>',$video); return $video; } function wp_youtube_filter() { return wp_youtube(); } $filter = wp_youtube_filter; // Google function wp_google() { $video = get_the_content(); $video = preg_replace('#\[google\]https://video.google.com/\[/google\]#i','<p>Hello</p>',$video); return $video; } function wp_google_filter() { return wp_google(); } $filter = wp_google_filter; // excecute filter function all_video_filter() { return $filter; } add_filter('the_content', 'all_video_filter' ); ?>