StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have -- and this forum will be removed on July 1st, 2013.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-17-2010, 12:52 AM
Grant R Brown Grant R Brown is offline
Registered User
Pro Plus Member
 
Join Date: May 2009
Posts: 25
Default Feature Content Gallery Plugin

Hi,

I am currently using the FeaturedContentGallery.com plugin. The script files are pretty big and putting a lot of load on my hosts GPUs. This scripts are only used on the homepage where the the content gallery is but the plugin is inserting them on every page. I found the code that inserts them and am trying to change it to only display on the homepage. Heres the code:
`
function gallery_styles() {

/* The next lines figures out where the javascripts and images and CSS are installed,

relative to your wordpress server's root: */

$gallery_path = get_bloginfo('wpurl')."/wp-content/plugins/featured-content-gallery/";

/* The xhtml header code needed for gallery to work: */

$galleryscript = "

<!-- begin gallery scripts -->

<link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css.php\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/>

<link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/>

<script type=\"text/javascript\" src=\"".$gallery_path."scripts/mootools.v1.11.js\"></script>

<script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.js.php\"></script>

<script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.transitions.js\"></script>

<!-- end gallery scripts -->\n";

/* Output $galleryscript as text for our web pages: */

echo($galleryscript);

}
`
And heres the code I tried but it didn't work:
`
function gallery_styles() {

/* The next lines figures out where the javascripts and images and CSS are installed,

relative to your wordpress server's root: */

$gallery_path = get_bloginfo('wpurl')."/wp-content/plugins/featured-content-gallery/";

/* The xhtml header code needed for gallery to work: */

$galleryscript = "
<?php if is_home() { ?>
<!-- begin gallery scripts -->

<link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css.php\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/>

<link rel=\"stylesheet\" href=\"".$gallery_path."css/jd.gallery.css\" type=\"text/css\" media=\"screen\" charset=\"utf-8\"/>

<script type=\"text/javascript\" src=\"".$gallery_path."scripts/mootools.v1.11.js\"></script>

<script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.js.php\"></script>

<script type=\"text/javascript\" src=\"".$gallery_path."scripts/jd.gallery.transitions.js\"></script>

<!-- end gallery scripts -->\n
<?php } else { } ?>";

/* Output $galleryscript as text for our web pages: */

echo($galleryscript);

}
`
Any suggestions or solutions?

Thanks
Grant
 

Tags
feature content gallery, plugins

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Feature Content Gallery londonmonk General Discussion 9 08-10-2010 08:59 AM
Feature Content Gallery and IE8 ricksheets1 General Discussion 3 03-04-2010 01:52 PM
What is going on in my feature content gallery. drplough General Discussion 7 03-19-2009 06:14 PM
Feature Content Gallery REx General Discussion 1 01-29-2009 12:47 PM
Images not displaying in Feature Content Plugin fee_m General Discussion 6 11-19-2008 03:41 AM


All times are GMT -5. The time now is 04:19 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.