 |
|
 |
|
Next: Bloody Trojan!! - help needed
|
| Author |
Message |
External

Since: Jul 12, 2004 Posts: 21
|
(Msg. 1) Posted: Tue Aug 03, 2004 7:12 pm
Post subject: image of the week type script? Archived from groups: alt>www>webmaster, others (more info?)
|
|
|
hi there
i need a site where the client can upload an image every week, with a
caption, (so pref use the php upload image function to provide a web based
interface)
and that then automatically publishes and becomes the image of the week, and
all previous weeks images become smaller thumbnails below.... anybody have
an idea of how to do this? or is there a predesigned script i could use?
thanks >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Aug 03, 2004 Posts: 3
|
(Msg. 2) Posted: Tue Aug 03, 2004 7:12 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
1 wrote:
>hi there
>i need a site where the client can upload an image every week, with a
>caption, (so pref use the php upload image function to provide a web based
>interface)
>and that then automatically publishes and becomes the image of the week, and
>all previous weeks images become smaller thumbnails below.... anybody have
>an idea of how to do this? or is there a predesigned script i could use?
>thanks
>
>
Is there a reason why something simple like this wouldn't work?
<?php
echo
'<table>
<tr>
<td>
<img src="url_of_image" ><br>' ;
include( 'url_of_caption' ) ;
echo
' </td>
</tr>
</table>' ;
Margaret
--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Jul 01, 2003 Posts: 411
|
(Msg. 3) Posted: Tue Aug 03, 2004 7:12 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
1 wrote:
> hi there
> i need a site where the client can upload an image every week, with a
> caption, (so pref use the php upload image function to provide a web based
> interface)
> and that then automatically publishes and becomes the image of the week, and
> all previous weeks images become smaller thumbnails below.... anybody have
> an idea of how to do this? or is there a predesigned script i could use?
> thanks
This should be fairly easy...
Create your form that will upload the image and store the caption in a
file (single line append).
When saving the file, generate both the thumbnail and large versions of
the image (use GD or ImageMagick to resize accordingly). Save the image
as a JPEG with a file name as a timestamp (http://www.php.net/time).
(Then you'll have image names like "1091546757.jpg"
Append the caption to a single line of the file.
Now for the front end of things...
Grab all the file names from the directory (http://www.php.net/readdir)
into an array and sort them according to filename. (Watch for the "."
and ".." entries, you won't want those.)
Read in the captions (http://www.php.net/file), which will already be
sorted by date.
Flip both arrays, output element 0 of each for the pic of the week.
The rest in the array would be previous images...
--
Justin Koivisto - spam RemoveThis @koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Aug 03, 2004 Posts: 3
|
(Msg. 4) Posted: Tue Aug 03, 2004 7:12 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Sorry, I see now that I didn't read your posting all the way through,
so while my suggestion will handle the current image, it does nothing
about relegating previous images.
Is there any upper bound on the number of stale images to be
relegated?
I wrote:
>1 wrote:
>
>>hi there
>>i need a site where the client can upload an image every week, with a
>>caption, (so pref use the php upload image function to provide a web based
>>interface)
>>and that then automatically publishes and becomes the image of the week, and
>>all previous weeks images become smaller thumbnails below.... anybody have
>>an idea of how to do this? or is there a predesigned script i could use?
>>thanks
>>
>>
>
>Is there a reason why something simple like this wouldn't work?
><?php
>echo
>'<table>
> <tr>
> <td>
> <img src="url_of_image" ><br>' ;
>include( 'url_of_caption' ) ;
>echo
>' </td>
> </tr>
></table>' ;
>
>Margaret
--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Jul 01, 2003 Posts: 411
|
(Msg. 5) Posted: Tue Aug 03, 2004 7:12 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Justin Koivisto wrote:
> Append the caption to a single line of the file.
Sorry, forgot the reference... <a style='text-decoration: underline;' href="http://www.php.net/fopen" target="_blank">http://www.php.net/fopen</a> &
<a style='text-decoration: underline;' href="http://www.php.net/fwrite" target="_blank">http://www.php.net/fwrite</a>
--
Justin Koivisto - spam.RemoveThis@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Jul 12, 2004 Posts: 21
|
(Msg. 6) Posted: Tue Aug 03, 2004 8:24 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
the archive will be ongoing - i.e. no upper limit...
"Margaret MacDonald" <scratch65536 DeleteThis @att.not.invalid> wrote in message
news:9obvg05sc1ietus4ba9fdtrfj34qfj9e8a@4ax.com...
> Sorry, I see now that I didn't read your posting all the way through,
> so while my suggestion will handle the current image, it does nothing
> about relegating previous images.
>
> Is there any upper bound on the number of stale images to be
> relegated?
>
> I wrote:
>
> >1 wrote:
> >
> >>hi there
> >>i need a site where the client can upload an image every week, with a
> >>caption, (so pref use the php upload image function to provide a web
based
> >>interface)
> >>and that then automatically publishes and becomes the image of the week,
and
> >>all previous weeks images become smaller thumbnails below.... anybody
have
> >>an idea of how to do this? or is there a predesigned script i could use?
> >>thanks
> >>
> >>
> >
> >Is there a reason why something simple like this wouldn't work?
> ><?php
> >echo
> >'<table>
> > <tr>
> > <td>
> > <img src="url_of_image" ><br>' ;
> >include( 'url_of_caption' ) ;
> >echo
> >' </td>
> > </tr>
> ></table>' ;
> >
> >Margaret
>
> --
> (To mail me, please change .not.invalid to .net, first.
> Apologies for the inconvenience.)<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Jul 12, 2004 Posts: 21
|
(Msg. 7) Posted: Tue Aug 03, 2004 8:38 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
cheers justin
btw you dont have a source for any code that is similar do you?
my php skills are basic to say the least,
"Justin Koivisto" <spam RemoveThis @koivi.com> wrote in message
news:cdOPc.25$j1.974@news7.onvoy.net...
> Justin Koivisto wrote:
>
> > Append the caption to a single line of the file.
>
> Sorry, forgot the reference... <a style='text-decoration: underline;' href="http://www.php.net/fopen" target="_blank">http://www.php.net/fopen</a> &
<font color=purple> > <a style='text-decoration: underline;' href="http://www.php.net/fwrite</font" target="_blank">http://www.php.net/fwrite</font</a>>
>
> --
> Justin Koivisto - spam RemoveThis @koivi.com
> PHP POSTERS: Please use comp.lang.php for PHP related questions,
> alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Feb 27, 2004 Posts: 16
|
(Msg. 8) Posted: Tue Aug 03, 2004 8:57 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I noticed that Message-ID: <lbOPc.24$j1.974@news7.onvoy.net> from Justin
Koivisto contained the following:
>Create your form that will upload the image and store the caption in a
>file (single line append).
I'd store all the stuff about the image in a database table( image URL
thumb URL, Image caption, thumb caption, alt text, date created etc.
This is more flexible as it allows you to add extra information
(photographer, location, model name, agency...) at a later date, if need
be. The data can also be used for other things.
Fetch the data with an ordered query and the first record will be pic of
the week. It stays till you upload a new one.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs <a style='text-decoration: underline;' href="http://www.ckdog.co.uk/rfdmaker/" target="_blank">http://www.ckdog.co.uk/rfdmaker/</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Jul 01, 2003 Posts: 411
|
(Msg. 9) Posted: Tue Aug 03, 2004 9:07 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
1 wrote:
>
> "Justin Koivisto" <spam.DeleteThis@koivi.com> wrote in message
> news:cdOPc.25$j1.974@news7.onvoy.net...
>
>>Justin Koivisto wrote:
>>
>>
>>>Append the caption to a single line of the file.
>>
>>Sorry, forgot the reference... <a style='text-decoration: underline;' href="http://www.php.net/fopen" target="_blank">http://www.php.net/fopen</a> &
>>http://www.php.net/fwrite
>>
> cheers justin
> btw you dont have a source for any code that is similar do you?
> my php skills are basic to say the least,
Sure, for the image part of it anyway:
<a style='text-decoration: underline;' href="http://www.koivi.com/php-gd-image-watermark/" target="_blank">http://www.koivi.com/php-gd-image-watermark/</a>
--
Justin Koivisto - spam.DeleteThis@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Jul 01, 2003 Posts: 411
|
(Msg. 10) Posted: Tue Aug 03, 2004 9:08 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Geoff Berrow wrote:
> I noticed that Message-ID: <lbOPc.24$j1.974@news7.onvoy.net> from Justin
> Koivisto contained the following:
>
>
>>Create your form that will upload the image and store the caption in a
>>file (single line append).
>
>
> I'd store all the stuff about the image in a database table( image URL
> thumb URL, Image caption, thumb caption, alt text, date created etc.
> This is more flexible as it allows you to add extra information
> (photographer, location, model name, agency...) at a later date, if need
> be. The data can also be used for other things.
>
> Fetch the data with an ordered query and the first record will be pic of
> the week. It stays till you upload a new one.
I would as well, but the OP had said something about mysql being
overkill in an earlier thread today...
--
Justin Koivisto - spam DeleteThis @koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Aug 02, 2004 Posts: 145
|
(Msg. 11) Posted: Tue Aug 03, 2004 9:30 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
1 wrote:
> the archive will be ongoing - i.e. no upper limit...
So you are happy that in three years' time, the page will have over 150
images on it?
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ <a style='text-decoration: underline;' href="http://tobyinkster.co.uk/contact" target="_blank">http://tobyinkster.co.uk/contact</a>
Now Playing ~ ./manic_street_preachers/you_stole_the_sun_from_my_heart.ogg<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Jul 12, 2004 Posts: 21
|
(Msg. 12) Posted: Tue Aug 03, 2004 11:37 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Toby Inkster" <usenet200408.TakeThisOut@tobyinkster.co.uk> wrote in message
news:pan.2004.08.03.17.30.49.424676@tobyinkster.co.uk...
> 1 wrote:
>
> > the archive will be ongoing - i.e. no upper limit...
>
> So you are happy that in three years' time, the page will have over 150
> images on it?
>
> --
> Toby A Inkster BSc (Hons) ARCS
<font color=purple> > Contact Me ~ <a style='text-decoration: underline;' href="http://tobyinkster.co.uk/contact</font" target="_blank">http://tobyinkster.co.uk/contact</font</a>>
> Now Playing ~ ./manic_street_preachers/you_stole_the_sun_from_my_heart.ogg
we'll worry about that in 3 years time!<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Sep 14, 2004 Posts: 2384
|
(Msg. 13) Posted: Tue Aug 03, 2004 11:56 pm
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
1 wrote:
> "Toby Inkster" <usenet200408 RemoveThis @tobyinkster.co.uk> wrote in message
> news:pan.2004.08.03.17.30.49.424676@tobyinkster.co.uk...
>> 1 wrote:
>>
>> > the archive will be ongoing - i.e. no upper limit...
>>
>> So you are happy that in three years' time, the page will have over
>> 150 images on it?
>>
>> --
>> Toby A Inkster BSc (Hons) ARCS
<font color=green> >> Contact Me ~ <a style='text-decoration: underline;' href="http://tobyinkster.co.uk/contact</font" target="_blank">http://tobyinkster.co.uk/contact</font</a>>
>> Now Playing ~
>> ./manic_street_preachers/you_stole_the_sun_from_my_heart.ogg
>
> we'll worry about that in 3 years time!
Something I never do.
When I make stuff, I am always thinking ahead, what if the site gets
*really* busy.
Efficient stuff that works well on busy sites, works a treat on quiet
sites too!
--
Charles Sweeney
<a style='text-decoration: underline;' href="http://CharlesSweeney.com" target="_blank">http://CharlesSweeney.com</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Feb 27, 2004 Posts: 16
|
(Msg. 14) Posted: Wed Aug 04, 2004 12:25 am
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I noticed that Message-ID: <UwQPc.27$j1.1167@news7.onvoy.net> from
Justin Koivisto contained the following:
>> Fetch the data with an ordered query and the first record will be pic of
>> the week. It stays till you upload a new one.
>
>I would as well, but the OP had said something about mysql being
>overkill in an earlier thread today...
But once you are used to it, it's so easy, especially with phpMyadmin to
set up tables.
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs <a style='text-decoration: underline;' href="http://www.ckdog.co.uk/rfdmaker/" target="_blank">http://www.ckdog.co.uk/rfdmaker/</a><!-- ~MESSAGE_AFTER~ --> >> Stay informed about: image of the week type script? |
|
| Back to top |
|
 |  |
External

Since: Aug 11, 2004 Posts: 2
|
(Msg. 15) Posted: Wed Aug 11, 2004 4:16 am
Post subject: Re: image of the week type script? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
| Related Topics: | embedded image gallery remotely hosted script found - hi there, i just looked around for scripts for my new website (i will post url tomorrow) but i found a nice image gallery script (one line of javascript) here: http://www.photoalbum.net . i found it just interesting that it comes without frame or popup...
Unlucky week - Here's a little of what can happen and a warning to back everything up! I have a linux host (cable), which also acts as an apache server and backup. I have 4 inexpensive Windows XP machines (3 run bootleg copies of Win XP) networked to the linux host. ....
Some Week end amusements with your computer - Recently I discovered that www.brainbench.com actually has some interesting free tests to go with its free-basic-registration. Yes, they want you to pay/subscribe but they don't require it for the free tests. Some of the free tests include Html 4.0..
trying to contact 1and1 for a week - I have been trying to contact 1and1 on their main email for a week now concerning presales. Sent 2 emails. My feeling is if they do not care about presales you can imagine how little they care about answering email support for those that are already..
Worst design I have seen this week - http://www.taskblaster.com/ May not be bad in higher resolutions, I didn't check but is awful at 800X600 Click to view the FAQ and you will see what I mean... The page appears in the bottom frame only the frame is so tiny at 800X600 you can't read more... |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|