<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: WPG2 &#38; Shadowbox</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: WPG2 &#38; Shadowbox</description>
<language>en</language>
<pubDate>Tue, 24 Nov 2009 04:22:15 +0000</pubDate>

<item>
<title>grosbouff on "WPG2 &#38; Shadowbox"</title>
<link>http://wordpress.org/support/topic/238616#post-999963</link>
<pubDate>Fri, 27 Feb 2009 11:41:20 +0000</pubDate>
<dc:creator>grosbouff</dc:creator>
<guid isPermaLink="false">999963@http://wordpress.org/support/</guid>
<description>&#60;p&#62;In a JS file that call from functions.php in my theme :&#60;/p&#62;
&#60;p&#62;FUNCTIONS.PHP&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if (!is_admin()) { //so it&#38;#39;s not loaded in the admin part
	add_action(&#38;#39;wp_head&#38;#39;, &#38;#39;myOwnTheme_css&#38;#39;);
	add_action( &#38;#39;wp_print_scripts&#38;#39;, &#38;#39;myOwnTheme_init&#38;#39; );
}
function myOwnTheme_css() {
//echo style here if you want to
}

function myOwnTheme_init() {
		wp_register_script( &#38;#39;myscripts-wp&#38;#39;, get_template_directory_uri().&#38;#39;/js/javascript.js&#38;#39;, array( &#38;#39;jquery&#38;#39;), &#38;#39;1&#38;#39; );
		wp_enqueue_script( &#38;#39;myscripts-wp&#38;#39; );
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;/JS/JAVSCRIPT.JS :&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$(document).ready(function() {
		/*SHADOWBOX + WPG2*/
		$(&#38;quot;.wpg2tag-image a&#38;quot;).attr(&#38;#39;rel&#38;#39;,$(&#38;quot;.wpg2tag-image a&#38;quot;).attr(&#38;#39;rel&#38;#39;)+&#38;#39;;player=img&#38;#39;);
}&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>supergab on "WPG2 &#38; Shadowbox"</title>
<link>http://wordpress.org/support/topic/238616#post-995999</link>
<pubDate>Mon, 23 Feb 2009 23:10:15 +0000</pubDate>
<dc:creator>supergab</dc:creator>
<guid isPermaLink="false">995999@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Where exactly do you add this line ?&#60;/p&#62;
&#60;p&#62;Many thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>grosbouff on "WPG2 &#38; Shadowbox"</title>
<link>http://wordpress.org/support/topic/238616#post-969780</link>
<pubDate>Thu, 29 Jan 2009 10:37:46 +0000</pubDate>
<dc:creator>grosbouff</dc:creator>
<guid isPermaLink="false">969780@http://wordpress.org/support/</guid>
<description>&#60;p&#62;This is just for me to remember...&#60;br /&#62;
But I found a way to make WPG2 work with Shadowbox (using jquery).&#60;br /&#62;
There are two problems :&#60;br /&#62;
1) changing rel=&#34;lightbox[x]&#34; attribute to rel=&#34;shadowbox[x]&#34; : not really necessary because shadowbox understands makes it compatible.&#60;/p&#62;
&#60;p&#62;2) gallery generates php images.  Shadowbox thinks that it has to show a web page and so the size of the box is not the size of the picture.&#60;br /&#62;
So we have to tell it it's a picture.&#60;br /&#62;
To do it; we have to add &#34;;player=img&#34; to the rel attribute.&#60;/p&#62;
&#60;p&#62;SOLUTION (one line !)&#60;br /&#62;
$(&#34;.wpg2tag-image a&#34;).attr('rel',$(&#34;.wpg2tag-image a&#34;).attr('rel')+';player=img');
&#60;/p&#62;</description>
</item>

</channel>
</rss>
