I am a little confused on this one.
Sometimes when pics are uploaded, you can hover over the picture and when clicked on, you get a real big picture. The url to the pic (not the page) has a file name like normal_mypic.jpg.
Sometimes when a pic is uploaded, it does not allow you to click on it to bring up a big pic. The file name then does not have the normal in it like mypic.jpg.
I would like to have all pics with the ability when clicked on, you get a big picture.
Hope this is clear and thanks.
That depends on the size of pic you upload. If the pic is larger than the dimensions set in config for intermediate pics then you get the nornal_ version. If the pic was small then it is displayed as-is.
Thanks for the reply.
So if I do not allow auto resizing, will they all be as is then? Will the user get an error message about the file being to big?
My problem is I have BBcode copy and paste for each picture. It is automatically putting in the normal in every upload. So if a user meets the file sizes, they get a wrong code output because its adding the normal in the file url.
Here is the bbcode mod part in my displayimage.php:
$bbcodenormal_url = get_pic_url($CURRENT_PIC_DATA, 'normal');
$info['<b>BB Code Copy Info</b>']='<font color="#008000">1) Click anywhere inside the box, then press Ctrl+A to select all the text.<br />2) Press Ctrl+C to copy the selected text.<br />3) Press Ctrl+V to paste the selected text into your siggy or post.<br />(You can also use your mouse for copy & paste)</font>';
$info['BB Code<br>Normal (large pic)']='<textarea type=text name=text rows=2 cols=53>[url=http://www.mysite.com/photoalbum/'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://www.mysite.com/photoalbum/'.$bbcodenormal_url.'[/img][/url]</textarea>';
if($CONFIG['make_intermediate'] && (max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width'])) {
//fullsize
} else {
//normal
}
Thanks for the reply.
Where would I put that code?
that's for your bbcode enhancement
if($CONFIG['make_intermediate'] && (max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width'])) {
$bbcodenormal_url = get_pic_url($row, 'normal');
} else {
$bbcodenormal_url = get_pic_url($row, 'fullsize');
}
$info['<b>BB Code Copy Info</b>']='<font color="#008000">1) Click anywhere inside the box, then press Ctrl+A to select all the text.<br />2) Press Ctrl+C to copy the selected text.<br />3) Press Ctrl+V to paste the selected text into your siggy or post.<br />(You can also use your mouse for copy & paste)</font>';
$info['BB Code<br>Normal (large pic)']='<textarea type=text name=text rows=2 cols=53>[url=http://www.mysite.com/photoalbum/'.$_SERVER["SCRIPT_NAME"]."?pos=-$CURRENT_PIC_DATA[pid]".'][img]'.'http://www.mysite.com/photoalbum/'.$bbcodenormal_url.'[/img][/url]</textarea>';
Hi again, I tried the code but it now does not generate the image location after www.mysite.com/photoalbum/.
Here is the output bbcode I get:
[url=http://www.mysite.com/photoalbum/displayimage.php?pos=-733][img]http://www.mysite.com/photoalbum/[/img][/url]
Change $row to $CURRENT_PIC_DATA. Also the code may need to be more complex than that, depends on your config settings.
Thanks for your paitence. I cannot find $row to change.
It's in the code Stramm posted.
Excellent! That did it.
Thank you all!!