Results 1 to 2 of 2

Thread: simplegallery tweak possible?

  1. #1
    Join Date
    Dec 2011
    Thanked 0 Times in 0 Posts

    Default simplegallery tweak possible?

    1) Script Title: Simple Controls Gallery

    2) Script URL (on DD):

    3) Describe problem:
    A friend of mine (I know how it sounds, but it´s the truth) is running almost his entire web site inside simplegallery, using it as a magazine-like control.

    He didn´t like the text-on-top-only option, so he put the text inside the JPG´s, causing the site to drop off Google because there is no more plain text to index.

    Also, the size is around 5 Mb, which takes forever to load here in Argentina (speed 10Kbytes/sec).
    I managed to get the preload=false addition working, using the ´_iefix´ fork I found on this forum.

    Now the question: is it possible to define text in standard HTML, read this text (maybe using the onslide method like in example with the ´vacation text´) and replace the (empty) text inside the calling array with this newfound text?

    I got this idea from this gallary , where they put text inside LI and SPAN blocks, so it will be found by Google.

    Would it also be possible to alter the code in such a way that it also takes the top, bottom, left, right arguments as a position indicator for the text?

    I would need some coding examples, because this is way over my pay grade.

    Thanx in advance.

  2. #2
    Join Date
    Aug 2004
    Thanked 1,008 Times in 993 Posts
    Blog Entries


    One approach would be to define the descriptions of your gallery as a UL list on the page, initially hidden:

    <ul id="descs" style="margin:0; padding:0; display:none">
    <li>This is description 1</li>
    <li>This is description 2</li>
    <li>This is description 3</li>
    <li>This is description 4</li>
    Then, using the oninit() and onslide() event handlers of the script, show the description corresponding to the current slide, for example:

    var mygallery=new simpleGallery({
    	wrapperid: "simplegallery1", //ID of main gallery container,
    	dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
    	imagearray: [
    		["", "", "_new", "There's nothing like a nice swim in the Summer."],
    		["", "", "", ""],
    		["", "", "", "Eat your fruits, it's good for you!"],
    		["", "", "", ""]
    	autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	oninit:function(){ //event that fires when gallery has initialized/ ready to run
    	onslide:function(curslide, i){ //event that fires after each slide is shown
    		//Keyword "this": references current gallery instance
    		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
    		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
    DD Admin


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts