https://www.icyphoenix.com/viewtopic.php?f=26&t=1477
-----------------------------------
luckyou03
Sat 31 Mar, 2007 08:37

FAP CUSTOMIZATION - Upload Redirect
-----------------------------------
I see that once you upload a pic you have two options, go to the index page or go to the category page. So once you uploaded thepic you have to hunt through the page and find there uploaded pic. Is there a way to redirect the user to the uploaded mid size pic page of the pic they just uploaded? thanks


-----------------------------------
Artie
Mon 02 Apr, 2007 00:19

Re: Upload Redirect
-----------------------------------
Is it not good enough that you can redirect to the category, if you have the sort order to DESC it should be the first thumbnail in the first row.

I will agree with you that redirecting to the mid thumb would be nice, but that would require at the very least another sql query to get the pic_id...and then there is the issue of ---  if you have pic_approval set to ON (which is an issue in either case)


-----------------------------------
luckyou03
Mon 02 Apr, 2007 16:54

Re: Upload Redirect
-----------------------------------
What if you redirected the user after upload to their domain_com/album.php?user_id=X&mode=list

If you upload as a guest then you'd be directed to domain_com/album_cat.php?cat_id=X

I'm not using personal galleries at all, no pic approval.

thanks for your time


-----------------------------------
Artie
Tue 03 Apr, 2007 20:55

Re: Upload Redirect
-----------------------------------
IMO: Best case would be redirect to mid-thumb, but seeing as this would require another sql next best would be as it is now.

I don't see the point in redirecting to [highlight=#FFFFAA]domain_com/album.php?user_id=X&mode=list[/highlight]  in place of the current setup
.... but it should be no problem to modify for this.


-----------------------------------
Artie
Wed 04 Apr, 2007 01:24

Re: Upload Redirect
-----------------------------------
I got to lookin at album_upload a little closer an saw that the pic_id is already retrieved for email notification.
This should give you a link to view the pic, but only if approval is off and it is not a multi-pic upload

OPEN [b]album_upload.php[/b]

FIND
[codeblock]$message = $lang['Album_upload_successful'];[/codeblock]
AFTER ADD
[codeblock]if ($pic_count == 1)
		   {
        $pic_id = $new_pic_id['pic_id'];
        $message .= "<br /><br />" . sprintf($lang['Click_view_pic'], "<a href="" . append_sid(album_append_uid("album_showpage.$phpEx?pic_id=$pic_id")) . "">", "</a>");
	     }[/codeblock]

OPEN [b]language/lang_english/lang_album_main.php[/b]

FIND
[codeblock]$lang['Click_return_album_index'] = 'Click %shere%s to return to the Album Index';[/codeblock]
AFTER ADD
[codeblock]$lang['Click_view_pic'] = 'Click %shere%s to view your pic';[/codeblock]


-----------------------------------
luckyou03
Thu 12 Apr, 2007 05:28

Re: Upload Redirect
-----------------------------------
You are awesome! thank you


-----------------------------------
Artie
Thu 12 Apr, 2007 20:34

Re: Upload Redirect
-----------------------------------
[quote user="luckyou03" post="12013"]You are awesome! thank you[/quote]
That's debatable, however you are still welcome :icy_lol_flag:


-----------------------------------
Mighty Gorgon
Sun 15 Apr, 2007 20:29

Re: Upload Redirect
-----------------------------------
[quote user="Artie" post="12057"][quote user="luckyou03" post="12013"]You are awesome! thank you[/quote]
That's debatable, however you are still welcome :icy_lol_flag:[/quote]
Yes, but you are awesome for me as well. :wink:

...and luckyou03 continues to be welcome! :mri:


-----------------------------------
Pete_Z
Sun 22 Apr, 2007 08:39

Re: Upload Redirect
-----------------------------------
Good idea, However I get "This pic does not exist" 

This is the URL it takes me to...
/album_showpage.php?pic_id=&user_id=298


-----------------------------------
pepi
Sun 22 Apr, 2007 13:24

Re: Upload Redirect
-----------------------------------
[quote user="Pete_Z" post="12583"]Good idea, However I get "This pic does not exist" 

This is the URL it takes me to...
/album_showpage.php?pic_id=&user_id=298[/quote]

Hello

This is the URL it takes me to...
/album_showpage.php?pic_id=&user_id=2

Have the same problem
Pepi


-----------------------------------
Artie
Mon 23 Apr, 2007 02:17

Re: Upload Redirect
-----------------------------------
You must have email notification on new pic enabled in ACP, otherwise pic_id will have no value.


-----------------------------------
pepi
Mon 23 Apr, 2007 03:15

Re: Upload Redirect
-----------------------------------
[quote user="Artie" post="12609"]You must have email notification on new pic enabled in ACP, otherwise pic_id will have no value.[/quote]

Many thanks Artie 

but is there no why for email notification on new pic [b]disabled[/b]

Pepi


-----------------------------------
Artie
Mon 23 Apr, 2007 03:51

Re: Upload Redirect
-----------------------------------
pepi, it should be possible. 
One would have to move the sql that get's the new_pic_id outside of the check for email notification.

I don't have time right now...it's bedtime and I have an early wakeup  :oops:


