Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: displayimage.php Javascript  (Read 5667 times)

0 Members and 1 Guest are viewing this topic.

titoi

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • Titoi Dot Com
displayimage.php Javascript
« on: July 12, 2006, 05:01:57 pm »

My apologies if this is the wrong place for a question like this, please let me know if there's a better place for it.

I don't know much of anything about coding so I'm kinda flying blind on this. I just upgraded to Coppermine 1.4.8, I'm using a modified version of DaMysterious' kaki theme and I've installed Casper's Paypal mod (http://forum.coppermine-gallery.net/index.php?topic=26454.0). (Not sure if any of that's important, but I figured it could help).

Currently when looking at a full size image (for example, this one: http://www.titoi.com/galleries/displayimage.php?album=5&pos=14), if you click on the image itself, it opens in a new window. The new window, when expanded, shows the Paypal mod but it doesn't work properly. I'd like to make it simply advance to the next image instead of opening any new windows. I tried finding out where the code is for the next.gif with the intention of swapping it for the javascript, but didn't have any luck. Any suggestions on where it might be, and if this will accomplish what I'm trying to do? Thank you!!


« Last Edit: July 17, 2006, 08:36:09 am by GauGau »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: displayimage.php Javascript
« Reply #1 on: July 12, 2006, 05:50:12 pm »

- first you need to change your default theme
no one can see your gallery they all see this
Code: [Select]
Template error
Failed to find block 'my_gallery'(#(<!-- BEGIN my_gallery -->)(.*?)(<!-- END my_gallery -->)#s) in :

                <span class="topmenu">


<!-- BEGIN allow_memberlist -->
                        <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a><br /><br />
<!-- END allow_memberlist -->



<!-- BEGIN faq -->
                        <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a><br /><br />
<!-- END faq -->





<!-- BEGIN upload_pic -->
                        <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a><br /><br />
<!-- END upload_pic -->

<!-- BEGIN register -->
                        <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a><br /><br />
<!-- END register -->

<!-- BEGIN login -->
                        <a href="{LOGIN_TGT}" title="">{LOGIN_LNK}</a>
<!-- END login -->


</span>
Logged
‍I don't answer to PM with support question
Please post your issue to related board

titoi

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • Titoi Dot Com
Re: displayimage.php Javascript
« Reply #2 on: July 12, 2006, 07:01:49 pm »

oh crap! I can't replicate the error! Will try to figure it out....
Logged

titoi

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • Titoi Dot Com
Re: displayimage.php Javascript
« Reply #3 on: July 12, 2006, 07:07:48 pm »

Okay, "my gallery" is back. Does the site work for you now? It's never stopped working for me.  :o
« Last Edit: July 12, 2006, 07:30:45 pm by titoi »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: displayimage.php Javascript
« Reply #4 on: July 13, 2006, 05:56:38 am »

works for me.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: displayimage.php Javascript
« Reply #5 on: July 13, 2006, 09:30:47 am »

Following mod will change the link on intermediate pic so that instead of opening the pop for fullsize pic the user will be taken to the next pic (as if he clicked the Next button).

Edit themes/yourtheme/theme.php (function theme_html_picture) [If that function is not there in your theme then copy it from sample theme to your theme.php]

Replace

Code: [Select]
global $album, $comment_date_fmt, $template_display_media;

with

Code: [Select]
global $album, $comment_date_fmt, $template_display_media, $cat, $pos, $pic_count;

then Replace

Code: [Select]
            $pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            $pic_html .= "</a>\n";

with

Code: [Select]
            if ($pos < ($pic_count - 1)) {
              $next = $pos + 1;
              $cat_link = is_numeric($album) ? '' : '&amp;cat=' . $cat;
              $pic_html = "<a href=\"{$_SERVER['PHP_SELF']}?album=$album$cat_link&amp;pos=$next$uid_link\">";
            }
            $pic_title = $lang_display_image_php['view_fs'] . "\n==============\n" . $pic_title;
            $pic_html .= "<img src=\"" . $picture_url . "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            if ($pos < ($pic_count - 1)) {
              $pic_html .= "</a>\n";
            }

HTH
Abbas
« Last Edit: July 17, 2006, 07:47:11 am by Abbas Ali »
Logged
Chief Geek at Ranium Systems

titoi

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • Titoi Dot Com
Re: displayimage.php Javascript
« Reply #6 on: July 14, 2006, 12:05:19 am »

Thank you very much for that! The function was not in my theme (kaki), so I added it and made the changes. Now it does stop it from opening a new window, but it does not advance to the next image. The link in each case is going to displayimage.php?album=(number)&pos= with nothing after the =. Any other suggestions? Thanks in advance!!
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: displayimage.php Javascript
« Reply #7 on: July 14, 2006, 07:10:39 am »

Did you made the first change i mentioned? i.e.
Code: [Select]
global $album, $comment_date_fmt, $template_display_media, $cat, $pos, $pic_count;
Logged
Chief Geek at Ranium Systems

titoi

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • Titoi Dot Com
Re: displayimage.php Javascript
« Reply #8 on: July 14, 2006, 04:22:37 pm »

Yes I did! Followed the directions exactly.
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: displayimage.php Javascript
« Reply #9 on: July 15, 2006, 07:02:15 am »

Attach the zip of your theme file to the next post (Using advanced options when posting)..
Logged
Chief Geek at Ranium Systems

titoi

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • Titoi Dot Com
Re: displayimage.php Javascript
« Reply #10 on: July 15, 2006, 05:35:00 pm »

okay, it's attached. Thank you for your help!
« Last Edit: July 17, 2006, 08:23:52 am by titoi »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: displayimage.php Javascript
« Reply #11 on: July 17, 2006, 07:48:46 am »

I forgot to add two lines in the code. I have modified my orginal post to reflect the changes...

In above code Replace

Code: [Select]
            if ($pos < ($pic_count - 1)) {
              $pic_html = "<a href=\"{$_SERVER['PHP_SELF']}?album=$album$cat_link&amp;pos=$next$uid_link\">";
            }

with

Code: [Select]
            if ($pos < ($pic_count - 1)) {
              $next = $pos + 1;
              $cat_link = is_numeric($album) ? '' : '&amp;cat=' . $cat;
              $pic_html = "<a href=\"{$_SERVER['PHP_SELF']}?album=$album$cat_link&amp;pos=$next$uid_link\">";
            }

This should do the trick..
Logged
Chief Geek at Ranium Systems

titoi

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • Titoi Dot Com
Re: displayimage.php Javascript
« Reply #12 on: July 17, 2006, 08:23:15 am »

And it did! Many thanks!! This is now resolved.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.