This topic is locked
[SOLVED]

 Image widths on Edit page

4/6/2011 11:46:40 PM
PHPRunner General questions
H
horsey_kim author

Where can I set the width for an image on the edit page only.

I don't want to resize the image, only have the image show a specific width on the edit page.

It is important that the image upload at a bigger size.
I should add - I am using stored url to the image - not a database image. I think I said that correct <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=16790&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />
thanks

Sergey Kornilov admin 4/7/2011

The image will be shown in real size unless you choose 'generate thumbnails' option. If latter - it will show a clickable thumbnail.

H
horsey_kim author 4/7/2011



The image will be shown in real size unless you choose 'generate thumbnails' option. If latter - it will show a clickable thumbnail.


Not using edit as in thumbnail. Because event is renaming the file to include the ID number in the file name. In the past you can not select thumbnail or resize feature, or the renaming will fail.
Another thing is what if you wanted a border around the image or such. Is there a way I can put a class="photolook" command in the <img source code for the edit or list pages. This way I can modify it with css. This would be a huge help in making the photos more customized. I been looking through all the php and js files trying to find where this code is generated for the edit screen. Can you please direct me to where the code is that specifics the image files (url saved in database, not database storing photos). Thanks

Sergey Kornilov admin 4/8/2011

Check tablename_edit.php file.
Here is the sample code that displays the image on the edit page:

// Make - File-based Image

$value = "<img";

if(isEnableSection508())

$value.= " alt=\"".htmlspecialchars($data["Make"])."\"";

$value.= " id=\"img_Make_".$id."\" border=0";

$value.= " src=\"".htmlspecialchars(AddLinkPrefix("Make",$data["Make"]))."\">";


You can modify it to add more style.
If you want to make this change permanent modify C:\Program files\PHPRunner5.3\source\edit.php. Here is the code snippet you looking for:

$value = "<img";

if(isEnableSection508())

$value.= " alt=\"".htmlspecialchars($data["##@f.strName s##"])."\"";

##if @f.ListFormatObj.nImageWidth && !@f.bOriginalView##

$value.= " width=##@f.ListFormatObj.nImageWidth##";

##endif##

##if @f.ListFormatObj.nImageHeight && !@f.bOriginalView##

$value.= " height=##@f.ListFormatObj.nImageHeight##";

##endif##

$value.= " id=\"img_##@f.strName##_".$id."\" border=0";

$value.= " src=\"".htmlspecialchars(AddLinkPrefix("##@f.strName s##",$data["##@f.strName s##"]))."\">";
H
horsey_kim author 4/8/2011

Thank you, that is what I am looking for <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=57531&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />