CMS MADE SIMPLE FORGE

Album

 

[#8499] If album name is numeric like year 2012 Album fails to load it

avatar
Created By: Keijo Hautala (KO_)
Date Submitted: Wed Oct 10 04:02:34 -0400 2012

Assigned To: Mark Reed (mark)
Version: 1.10-beta2
CMSMS Version: 1.11.2
Severity: Minor
Resolution: None
State: Open
Summary:
If album name is numeric like year 2012 Album fails to load it
Detailed Description:
If you call {Album albums='2012') album name is considered as id (numeric) even
if it's album name.

What we did to get around it was to add {Album albums='2012' search_by_name=1}

and alter action.default.php on line 56 from

if( is_numeric($tmp[$i]) )

to 

if(is_numeric($tmp[$i]) && !$params['search_by_name'])

and it started accepting also numeric names. Not tested thoroughly :)

Thanks for working with this module!


History

Comments
avatar
Date: 2012-10-10 04:08
Posted By: Mark Reed (mark)

Album uses a different syntax to show individual albums...

If you only want 1 specific album shown then use code like this, "name" of album
only, this will show in "gallery" mode:

{Album albums='album name'}
      
avatar
Date: 2012-10-10 04:31
Posted By: Keijo Hautala (KO_)

Thanks for quick reply!

Yes that is what we used. But if the album "name" (not id number) is numeric
like 2012 php code thinks it's numeric and starts looking for id number or
something. So

{Album albums='2012'}

where '2012' (like year number) is album "name" it does not show that album.

We do have very customized template(s) but not sure if those are causing this. I
can search if feel that could be problem.

Thanks again!