Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP SUPPORT - Logout After Picture Uploading + 2nd Problem Read More



Beda [ Wed 12 Sep, 2007 23:57 ]
Post subject: FAP SUPPORT - Logout After Picture Uploading + 2nd Problem Read More
At first thx for great FAP MOD

I have two problems

1st
After uploading picture to personal gallery I got redirection to my personal gallery but I'm also automatically logout, why Same problem I have with link to personal gallery in top header (Forum Index >> Album >> Personal Gallery Of ...) after click I got logout too

2nd
When I'm trying upload image which is not conforming with Upload rules I got only empty white screen and no warning screen that file is too big etc.


Thx for help
PS: sorry for my not perfect ENG language


Mighty Gorgon [ Mon 17 Sep, 2007 00:50 ]
Post subject: Re: Logout After Picture Uploading + 2nd Problem Read More
The first problem should have been solved... but I can't remember if it is in the latest version or not... maybe you have to be patient a bit until next release.

The second problem is strange... are you uploading pics using standard upload or nuffload?


Beda [ Tue 18 Sep, 2007 18:20 ]
Post subject: Re: Logout After Picture Uploading + 2nd Problem Read More
thx for response Mighty

I'm using standard uploading. I checked it again and I found that when I have ENABLED option Enabling this option, each image will be resized on the fly if needed (to keep image properties respecting the album settings in ACP). in Upload configuration I'll never get any warning But when it's DISABLED I can get warning for file size, file type but not for image size (again white screen)

With nuffload I got 404 Page not found on main window and small window with nuffload script is showing no progress and after few seconds it got closed without any uploaded picture With DISBLED all other nuffload's functions I got all warnings but after redirection I got again Logout and when file meet all specifications (limits = size, type etc.) I'm redirected to Login page

I also found that when I clicked on Upload Image button the link over the table "Forum Index » Album » Personal Gallery Of ..." did not load my translated text and there is English text Personal Gallery Of ... instead of my Czech translated version. And when I clicked on this to return into my personal gallery I got Logout too.


Mighty Gorgon [ Thu 20 Sep, 2007 01:35 ]
Post subject: Re: Logout After Picture Uploading + 2nd Problem Read More
Do you have a link and a test account for us to test please?


Beda [ Mon 24 Sep, 2007 10:58 ]
Post subject: Re: Logout After Picture Uploading + 2nd Problem Read More
Mighty Gorgon wrote: [View Post]
Do you have a link and a test account for us to test please?


Actually forum is in preparation stage on my local and because I have not public IP I can not give you test account In few weeks I'll have domain and hosting, then I'll give you test account

Thank You


Beda [ Mon 24 Sep, 2007 13:20 ]
Post subject: Re: Logout After Picture Uploading + 2nd Problem Read More
LogOut problem: I found that I have these troubles only with Personal Gallery not with Public galleries.

Upload in personal gallery message/redirection:

Code: [Hide] [Select]
if ($album_user_id == ALBUM_PUBLIC_GALLERY)
{
$message .= "<br /><br />" . sprintf($lang['Click_return_category'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}
else
{
$message .= "<br /><br />" . sprintf($lang['Click_return_personal_gallery'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}


$message .= "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");


I got logout when I waited for redirection and also when I clicked on the link Return to Personal gallery. It always generated URL something like this:
Code: [Hide] [Select]
http://localhost/album.php?user_id=2&amp;sid=f7e207c236f4457f54ebb457f0623080

instead of
Code: [Hide] [Select]
http://localhost/album.php?user_id=2&sid=f7e207c236f4457f54ebb457f0623080


Therefore I changed upload code to this:
Code: [Hide] [Select]
if ($album_user_id == ALBUM_PUBLIC_GALLERY)
{
$message .= "<br /><br />" . sprintf($lang['Click_return_category'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}
else
{
$message .= "<br /><br />" . sprintf($lang['Click_return_personal_gallery'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");
}


$message .= "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");

It is from album_delete script where I'm getting also logout after automatic redirection but I did not get logout after manual redirection (by click on Redirect to personal gallery). I sse problem on that &amp; in generated URL.


Beda [ Mon 24 Sep, 2007 13:44 ]
Post subject: Re: Logout After Picture Uploading + 2nd Problem Read More
I'm newbie in PHP coding but when I did these changes:

album_upload.php original part of code (at end):
Code: [Hide] [Select]
if ($thiscat['cat_approval'] == 0 && count($upload_errors) == 0)
{
if (album_is_debug_enabled() == false)
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . '">'
)
);
}
}
if ($album_user_id == ALBUM_PUBLIC_GALLERY)
{
$message .= "<br /><br />" . sprintf($lang['Click_return_category'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}
else
{
$message .= "<br /><br />" . sprintf($lang['Click_return_personal_gallery'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}


$message .= "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");


New part of code:
Code: [Hide] [Select]
if ($album_user_id == ALBUM_PUBLIC_GALLERY)
{
if ($thiscat['cat_approval'] == 0 && count($upload_errors) == 0)
{
if (album_is_debug_enabled() == false)
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . '">'
)
);
}
}
$message .= "<br /><br />" . sprintf($lang['Click_return_category'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}
else
{
if ($thiscat['cat_approval'] == 0 && count($upload_errors) == 0)
{
if (album_is_debug_enabled() == false)
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(album_append_uid("album.$phpEx")) . '">'
)
);
}
}
$message .= "<br /><br />" . sprintf($lang['Click_return_personal_gallery'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");
}


$message .= "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");


I simply moved that code for redirection inside that if clause with two different statements


Same changes I did in album_delete.php:

Original:
Code: [Hide] [Select]
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . '">')
);

if ($album_user_id == ALBUM_PUBLIC_GALLERY)
{
$message .= "<br /><br />" . sprintf($lang['Click_return_category'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}
else
{
$message .= "<br /><br />" . sprintf($lang['Click_return_personal_gallery'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");
}

$message .= "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");


New:
Code: [Hide] [Select]
if ($album_user_id == ALBUM_PUBLIC_GALLERY)
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . '">')
);
$message .= "<br /><br />" . sprintf($lang['Click_return_category'], "<a href="" . append_sid(album_append_uid("album_cat.$phpEx?cat_id=$cat_id")) . "">", "</a>");
}
else
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid(album_append_uid("album.$phpEx")) . '">')
);
$message .= "<br /><br />" . sprintf($lang['Click_return_personal_gallery'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");
}

$message .= "<br /><br />" . sprintf($lang['Click_return_album_index'], "<a href="" . append_sid(album_append_uid("album.$phpEx")) . "">", "</a>");


PS: during my tests it's working fine without Logout problem


Mighty Gorgon [ Tue 23 Oct, 2007 22:52 ]
Post subject: Re: Logout After Picture Uploading + 2nd Problem Read More
Wow Beda, thank you very much.

I have applied what you suggested to album_delete, but I have to think about album_upload, because in the meantime I have changed some codes on my package.





Powered by Icy Phoenix