Author Topic: How to redirect to home page or image detail page after uploaded succcessfully?  (Read 8313 times)

0 Members and 1 Guest are viewing this topic.

Offline apaunganhote

  • Newbie
  • *
  • Posts: 22
    • View Profile
Hi,

Just now I started using 4images and I would like to know how to redirect to home page after upload image successfully.

Currently, after we uploaded image successfully, it shows the upload image and text.

What I want to get is, after showing the uploaded image and text, may be 4 or 5 seconds, it will redirect back to home page or the detail page of that image ?

I know in some point, it can't be redirect to detail page of that image if we are not enable the direct upload coz it's still as validated image. But I will enable direct upload for everyone.  That's why.

Please kindly help me out. Thank you so much.

With Regards,

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
In member.php

Find:
Code: [Select]
     $media = $site_template->parse_template("media/".$file_extension);
      $content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";

Replace with:  (for index.php redirect)
Code: [Select]
     $media = $site_template->parse_template("media/".$file_extension);
 $media .= '<meta http-equiv="refresh" content="4;url='.$site_sess->url(ROOT_PATH."index.php").'">';
      $content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";

or with: (for details.php redirect)
Code: [Select]
     $media = $site_template->parse_template("media/".$file_extension);
 $media .= '<meta http-equiv="refresh" content="4;url='.$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id).'">';
      $content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";

Offline apaunganhote

  • Newbie
  • *
  • Posts: 22
    • View Profile
Great. It works perfect!

Thank you so much  :D