This topic is locked

Making the pics on the list tumnail pictures?

9/19/2007 1:22:51 PM
PHPRunner General questions
I
Idol author

I am trying to make this thing work...but..seems to me that I can't figure it out
Can someone take me trough the making of the tumnails work, step by step....
if you upload some images of differents steps of making it work...would be a great help...
and the info on the phprunner site is outdated...and won't help me now ...my version is PHPR 4.0 & 4.1
Thanks you!

Alexey admin 9/20/2007

Hi,
thank you for pointing me to outdated articles.
To enable thumbnails just double-click your field in Visual Editor, select Edit as tab, choose Imageor File/Image type and check off Create Thumbnail box.

I
Idol author 9/26/2007

Hi, I have more questions about the same fuction!
When I create a tumnail pic, I have to decide what size I want my tumnail to show as....and the problem with that is that both tumnail and the picture in the view page look strange...and doesn't look proffesional!
What I am trying to say is...sometimes the original picture is wider and sometimes it is higher....so if I give it a 50*50 size or larger...it doesn't look alright...is there a code to embed in the pic feild to minimize it, not resize it?
And the second question is how to make the tumnail picture when clicked on ,in the listpage..redirect the user to the view page of the add....not to a new page with only a picture?
Thanks...

J
Jane 9/27/2007

Hi,
it's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and post a URL to your pages here or send it to [email=support@xlinesoft.com]support@xlinesoft.com[/email] along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.

I
Idol author 9/27/2007

Hi Jane,

Could you answer my second question first!...untill I create the first question on the demo account ...thanks....

And the second question is how to make the tumnail picture when clicked on ,in the listpage..redirect the user to the view page of the add....not to a new page with only a picture?

Thanks...

J
Jane 9/27/2007

Hi,
to add link to the View page for the thumbnail picture use Custom format on the "View as" settings dialog on the Visual Editor tab.

Actual code is dependent of field type.

I
Idol author 9/27/2007

Hi,

to add link to the View page for the thumbnail picture use Custom format on the "View as" settings dialog on the Visual Editor tab.

Actual code is dependent of field type.


Yes, and we imagin that the view page address is "view.php"
What would be the written code to make the tumnail a link to the view page?
And the ID's field name is: "userID"

I
Idol author 9/27/2007

Hi,

it's difficult to tell you what's happening without seeing actual files.
Please publish your project on Demo Account and post a URL to your pages here or send it to [email=support@xlinesoft.com]support@xlinesoft.com[/email] along with instructions on reproducing this error.

I'll find what's wrong with your project inspecting it at Demo account site.


I can't upload the table becuase I get this message by the PHPR 4.1 -->ZIP file exceeded the maximum size (5MB) of demo Account!
Could you please explain simply how you create a table with a tumnail....I might learn that way!
I don't want to play around too much with my saved project....becuase in 2-3 hours I couldn't connect to my database.....trough phpr 4.1....and I became afraid(it took me a long time 1-2 month to create it)...I want to just add a simple tumnail to my tables...and the rest look fine to me!

J
Jane 9/28/2007

Hi,
here is a sample code:

$value="";

global $data;

if(CheckImageExtension($data["FileNameField"]))

{

// show thumbnail

$thumbname="th".$data["FileNameField"];

if(substr("files/",0,7)!="http://"; && !file_exists(GetUploadFolder("FileNameField").$thumbname))

$thumbname=$data["FileNameField"];

$value="<a href=\"TableName_view.php?editid1=".$data["UserID"]."\">";

$value.="<img";

if($thumbname==$data["FileNameField"])

{

$value.=" width=100";

//$value.=" height=100";

}

$value.=" border=0";

$value.=" src=\"".htmlspecialchars(AddLinkPrefix("FileNameField",$thumbname))."\"></a>";

}

I
Idol author 9/28/2007

Hi,

here is a sample code:


Jane, still it doesn't work for me, this is how I did it...could you tell me where I go wrong?
First I create a test table


And I gave the picture1 field a custom 'view as' and embeded the codes below!
$value="";

global $data;

if(CheckImageExtension($data["picture2"]))

{

// show thumbnail

$thumbname="th".$data["picture2"];

if(substr("",0,7)!="http://"; && !file_exists(GetUploadFolder("picture1").$thumbname))

$thumbname=$data["FileNameField"];

$value="<a href=\"Test_view.php?editid1=".$data["TestID"]."\">";

$value.="<img";

if($thumbname==$data["picture2"])

{

$value.=" width=100";

$value.=" height=100";

}

$value.=" border=0";

$value.=" src=\"".htmlspecialchars(AddLinkPrefix("picture2",$thumbname))."\"></a>";

}
what I wanted is that the tumbnails of field 'picture1'...would show a preview of the picture 'picture2'

and when clicked on redirect the user to the view page to see the full size 'picture2'
But it is not working...what should be done?
Thanks Jane....

J
Jane 9/28/2007

Hi,
here is the step-by-step instruction:

  1. check off picture1 (large image) on the list, edit, add pages, picture2 (thumbnail image) on the view page only on the Choose fields tab
  2. select custom for the picture1 field on the "View as" settings dialog and add following code in it:
    global $data;

    $value = "<a href=\"TableName_view.php?editid1=".$data["UserID"]."\"><img border=0 src=\"TableName_imager.php?field=picture2&alt=picture1&key1=".$data["UserID"]."\"></a>";


3. select Custom for the picture2 field on the "View as" settings dialog and add following code in it:

global $data;

$value = "<img src=\"TableName_imager.php?field=picture1&key1=".$data["UserID"]."\">";

I
Idol author 9/28/2007

Hi,

here is the step-by-step instruction:

  1. check off picture1 (large image) on the list, edit, add pages, picture2 (thumbnail image) on the view page only on the Choose fields tab
  2. select custom for the picture1 field on the "View as" settings dialog and add following code in it:


Jane, hi again
Now it's working beautifully....you saved me once again! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=21757&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
The only thing that remains is the size of the tumbnail and the fullsize image...if there are codes to do these two fuctions below.I'll be very happy!
View page image(the big picture)....slightly smaller than original picture uploaded by the user(if possible a code that would recognize the original shape of the image and thereby resize it)
Tumbnail image(the small picture)....very small size of the original picture(if possible a code that would recognize the original shape of the image and thereby resize it)
the reson that I'm seeking for not to have a hard coded resizing of the image width and height is that

sometimes the image is like this:the hight of the image!


and sometimes the image is wider like this:


If there isn't a code that would do this, I'll use the hard coded resizing system..like 100100 for the tumbnail pictures....and 500500 for the larger view of the picture!
Jane...thanks......

Alexey admin 10/1/2007

Hi,
PHPRunner preserves aspect ratio when creating thumbnails.

Looks like there is something wrong with your settings.

Please double-click your picture1 field in Visual Editor and make screenshots of View as and Edit as tabs.

Post these screenshots here or send to support@xlinesoft.com
Do the same with picture2 field.

I
Idol author 10/1/2007

Hi,

PHPRunner preserves aspect ratio when creating thumbnails.

Looks like there is something wrong with your settings.

Please double-click your picture1 field in Visual Editor and make screenshots of View as and Edit as tabs.

Post these screenshots here or send to support@xlinesoft.com
Do the same with picture2 field.


Hi,Alexey

How are you?
My Fields of picture1 & picture2 are custom made...and I'm waiting for Jane to give me the resizing codes to add to the already inserted codes!...the codes are published by Jane in this thread...for now the size of the tumbnail and view size of the picture are exactely the same....becuase we haven't yet given the size code into the original codes....
So both tumbnail and view pictures are fullsize picture as it's origianl propotions!

Alexey admin 10/1/2007

Ok,
then please show me screenshot of your pages where I can see image resized wrong.

I
Idol author 10/1/2007

Ok,

then please show me screenshot of your pages where I can see image resized wrong.


Alexy...we haven't yet given a resizing codes to these fields...therefor the tumbnail and the view picture are in their original size...when we give a hard coded sizes..like 100100 or 500500....then we can see if the images are in a proper propotions to their original shapes!
Now it's like this, fullsize images in both list and view pages!...
Listpage


And the viewpage

Alexey admin 10/1/2007

when we give a hard coded sizes..like 100100 or 500500


Please clarify where do you specify these sizes.

I
Idol author 10/1/2007



Please clarify where do you specify these sizes.


We haven't yet given any resizing codes into these codes.....
But from my experience, when we give a picture hard coded sizes...if the uploaded picture is smaller, or the hight of the image is too high in propotion to the hard coded sizes.....the posted image would look deformed!
examples below would clarify what I've meant!
The original uploaded picture:


The very image after hard coded resizing:

Sergey Kornilov admin 10/1/2007

We haven't yet given any resizing codes into these codes.....


You have to try it first before asking this question over and over again. PHPRunner does proper resizing maintaining the aspect ration.

I
Idol author 10/1/2007



You have to try it first before asking this question over and over again. PHPRunner does proper resizing maintaining the aspect ration.


Sergey,
I'm not good at creating codes...but some how I added this line to the tumbnail picture's field...and the result was exactley like I thought....I rewrite the code here:
global $data;

$value = "<a href=\"_TableName_view.php?editid1=".$data["UserID"]."\"><img border=0 width=100 height=100 src=\"_TableName_imager.php?field=picture1&alt=picture2&key1=".$data["UserID"]."\"></a>";
As you can see I added a hard coded size 100*100...and the result was a deformed picture of the original picture on the list page....(I only added this part into the code width=100 height=100
Sorry to bother you guys so much....Thanks all of you guys for your supports and helps...

I
Idol author 10/2/2007

My question still stands...please help me with this....
Is there a solution to this deformed images to make them proper or not!....
Or I have to move on!...and keep it the way it is?

Alexey admin 10/3/2007

Hi,
here is the advise we gave you in the beginning of the thread

To enable thumbnails just double-click your field in Visual Editor, select Edit as tab, choose Image or File/Image type and check off Create Thumbnail box.

Did you try it ?

....(I only added this part into the code width=100 height=100

Don't do that.

I
Idol author 10/3/2007

Hi,

here is the advise we gave you in the beginning of the thread
Did you try it ?
Don't do that.


Alexey hi,
My picture fields are custom made and thats why they don't withhold an option of checking off/on of tumbnails...and the reason for that is:
please read this Q&A between me and Jane:

what I wanted is that the tumbnails of field 'picture1'...would show a preview of the picture 'picture2'

and when clicked on redirect the user to the view page to see the full size 'picture2'
But it is not working...what should be done?
Thanks Jane....

Hi,

here is the step-by-step instruction:

  1. check off picture1 (large image) on the list, edit, add pages, picture2 (thumbnail image) on the view page only on the Choose fields tab
  2. select custom for the picture1 field on the "View as" settings dialog and add following code in it:
  3. select Custom for the picture2 field on the "View as" settings dialog and add following code in it:


Thats why I need a completing code to complete the already embeded code (in the custom made field) for resizing!

Sergey Kornilov admin 10/4/2007

Dear Idol-Nr1,
we definitely speak different languages here.
To speed up the process post what you currently have to Demo Account and contact support team at support@xlinesoft.com.

I
Idol author 10/4/2007

Dear Idol-Nr1,

we definitely speak different languages here.
To speed up the process post what you currently have to Demo Account and contact support team at support@xlinesoft.com.


Hi Sergey!
Here is the URL to the demo account of mine at your site:
http://demo.asprunner.net/elhamk%5Fhotmail...leName_list.php
thank you...