Jump to content


Photo

Feature Link URL to open a FancyBox with the contents of a post.


  • Please log in to reply
9 replies to this topic

#1 iliaboti

iliaboti

    Member

  • Members
  • PipPip
  • 10 posts

Posted 05 September 2011 - 12:56 PM

Hi, how can I make the Feature Link URL to be opened in a Fancy Box in the latest version of the Platform Pro theme? The URL used points to specific posts (only the post content, having removed all other page modules, i.e. menus, sidebars, navigation etc). I have tried easy FancyBox and FancyBox for Wordpress with no results. Note that in the previous version of the theme I could do this. It worked (almost) properly with Chrome but not well on Safari and Firefox. Cheers, giannis-

#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 05 September 2011 - 02:01 PM

Have you looked at NextGen? That has a capacity to open a lightbox. As for opening a lightbox from the feature slider, I'm at a loss as this would likely require some heavy duty coding above my skills.

#3 iliaboti

iliaboti

    Member

  • Members
  • PipPip
  • 10 posts

Posted 05 September 2011 - 02:38 PM

Thanks a lot for the reply. I had a look at NextGen however it seems it cannot do what I really want. I appreciate your feedback though.

#4 kastelic

kastelic

    Advocate

  • Members

  • 3081 posts
  • Country: Country Flag

Posted 05 September 2011 - 09:20 PM

I think with javascript you could implement a roundabout way of doing this. What is the class or id that needs to be added to an element to make it open with your plugin? If I could know that I could tell you how to remove the default functionality of those links and add that class or id.

#5 iliaboti

iliaboti

    Member

  • Members
  • PipPip
  • 10 posts

Posted 05 September 2011 - 09:33 PM

According to the documentation the plugin needs class fancybox to the link in order for the fancybox to be triggered. Thanks a lot for the answer. It seems very good to me. If you could also tell me how to do this, I think that this could give the solution.

#6 kastelic

kastelic

    Advocate

  • Members

  • 3081 posts
  • Country: Country Flag

Posted 05 September 2011 - 10:32 PM

Hi, you can paste this into Custom Code -> Footerscripts:
 
	<script>
	jQuery(function() {
	jQuery('#feature_5 .flink').addClass('fancybox');
	});
	</script>

It will add the class "fancybox" to the feature link in Feature number 5. Change the feature_5 part to whichever feature you are targeting.

If you need to change the 'href' as well then replace that line with this line:
 
	jQuery('#feature_5 .flink').addClass('fancybox').attr('href','#something');

The "#something" can be any url, to a webpage or an image or whatever you need.

#7 iliaboti

iliaboti

    Member

  • Members
  • PipPip
  • 10 posts

Posted 05 September 2011 - 10:55 PM

Hi again, I need to have this effect to all features that I have on a page (actually on all pages). Not just a specific feature. I have also tried for specific features i.e. #feature_1 but it did not work. An example page that I want this is: http://www.bartesera...eatured-events/ Clicking "More" on any of the features should show the post in a fancybox and not in a new page.

#8 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 06 September 2011 - 01:59 AM

The #feature_1 didn't work because your feature slides actually have different selectors: #feature_280 = First slide #feature_372 = Second slide #feature_404 = Third slide

#9 iliaboti

iliaboti

    Member

  • Members
  • PipPip
  • 10 posts

Posted 06 September 2011 - 08:17 AM

Dear all, thanks a lot for the feedback. I "kind of" made it work for all features by adding the following to the Footerscripts: Now my problem is that this only works properly in Chrome. In Safari and Firefox clicking on "More" opens a blank page. I am not sure if this is related to Platform pro, but I would appreciate any ideas.

#10 iliaboti

iliaboti

    Member

  • Members
  • PipPip
  • 10 posts

Posted 06 September 2011 - 08:58 AM

Just to update you. The problem with firefox and Safari was due to some google analytics plugin. I have corrected this and now everything works! Thanks everybody for the feedback!