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: images in diffrent resolution  (Read 6541 times)

0 Members and 1 Guest are viewing this topic.

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
images in diffrent resolution
« on: July 12, 2006, 04:30:10 am »

Dear Friends,
              on my site i used to display wallpapers using coperman gallery. but it only shows one resolution picture.
example if i upload 1024x768 wallpapers then as a final output it will only show 1024x768 but i want to show in diffrent resolution such as 800x600 also. how can i do that.

i wish to show below thumbnil two links 1024x768 and 800x600 resolution how can i do that.

Nishant
« Last Edit: July 15, 2006, 01:41:51 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: images in diffrent resolution
« Reply #1 on: July 12, 2006, 05:15:37 am »

set intermediate resolution to 800 pix then.
Logged

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #2 on: July 12, 2006, 07:15:10 am »

Thaks for reply but still i am confused tell me how to set intermediate resolution to 800 pix then

(http://www.lakesparadise.com/wallpapers//albums/uploads/aish/thumb_aish100.jpg)
1024x768     800x600

see the above example i want to show images in thumbnails.php page like this where one can select which resolution he/she wish to see... both 1024x768  and 800x600 should be linked and when i click on 1024x768 then it should show resolition of pic to 1024x768 and when i click 800x600 then 800x600 pic.

so the user have the freedom to select his own resolution...

Thanks
Niks.....
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: images in diffrent resolution
« Reply #3 on: July 12, 2006, 07:21:51 am »

No direct method to do that. You will have to modify the code so that two intermediate pics are created for each photo.

Other workaround could be to use the fullsize pic on displayimage page (for 1024x768). For this you will have to modify displayimage page to display two types of pics depending on the choice selected on thumbnail page.
Logged
Chief Geek at Ranium Systems

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #4 on: July 12, 2006, 01:41:44 pm »

Thanks Mr. Ali.
          Well i am ready to modify the scource code i am aware of php prety much you just need to tell me which file i need to alter to do so. and where i can asign he size of image the size i used to upload is 1024x768 so the largest size is always there what i need to do us redece the size of pic to 800x600. i have seen that if is reduced to 533x400 on displayimage.php page just need to configure to only reduce to 800x 600 and when we click on the image it shows 1024x768 just need to set a link to the image displays on displayimage.php page as 800x600 and the new windows which open after clicking the image to 1024x800.

i think you got what i wish to say you.
try helping me out.

i have made many chages to cpm to make it what i want try ttp://www.lakesparadise.com/wallpapers/index.php

Thanks
Niks...
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: images in diffrent resolution
« Reply #5 on: July 12, 2006, 02:33:55 pm »

Then do as gaugau suggested:
Quote
set intermediate resolution to 800 pix then.

admin mode=>config=>Files and thumbnails settings=>Max width or height of an intermediate picture/video
Logged
‍I don't answer to PM with support question
Please post your issue to related board

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #6 on: July 12, 2006, 04:07:03 pm »


(http://www.lakesparadise.com/wallpapers//albums/uploads/aish/thumb_aish100.jpg)
1024x768     800x600

see the above example i want to show images in thumbnails.php page like this where one can select which resolution he/she wish to see... both 1024x768  and 800x600 should be linked and when i click on 1024x768 then it should show resolition of pic to 1024x768 and when i click 800x600 then 800x600 pic.

so the user have the freedom to select his own resolution...

Thanks
Niks.....


Thanks that ok set resolution to 800 pix but what about my problem stated above which file i need to edit to give upper like look...
Please tell me
Thanks
« Last Edit: July 12, 2006, 04:12:18 pm by niks_007 »
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: images in diffrent resolution
« Reply #7 on: July 12, 2006, 04:22:40 pm »

you should change theme_html_picture() function of yourtheme/theme.php
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: images in diffrent resolution
« Reply #8 on: July 13, 2006, 07:57:59 am »

Here is the mod which will show two links below all thumbnails. One link for '800x600' and one for '1024x768'. If the user clicks 800x600 then the normal displayimage.php will be opened and the pic will be shown (provided you have set intermediate pics size to be 800x600 in config). If the user clicks '1024x768' then a popup with fullsize pic will be opened (again provided you uploaded the original pic in 1024x768 resolution)

Edit include/functions.inc.php (in function display_thumbnails)

Add

Code: [Select]
$thumb_list[$i]['pwidth'] = $row['pwidth'];
$thumb_list[$i]['pheight'] = $row['pheight'];

just after

Code: [Select]
$thumb_list[$i]['admin_menu'] = '';
$thumb_list[$i]['aid'] = $row['aid'];

then edit themes/yourtheme/theme.php (function theme_display_thumbnails) [if the function is not in the theme file then copy if from sample theme to your theme]

Replace

Code: [Select]
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}$uid_link",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );

with

Code: [Select]
                $winsizeX = $thumb['pwidth'] + 5;
                $winsizeY = $thumb['pheight'] + 5;
                $thumb['caption'] = "<a href=\"displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}$uid_link\">800x600</a>&nbsp;&nbsp;<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&amp;fullsize=1','".uniqid(rand())."','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">1024x768</a><br />".$thumb['caption'];
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}$uid_link",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );

Hope this is what you wanted.


Abbas
Logged
Chief Geek at Ranium Systems

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #9 on: July 13, 2006, 09:11:29 am »

Thanks Abbas,
           I will try it today and get back to you as soon as posible. i would have gone through it but busy write now will do it next few hours. anyways thanks for you reply. and support.

Niks...

Logged

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #10 on: July 13, 2006, 02:26:18 pm »

Hi Abbas,
           I did what you said to me but it doesn't make any diffrence no changes can be seen i dont know why...

i am attaching the files here as the code exceed 20000 charector limit so cant paste here please go throught the files and let me know  whats wrong with that....

themes/water_drop/theme.php file
include/functions.inc.php


Now see whats wrong with that and tell me...
try visiting the url...
http://www.lakesparadise.com/wallpapers/index.php

Thanks
Niks...
Logged

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #11 on: July 14, 2006, 03:05:36 am »

hi......
     i am still looking for some solution.......

Niks......
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: images in diffrent resolution
« Reply #12 on: July 14, 2006, 07:26:04 am »

@Nicks: Be patient... this is not a hot line ;) Looking into the issue...
Logged
Chief Geek at Ranium Systems

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: images in diffrent resolution
« Reply #13 on: July 14, 2006, 07:27:27 am »

This is not a hotline, don't bump your threads just after a few hours have passed! You already have a very bad negative karma record, which will make supporters reluctant to look into your issues anyway, as it shows you haven't shown much respect to board rules in the past. I'm fed up with having to tell you to behave and respect board rules. One more occasion of breaking the rules and common sense will get you banned!
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: images in diffrent resolution
« Reply #14 on: July 14, 2006, 07:55:11 am »

Joachim is absolutely correct. Please follow board rules.

I took a look at your theme file. You made the changes at wrong place. In your theme.php

Replace

Code: [Select]
        if ($mode == 'thumb') {
            if ($aid == 'lastalb') {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }

with

Code: [Select]
        if ($mode == 'thumb') {
            if ($aid == 'lastalb') {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            } else {
                $winsizeX = $thumb['pwidth'] + 5;
                $winsizeY = $thumb['pheight'] + 5;
                $thumb['caption'] = "<a href=\"displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}$uid_link\">800x600</a>&nbsp;&nbsp;<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid={$thumb['pid']}&amp;fullsize=1','".uniqid(rand())."','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">1024x768</a><br />".$thumb['caption'];
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&amp;pos={$thumb['pos']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }

You are running an outdated (1.4.3) version whose sample theme has some discrepancies which caused you to make changes at wrong place. Upgrade to the latest stabel version ( 1.4.8 ).
Logged
Chief Geek at Ranium Systems

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #15 on: July 14, 2006, 08:37:54 pm »

Mr. Gua Gua.
          I appologies for my mistake and would like to asure you that i want break forum's rules in futute i feel sorry for what i did in past......

Niks...
Logged

niks_007

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: images in diffrent resolution
« Reply #16 on: July 14, 2006, 08:45:39 pm »

Thanks Abbas its now working...
      Thanks a lot i would like to resize the thumb image size can i do that. Please tell me.
Ya you are write that i am using version 1.4.3 stable. and write now i don’t wish to upgrade it with latest version i know that new version are always advancement over the previous but in that case i need to re customized the entire gallery again i have made many changes to the forum in many different pages some by my self and some by the help of nice guys like you. And i need to do all that again. So write now i won’t prefer doing the same exercise again and again.
one more thing can i resize all the older intermediate pics to 800 resolution but let me tell you it have around 3000 pages.

Thanks a lot.

Niks...

Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: images in diffrent resolution
« Reply #17 on: July 15, 2006, 06:59:47 am »

Start a new thread for new queries (As given in board rules)... One issue per thread is the board rule.
Logged
Chief Geek at Ranium Systems

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: images in diffrent resolution
« Reply #18 on: July 15, 2006, 09:40:55 am »

One can clearly see that you have read the board rules and that you're trying to improve :-[.
Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 20 queries.