Web Page Fun
September 09, 2010, 03:35:29 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: If you would like to learn HTML, stop in at the "Welcome to the board" Forum to let us know, and someone will stop in and help you. smiley_yes
 
   Home   Help Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: PHP and GD Library  (Read 1380 times)
0 Members and 1 Guest are viewing this topic.
Gail
Administrator
Hero Member
*****
Offline Offline

Posts: 860


Gail's Best Buddy


View Profile WWW
« on: March 02, 2005, 01:36:30 AM »

Hi All,

I have been fooling around this afternoon and evening with the PHP Thumb Nailer script. I thought if I could get it working I would post the link to it on "Gail's Playground". However, I haven't had any luck.

I tried 2 different albums on both of my Domain Names. The one titled "autumn" works fine on my home server - I haven't tried the other one. Actually, the only thing that did not work was the 'edit" did not show. I have tried a very basic GD Library script on the 2 servers (emax and TCH) and they work so the GD Library is being detected by the script.

I keep getting the same error message on both of them. I haven't done a screen shot of the messages - it is getting late so I want to shut the computer down soon.

Tom, if you are interested in having a look (don't feel you have to do it right away) - the 2 folders are "autumn" and "gdtest". I did change the permission and I also password protected the file_info/admin folder. Apparently you have to do that so the admin function works.

I just thought it would be interesting to compare it with Gallery and also with JAlbum. It is rather interesting - you can have visitors rate the pictures.

I may play with it again tomorrow.

Gail
Logged

Practice random acts of kindness.

Tom
Administrator
Hero Member
*****
Offline Offline

Posts: 834



View Profile WWW
« Reply #1 on: March 02, 2005, 03:08:47 AM »

Well I have it working http://www.gailplayground.com/autumn/ (I had to add a few just to see why and what Wink  )

Now the hard part is to tell what I did, and harder even why I did it.

I think it was this line 115 of 'index.php'
Code:
$d = dir("./file_info/descriptions/");
But I noticed that the directory 'file_info' was actually named 'File_Info'. Ok on a Windows server, not OK on an Unix. So I changed the actual folder name to 'file_info'. Solved that problem, but then another.
<looking for it Sad >

OK, here it is...Same file, but up at lines 18 and 19, the names were capitalized, so I made them lower case, that solved that problem Cheesy
Code:
# Path to Header and footer files (not required)
#-----------------------------------------------
$header = "file_info/header.htm";
$footer = "file_info/footer.htm";
That's why I tell Richard, just always make file names lower case. You notice down lower in this file, where 'file_info' is used, he has everything lower case......

OK, super, but now write errors, when opening a thumbnail. I looked at chmods, the 'descriptions' folder was at 777, OK....The desciption files were at 644, so I changed to 666, so the script could write to it. Then everything worked perfect. But what was going to set future uploads to 666? I uploaded some images, and everything worked, no other intervention needed. I look at the server, the new ones are at 644. But it works. ^_^  I notice the 'owner' of the ones I uploaded are '99', which means the 'script' is the owner of the images. The other images, that Gail put in, are '32072', which relates back to 'Gail' the server account owner, is the owner of the images. (I know this from working with Gallery, but cannot explain it any better). So why the 2 different owners, I don't know  blink
But then, its bed time Cheesy
Logged

<<10 points if you can name this 'character'

From the opening scenes of Animal House...
"Knowledge Is Good"
Gail
Administrator
Hero Member
*****
Offline Offline

Posts: 860


Gail's Best Buddy


View Profile WWW
« Reply #2 on: March 02, 2005, 02:30:35 PM »

Hi Tom,

Thank you very much. I never noticed the upper case in the File_Info. I have been in the habit of using lower case. I know from when I first started uploading to the Internet - some things worked fine on my computer but not on the web. I came to realize I had named a file using uppercase but used lowercase in the html page when referring to the file. I think I put in another post here, your computer is more forgiving than the server you upload to.

There was one other problem but I managed to solve it. The "Edit Description" still was not showing in the window that opens when you click on a picture. I looked at the index.php but there is very little to change there. I then got the idea to go to his site again and looked at his sample album. I clicked on one of the pictures and it opened in the window. I then looked at his code - there was one line missing in the code of the (download.php) file that I downloaded. You guessed it - it was the line relating to the "Edit Description". I copied and pasted it and uploaded the corrected copy of the download.php file - now the photos can be edited (the description).

If you want to Tom, you can create yourself as a new member in the Admin for the file_info/admin. Then you can put a description in for the few photos you posted. I thought I would play around with changing the background colour and perhaps the header and then we can all have a look. I like the idea of rating - it can be an interactive thing for the visitor. I know some people wouldn't bother but I think some would. Right now, I really don't have much interactiveness (is that a word?) wacko  on my site.

Anyhow, looks like everything is working.

Gail
Logged

Practice random acts of kindness.

Gail
Administrator
Hero Member
*****
Offline Offline

Posts: 860


Gail's Best Buddy


View Profile WWW
« Reply #3 on: March 04, 2005, 03:11:08 PM »

Hi All,  Cheesy

I have been fooling around with the PHP Thumbnailer - I managed to get a background done - and a new header. I used an internal style sheet to get the background changed - I tried to change the background color and the entire background changed - you could not see the header image. It was as if I had taken a paint brush and painted the canvas completely - painting over anything in sight!

I had things looking pretty good - the ratings and date and time of the upload showed. However; I noticed the footer wasn't being read. I looked at the index.php file and he did not have anything pertaining to the footer in the code (except at the top). I opened the index.php file from his download script and copied and pasted the code so the footer would be read.

I tried the page again and there was the footer - whoopee I says  :boing  :yes

Well, just hold on old girl. Now you have lost the d... rating and date and time of upload. I removed the code for the footer but never got the other info back.  :Wall Bash It should show under each picture in the album - the only thing that shows is the access number. When you click on an individual photo and the box opens, the rating still shows there. I have looked at the index.php file but I am to the point where everything is looking the same. If anyone else wants to take a look, please do.

I really like the way my video page turned out and I like the look of the photo album and the idea of rating by viewers if they wish. Without knowing PHP, it seems to me the author's work is somewhat shoddy? There have been things that need to be changed to get the script to work before you even think about changing back ground colour, etc.

Anyway, here is the link to the album if you want to have a look.

Think I will get back to reading my "Perl" book before I forgot everything that I have read previously in the book.

Gail
Logged

Practice random acts of kindness.

Tom
Administrator
Hero Member
*****
Offline Offline

Posts: 834



View Profile WWW
« Reply #4 on: March 04, 2005, 04:47:36 PM »

Hey it looks good Gail. lot's of work you have put into it.

I went and deleted the images I put in while 'testing', but I see it does not remove them from the 'thumbnail' page. So now when you click it, you get error's, cause the full size picture is gone.

So tonight I'll have to do some thinking as to how/why does/doesn't that work <_<
Unless, you beat me to it, which the way your going, just might happen  Shocked  
Logged

<<10 points if you can name this 'character'

From the opening scenes of Animal House...
"Knowledge Is Good"
Tom
Administrator
Hero Member
*****
Offline Offline

Posts: 834



View Profile WWW
« Reply #5 on: March 04, 2005, 05:00:13 PM »

Never mind, I fixed it already Cheesy  After the 'change, a link shows up top left, to 'reconcile' the page. So I clicked it, and all is now OK.  
Logged

<<10 points if you can name this 'character'

From the opening scenes of Animal House...
"Knowledge Is Good"
Tom
Administrator
Hero Member
*****
Offline Offline

Posts: 834



View Profile WWW
« Reply #6 on: March 04, 2005, 05:14:54 PM »

Well I guess I'm losing it Gail. Now I re-read, and see you are wondering about the 'stats' etc. I went and looked, and there are 2 index.php files. The one to edit, for the 'main' page display, is the index.php directly in the album folder.....with all the images. 1 for yes, 0 for no.

Code:
$display_filename = "1";
$display_accesses = "1";
$display_rating = "1";
$display_date = "1";

Then, within that folders 'file_info/admin' folder, there is another 'index.php' file, that looks to be the exact same. I edited it to be all '0', but I don't know where that is displayed when viewing blink

So I guess the only safe thing to do, it go back out to work for me lol  
Logged

<<10 points if you can name this 'character'

From the opening scenes of Animal House...
"Knowledge Is Good"
Gail
Administrator
Hero Member
*****
Offline Offline

Posts: 860


Gail's Best Buddy


View Profile WWW
« Reply #7 on: March 04, 2005, 06:10:06 PM »

Hi Tom,

Thanks for your help.

Quote
$display_filename = "1";
$display_accesses = "1";
$display_rating = "1";
$display_date = "1";

You know I looked at that - except it was - "" "","1"," "," "

I was going to put in the "1" in the other 3 spots - I know "0" would mean do not display and "1" would mean to display but I thought I better leave it alone. This is what I mean when I say some of his work or script is shoddy.

I had no idea there was the other index.php (in the file_info/admin folder). If something doesn't work later, we can guess that may be the problem - maybe they should be a "1" instead of "0".

I had done another "header" with the text in blue - I was trying to pick up the bit of blue in the background.  You don't see the blue as much as you did when it was darker. I changed the opacity to lighten up the background so the black text could be read. I have currently put the header up with the blue text.

Now people can have a look and see what they think of the script's outcome.

I was also reading at TCH about Coppermine Gallery - has anyone ever tried that script? I read that you can use it for multimedia (photos, video, music). Other than being able to accomplish more, is it the same idea as "Gallery"? Now I will have everyone confused.  lol

Gail

Thought I would post the link again since there have been a few posts since I put it in the first time. Click here to see the album.
Logged

Practice random acts of kindness.

Tom
Administrator
Hero Member
*****
Offline Offline

Posts: 834



View Profile WWW
« Reply #8 on: March 05, 2005, 01:13:28 AM »

Yep, I agree the code wasn't 'polished', but you and I can do the polishing Cheesy , cause I sure doubt we could do the basic code, yet B)

All I know about Coppermine Gallery, is it can be installed using Fantastico in your cpanel. So here you all go, Gail Richard and Lorraine, go and install and let me know about it, thumbs up or thumbs down :dunno

http://coppermine.sourceforge.net/ Boy, it sure has the look of phpbb forum, but I haven't heard of any connection between them. It looks interesting, but I always get further behind when I start looking at 'new and interesting'  lol
Those income tax's are still sitting here to do Shocked  
Logged

<<10 points if you can name this 'character'

From the opening scenes of Animal House...
"Knowledge Is Good"
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.126 seconds with 19 queries.