Jump to content
Sign in to follow this  
[Deleted User]

Carousel on frontpage (on top of posts)

Recommended Posts

[Deleted User]

Can I put the carousel on the post/frontpage of my blog (iBlogPro): ipadwallpapersbybay.com I would use it with a NextGen gallery. Thanks Martin

Share this post


Link to post
Share on other sites
cmunns

You have to do two things. Enable the js init for the carousel on the blog page by adding to this conditional in the header `<?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php')) && VPRO) require (CORE_INITS.'/init_carousel.php');?>` then add this to the _posts.php file ` require(PAGELINES_PRO.'/template_carousel.php'); ` Let me know if you need more help

Share this post


Link to post
Share on other sites
[Deleted User]

I get this

Fatal error: Call to undefined function get_flickrRSS() in /
Where do I tell the carousel to use NextGen? Thanks again.

Share this post


Link to post
Share on other sites
cmunns

Oh yeah. You can't set options on the posts page unless they're global. You will have to go into the template_carousel.php file and add a conditional the way you did for the header. It's calling the default right now thats why you're getting flickrRSS up there.

Share this post


Link to post
Share on other sites
[Deleted User]

OK I've added header.php: <?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php')) && VPRO) require (CORE_INITS.'/init_carousel.php');?> template_carousel.php <?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php')) && VPRO) require (CORE_INITS.'/init_carousel.php');?> _posts.php: require(PAGELINES_PRO.'/template_carousel.php'); But it is not working still....

Share this post


Link to post
Share on other sites
cmunns

Okay, get rid of the code that you put in both the _posts.php and the template_carousel.php files It will be much easier just working with the header. So the conditional statement in the header should now look like this: `<?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php') || is_home()) && VPRO) require (CORE_INITS.'/init_carousel.php');?>` Then at the very bottom of the header after all the code add this: ` <?php if(is_home()):?> <?php require(PAGELINES_PRO.'/template_carousel.php');?> <?php endif;?> ` That should do it.

Share this post


Link to post
Share on other sites
[Deleted User]

Super! I still get this but we are very close now: Fatal error: Call to undefined function get_flickrRSS() in /nfs/c06/h01/mnt/90927/domains/ipadwallpapersbybay.com/html/wp-content/themes/iBlogPro/pro/template_carousel.php on line 39 We just need to tell iBlogPro to use NextGen? Thanks

Share this post


Link to post
Share on other sites
cmunns

Hmmm... I think you'll have to write another conditional. The posts page won't take any of the options you try to set because the carousel is not globally set. Therefore it will assume the default which is flickr. In template_carousel.php try adding this after the "endif" statement on line 54 ` <?php if(is_home()):?> <?php echo do_shortcode('[nggallery id='.$ngen_id = 2.' template=plcarousel]');?> <?php endif;?> ` (but replace the number 2 with the appropriate gallery id)

Share this post


Link to post
Share on other sites
[Deleted User]

my template_carousel.php end at line 52. Anyway I tried to add the code just after <?php endif;?> but got an syntax error this time ... Thanks for the effort :)

Share this post


Link to post
Share on other sites
cmunns

I realized that middle line should be like this <?php echo do_shortcode('[nggallery id=1 template=plcarousel]');?> Try that. and maybe show me what the bottom code looks like for you

Share this post


Link to post
Share on other sites
[Deleted User]

Still no luck! Here is the end of the template_carousel.php: <?php else:?> <?php _e("You have selected the carousel page template but the plugins aren't activated for the selected mode (either NextGen-Gallery or FlickrRSS). Options are set in page options. Default mode is FlickrRSS.", TDOMAIN);?> <?php endif;?> <?php if(is_home()):?> <?php echo do_shortcode('[nggallery id='.$ngen_id = 2.' template=plcarousel]');?> <?php endif;?> </div> </div> </div>

Share this post


Link to post
Share on other sites
cmunns

Okay, get rid of that code for now. instead go up to approximately line 30 and add the conditional to this line: (completed version) `<?php elseif(function_exists('nggDisplayRandomImages') && m_pagelines('carousel_mode', $post->ID) == 'ngen_gallery' || is_home()):?>` I tested this and it worked for me :)

Share this post


Link to post
Share on other sites
[Deleted User]

WORKS! Thanks for the walk through :) So just to clarify if someone else wants to have the carousel on the post page: In the header.php at line 42 under <!-- Modules w/ Javascript --> add the line:

<?php if((is_page_template('page-carousel.php') || is_page_template('page-carousel-full.php') || is_home()) && VPRO) require (CORE_INITS.'/init_carousel.php');?>
At the very bottom of header.php add:
<?php if(is_home()):?>
	<?php require(PAGELINES_PRO.'/template_carousel.php');?>
	<?php endif;?>
In the template_carousel.php add this at line 30:
<?php elseif(function_exists('nggDisplayRandomImages') && m_pagelines('carousel_mode', $post->ID) == 'ngen_gallery' || is_home()):?>

Viola it works here: http://ipadwallpapersbybay.com Thanks for the help, Martin (solved)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×