Forums

Photo upload page with title tag request (5 posts)

  1. dkuehne
    Member
    Posted 7 years ago #

    Someone recently fixed the "upload.php" form to rid it of an extraneous ";" and allow the thumbnail code to show. I downloaded this file--it works great BTW. I was wondering if it was no too much of a problem to get a text field allowing for a "title" tag too.

    I.E. incorrectly shows the "alt" tag in a tooltip and the way to override this for I.E. is to use the title tag. Other browsers (like Firefox) doing it correctly, will not show a tooltip unless there is a title tag. It would be nice to have this ability for my friend's blog--he knows absolutly nothing about html and this might ease the pain for him. For me, It's easy to just type it in.

    Dave Kuehne

  2. cableboy
    Member
    Posted 7 years ago #

    where can i get this file?

  3. thitipatn
    Member
    Posted 7 years ago #

    You can get one of the code at:

    http://www.blueblurry.com/upload-code/

  4. thitipatn
    Member
    Posted 7 years ago #

    After getting the file, to change the "alt" to "title", just find these two sections of the code "//Full Size// and //Thumbnail// and replace them with below:

    // Full Size //
    $img_size = getimagesize($pathtofile);

    if ( ereg('image/',$img1_type) )

    $piece_of_code = "<img src='". get_settings('fileupload_url') ."$imgpath/$img1_name' title='$imgdesc' $img_size[3]/>";
    else
    $piece_of_code = "$imgdesc";

    $piece_of_code = htmlspecialchars( $piece_of_code );
    // End Full Size //

    // Thumbnail //
    if (file_exists("". get_settings('fileupload_realpath') ."$imgpath/thumb-$img1_name") )
    { if ( ereg('image/',$img1_type) )
    { $img_size = getimagesize("". get_settings('fileupload_realpath') ."$imgpath/thumb-$img1_name");
    $piece_of_code_thumb = "<img src='". get_settings('fileupload_url') ."$imgpath/thumb-$img1_name' title='$imgdesc' $img_size[3]/>"; }
    else
    { $piece_of_code = "$imgdesc"; }

    $piece_of_code_thumb = htmlspecialchars( $piece_of_code_thumb ); }

    else {$piece_of_code_thumb = "Thumbnail code not available."; }
    // End Thumbnail //

  5. thitipatn
    Member
    Posted 7 years ago #

    Let me know if it doesn't work.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.