Author Topic: Bookmark  (Read 4448 times)

0 Members and 1 Guest are viewing this topic.

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Bookmark
« on: September 06, 2007, 02:28:47 AM »
Hello.

I need that when someone click to see a image the page automatically go to a exact vertical position.
This is the original position:
And this is the position I want:

It is like bookmarks. But I canīt do that because I donīt see the link to the images.

Offline n3w

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Bookmark
« Reply #1 on: September 06, 2007, 05:23:47 AM »
In templates>default>details.html

Add somewhere near the video window or near google 336x250 ad code:
Quote
<a name="video"></a>

now, link the videos like:
http://www.yoursite.com/details.php?image_id=11#video

remember to add #video in the end of the url

This will now take your user directly to the window media player window

and make this happen: try-- (not tested, please keep a backup before trying)

In functions.php

Find:
Quote
  if ($show_link) {
    if ($open_window) {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
    }
    else {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."\">".$thumb."</a>";
    }
  }
  return $thumb;
}

Replace with:
Quote
  if ($show_link) {
    if ($open_window) {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."#video\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
    }
    else {
      $thumb = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode : ""))."#video\">".$thumb."</a>";
    }
  }
  return $thumb;
}
:)
« Last Edit: September 06, 2007, 05:35:19 AM by n3w »

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Bookmark
« Reply #2 on: September 08, 2007, 12:45:33 AM »
Thanks for your reply. This is very usefull for me.

It is working fine. But if I click on next or previous video de bookmark isnīt working...

Offline n3w

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Bookmark
« Reply #3 on: September 08, 2007, 05:01:11 AM »
For next/previous video link, try:

in templates/yourtemplate/details.html  ..   around line 206, search:

Quote
                            <td class="row2"> {if prev_image_name}{lang_prev_image}<br />
                              <b><a href="{prev_image_url}">{prev_image_name}</a></b>
                              <!-- <br /><br /><a href="{prev_image_url}"><img src="{prev_thumb_file}" border="1"></a> -->
                              {endif prev_image_name}&nbsp;</td>
                            <td align="right" class="row2"> &nbsp;{if next_image_name}{lang_next_image}<br />
                              <b><a href="{next_image_url}">{next_image_name}</a></b>
                              <!-- <br /><br /><a href="{next_image_url}"><img src="{next_thumb_file}" border="1"></a> -->
                              {endif next_image_name}</td>
replace with:
Quote
                            <td class="row2"> {if prev_image_name}{lang_prev_image}<br />
                              <b><a href="{prev_image_url}#video">{prev_image_name}</a></b>
                              <!-- <br /><br /><a href="{prev_image_url}#video"><img src="{prev_thumb_file}" border="1"></a> -->
                              {endif prev_image_name}&nbsp;</td>
                            <td align="right" class="row2"> &nbsp;{if next_image_name}{lang_next_image}<br />
                              <b><a href="{next_image_url}#video">{next_image_name}</a></b>
                              <!-- <br /><br /><a href="{next_image_url}#video"><img src="{next_thumb_file}" border="1"></a> -->
                              {endif next_image_name}</td>

Hope it helps :)

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: Bookmark
« Reply #4 on: September 09, 2007, 03:24:13 PM »
That is working fine!
Thanks for your help. Anything I can do for you, just tell me :)

Offline n3w

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Bookmark
« Reply #5 on: September 10, 2007, 09:56:57 AM »
No problem, glad i could help you out :)