images in diffrent resolution images in diffrent resolution
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

images in diffrent resolution

Started by niks_007, July 12, 2006, 04:30:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

niks_007

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

Joachim Müller

set intermediate resolution to 800 pix then.

niks_007

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

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.lakesparadise.com%2Fwallpapers%2F%2Falbums%2Fuploads%2Faish%2Fthumb_aish100.jpg&hash=de764fcc431b0a743455ca44906c3a6c3b586297)
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.....

Abbas Ali

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.
Chief Geek at Ranium Systems

niks_007

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...

Sami

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

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

niks_007

#6
Quote from: niks_007 on July 12, 2006, 07:15:10 AM

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.lakesparadise.com%2Fwallpapers%2F%2Falbums%2Fuploads%2Faish%2Fthumb_aish100.jpg&hash=de764fcc431b0a743455ca44906c3a6c3b586297)
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

Sami

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

Abbas Ali

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


$thumb_list[$i]['pwidth'] = $row['pwidth'];
$thumb_list[$i]['pheight'] = $row['pheight'];


just after


$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


                $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


                $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
Chief Geek at Ranium Systems

niks_007

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...


niks_007

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...

niks_007

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

Niks......

Abbas Ali

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

Joachim Müller

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!

Abbas Ali

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


        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


        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 ).
Chief Geek at Ranium Systems

niks_007

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...

niks_007

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...


Abbas Ali

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

Joachim Müller

One can clearly see that you have read the board rules and that you're trying to improve :-[.