Hi GF,
I’m afraid I’m not getting very far with your advice – I think it might be a little beyong my knowledge level right now.
I just inserted the following code inside the <div id=”bannerWrapper”> </div> section at the bottom of sidebar-right.php in my theme:
<?php
$localizedGroup = "aark_sponsors_" . qtrans_getLanguage();
wp_bannerize( "random=1&limit=10&group=" . $localizedGroup ) );
?>;
However, this created the error “Parse error: syntax error, unexpected ‘;’, expecting T_PAAMAYIM_NEKUDOTAYIM in /home/amphibia/public_html/wp-content/themes/amphibian-ark/sidebar-right.php on line 163” when I loaded the site, so I removed it again.
I also added the following code at the top of functions.php in my theme:
/**
* Shorthand per qTranslate
*
* @param $a
* @param $b
* @param $c
* @param $d
* @return string|void
*/
function __qtrans_getLanguage($a,$b) {
return __("<!--:en-->$a<!--:--><!--:es-->$b<!--:--><!--:de-->$c<!--:--><!--:pt-->$d<!--:-->");
}
I currently have 4 jpg images, called aark_sponsors_en.jpg, aark_sponsors_es.jpg, aark_sponsors_de.jpg and aark_sponsors_pt.jpg All of the images are located in the /wp-content/uploads/2010/08 folder
Should I be replacing the $a, $b etc. above with aark_sponsors_en.jpg, aark_sponsors_es.jpg etc?
In wpBannerize I currently have a banner called AArk staff sponsors with the key right_sidebar, and it currently links to the aark_sponsors_en.jpg file
However, the part of your instructions that I’n mot quite sure about is:
So you could use the “group key” parameter to separate the different banner.
1) Add your “English” banner in “adv-en” group
2) Add your “Spanish” banner in “adv-es” group
How do I use the group key parameter? If I switch from the widget method to the function method, will I need to have functions for all the banners I use? If so, I think this might become too problematic for me.
I really appreciate your help and I’m happy to give you a temporary access to my server if that would help. If you email me at [email protected], I’ll send you a temporary login.
Thanks again,
Kevin