Forums

Frontpage-Slideshow
[resolved] open slide links as thickbox? (11 posts)

  1. deepbevel
    Member
    Posted 9 months ago #

    is it possible to apply the thickbox class to the slide links?
    thanks

  2. jeff_
    Member
    Posted 9 months ago #

    have a try and let us know :)

  3. deepbevel
    Member
    Posted 9 months ago #

    I shall, could you tell me where I may find the link code to add the class to? That would save much trial and error, I'm only semi skilled you know.

  4. jeff_
    Member
    Posted 9 months ago #

    Did you had a look at the plugin's folder ? nope ? well, you will understand where to go when you will see its content…

    okay… /wp-contents/plugins/frontpage-slideshow/templates/{name-of-your-template}/

    very easy…

  5. deepbevel
    Member
    Posted 9 months ago #

    I did look at the code, I've only added link classes to Wp embedded images, I don't see any code that looks like that so I'm not sure where to add the thickbox class. I'd be most grateful to you or anyone who can tell me what line I'm looking for.

    thanks agian.

  6. jeff_
    Member
    Posted 9 months ago #

    1) open wp-content/plugins/frontpage-slideshow/templates/default/template.php
    2) do a "grep" with your eyes to find some html code.
    2.bis) line 38, just below the header comments, you start to find html code \o/
    3) line 43 you will see a link <a id="fs-link" href="#frontpage-slideshow">&nbsp;</a> looks like the good one, there is no <img> tag, that's normal : the picture that is displayed is the background of the <div id="fs-picture"></div> element
    4) learn how to use links with thickbox (its easy)
    5) add any class, or javascript you need
    6) enjoy

    remarks : you should create your own template of just add some javascript to make thickbox to work when people are clicking on the link.

    :)

  7. deepbevel
    Member
    Posted 9 months ago #

    I see3 instances of href here

    function frontpageSlideshow_TPL($fsentries) {
    	// this is the HTML part
    	$fscontent = '<!-- Template: default v0.9.9.3.1 -->
    <div id="fs-main">
    	<div id="fs-slide">
    		<div id="fs-picture">
    			<div id="fs-placeholder">
    				<a id="fs-prev" href="#frontpage-slideshow-prev">&nbsp</a>
    				<a id="fs-link" href="#frontpage-slideshow"> </a>
    				<a id="fs-next" href="#frontpage-slideshow-next">&nbsp</a>
    			</div>
    			<div id="fs-text">
    				<div id="fs-title"> </div>
    				<div id="fs-excerpt"> </div>
    			</div>
    		</div>
    	</div>

    And one here

    function fsChangeSlide2() {
    	jQuery('#fs-picture').css({backgroundImage : "url("+jQuery("#fs-entry-img-"+fsid).attr("src")+")"});
    	if (jQuery('#fs-entry-link-'+fsid).text() != '')
    		jQuery('#fs-title').html('<a href="' + jQuery('#fs-entry-link-'+fsid).text() + '">' + jQuery('#fs-entry-title-'+fsid).html() + '</a>');

    I'll keep messing with it and figure it out, thanks!

  8. deepbevel
    Member
    Posted 9 months ago #

    it sorta works..
    <a id="fs-link" href="#frontpage-slideshow" class="fancybox">  </a>
    But it doesn't always open the correct image/post. Perhaps if I link to images files instead.
    homepage using Frontpage Slideshow with images opening in fancybox
    Right now my server is really slow (don't use Hostmonster) but eventually it will be okay, I hope!

    -just discovered it only works with a double click..? weird.

  9. jeff_
    Member
    Posted 9 months ago #

    See, even if I tell you exactly where to find what you are looking for, you don't read… ;) but you finally got it \o/

    All the problems (not always the "good" pic/post & doubleclick problem) occurs because you uses this link like a "normal" one.

    This link's href is dynamically change via javascript when you click on it. As I already said

    add some javascript to make thickbox to work when people are clicking on the link

    Look at jQuery way to do so :) its easy ;) (have a look at the "unbind()" & "click()" functions)

  10. deepbevel
    Member
    Posted 9 months ago #

    I only follow instructions and proceed by trial and error. Most of what you say makes no sense to me, yet I manage to decipher it none the less. I actually read pretty good.

    Thanks for the help, I'll try the jQuery thing sometime.

  11. jeff_
    Member
    Posted 9 months ago #

    What you did not understood ? I gave you the line where to find the link ! what did you expect more ? :/

Reply

You must log in to post.

About this Plugin

About this Topic