• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

[XFR] User Albums

Status
Not open for further replies.
Once again, great add-on and i hope you'll continue the work soon :)

Some code suggestions for XfRu_UserAlbums_Helper_Album

1. checkAndCreateFolders =>
you could use XenForo_Helper_File::createDirectory
it creates the directory & index.html, so you don't need to take care of this:)

2. methods: getUserAlbumsMemberProfileTab & getUserAlbumsMemberProfileTabContent are unnecessary.
you don't call them a

the same 2 methods are also in XfRu_UserAlbums_Helper_Template

file xfru_useralbums_helper contains a false class XfRu_UserAlbums_Helper_Template

class: XfRu_UserAlbums_Model_Albums

there's 1 hardcoded phrase in XfRu_UserAlbums_Model_Albums ( const ALBUM_IS_NOT_VIEWABLE = 'Album is not viewable'; )

could you pls also use $fetchOptions in getAlbumsByIds, getLatestAlbums, getRandomAlbums

method generateAccessHash
why do you use here
PHP:
$hash = XenForo_Application::generateRandomString(10);
        while ($this->getUserAlbumIdByAccessHash($hash))
        {
            $hash = XenForo_Application::generateRandomString(10);
        }
$this->getUserAlbumIdByAccessHash returns only 1 value, soIMHO you don't need it

model XfRu_UserAlbums_Model_Images

1. would be cool if the methods would also have $fetchOptions specially getLatestImages and getRandomImages
 
Hey great job on the add-on. I noticed there is a minor bug in the comment model. Right now it is trying to pull the name of the album using the image id which can produce weird results if an image happens to have the same id as an album. Line 40 should be
Code:
ON (album.album_id = image.album_id)
instead of
Code:
ON (album.album_id = image.image_id)

Also a suggestion: If a user uploads an image with a mismatched extension (e.g. a bmp file with a jpg extension) it doesn't thumbnail correctly. Perhaps you could add something to detect this and notify the user?

Again, nice work, great add-on.
 
I upgraded to the latest version of Xenforo and now when ever users upload pictures it crashes their browsers(tested on all browsers. 100 percent chance to happen) Can any one help?
 
It's not crashing, but i'm getting this error on your page:
Request Timeout

This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.
 
Status
Not open for further replies.
Top Bottom