normal and pics normal and pics
 

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

Main Menu

normal and pics

Started by Bullmax, May 24, 2006, 10:59:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bullmax

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.

Nibbler

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.

Bullmax

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>';

Stramm

if($CONFIG['make_intermediate'] && (max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width'])) {
//fullsize
} else {
//normal
}


Bullmax

Thanks for the reply.
Where would I put that code?

Stramm

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>';

Bullmax

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]

Nibbler

Change $row to $CURRENT_PIC_DATA. Also the code may need to be more complex than that, depends on your config settings.

Bullmax

Thanks for your paitence.  I cannot find $row to change.

Nibbler

It's in the code Stramm posted.

Bullmax

Excellent!  That did it.

Thank you all!!