Results 1 to 7 of 7

Thread: CMotion Image Gallery - thumb positioning

  1. #1
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CMotion Image Gallery - thumb positioning

    1) Script Title: CMotion Image Gallery

    2) Script URL (on DD): http://www.dynamicdrive.com/forums/s...ad.php?t=11839

    3) Describe problem:

    Hello.

    Sorry for my english.
    Thank you 4 the cmotionscript.It's great!!!

    I use the cmotion script with a sql db.
    When i click on a thumb in the carousel, the larger image is well displayed but the carousel(with the thumbs) return in the original starting position. And when you have many and many thumbs, you must slide and slide just to see the thumb who is after the first selected.

    Is it possible that the carousel keep the position?

    Thanks

    macdeamon

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The upgraded version of the script (linked to in your post) has been a part of the DD library for some time. Make sure that you are using the official version:

    http://www.dynamicdrive.com/dynamici...iongallery.htm

    If you use the default method for displaying larger images, it generates a pop up. If you do it that way, Cmotion will not reset as you are describing. If pop ups are blocked though, it will do exactly what you say. Most people do not have pop ups blocked but, you could, if you prefer, use another display script instead of the pop up routine.

    Ways of doing that are described here:

    http://www.dynamicdrive.com/forums/s...ad.php?t=17909

    and another is here:

    http://www.dynamicdrive.com/forums/s...ead.php?t=6876
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, I did not express myself correctly.
    I must pass by the URL to post my larger images.
    Is it possible to keep the positioning of the thumbs as they were before clicking.
    OR it is possible to pass thumb positioning by the URL


    Thanks a lot

    macDeamon

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by macdeamon View Post
    I must pass by the URL to post my larger images.
    If you mean using the (server side and/or form) post method, why?

    The script already allows you to do this:

    Code:
    <a href="javascript:enlargeimage('larger_image1.gif')"><img src="thumbnail_image1.gif" border=1></a>
    Here (from the demo, Step 2):

    Code:
    <nobr id="trueContainer"><a href="javascript:enlargeimage('dynamicbook1.gif')"><img src="dynamicbook1.gif" border=1></a> <a href="javascript:enlargeimage('dynamicbook1.gif', 300, 300)"><img src="dynamicbook1.gif" border=1></a> <a href="http://www.dynamicdrive.com"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a> <a href="#"><img src="dynamicbook1.gif" border=1></a></nobr>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    We must post by URL as soon as an image of the carrousel is clicked because other elements change completely and because several SQL requests are carried out.

    For this reason it would be necessary to be able to recover the current position of the carrousel, to post it by URL, and to re-initialize the carrousel with the new co-ordinates of positioning.

    Thanks in advance

    macDeamon

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not all that familiar with the server side post method in general and certainly not with the particular language, version and settings your page uses to carry this out.

    I can tell you that the javascript value you seek is:

    cross_scroll.style.left

    This is both a setter and a getter, ex:

    Code:
    alert(cross_scroll.style.left)
    will pop up a value like -200px. And:

    Code:
    cross_scroll.style.left='-100px'
    will set the position to that value.

    So you could grab your new post value by setting it something like:

    Code:
    <? set $new_post_val= ?>cross_scroll.style.left
    and then later reset the position something like so:

    Code:
    cross_scroll.style.left='<? get $new_post_val ?>'
    I stress something like as, like I said, I don't know how things are set up on the server side there and am not all that familiar with server side code in general.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Mar 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Hello,

    Thanks for your help, it works well now!

    I had to add some lines in the js file to make it work with the serveur post.

    Now the page can be loaded with a specific position in the CMotion gallery.

    A really interesting project the CMotion gallery.

    Thanks for all.

    Sayrus.

Bookmarks

Posting Permissions

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