R
ragtek
Guest
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
$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
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);
}
model XfRu_UserAlbums_Model_Images
1. would be cool if the methods would also have $fetchOptions specially getLatestImages and getRandomImages