Page 13 of 21
Re: A new gallery manager : Album
Posted: Fri Jun 23, 2006 2:54 pm
by Elijah Lofgren
tonyg wrote:
I think I see the problem. In action.default.php on Line 29, Elijah uses
Code: Select all
preg_replace('/\{cms_module module=.*?\}/'
to parse the cms module tag, which is fine. But he does not look for or parse any other CMS tags in the page. So if a page with a CMS album tag also has a CMS selflink tag, that tag is not parsed and is then printed to the page as text by Album. It would be a bit limiting if we cannot use other CMS tags on album pages.
I think the solution is just to make showing the page content of the calling page above the full size version of the pictures optional. I think I will add this as a preference to Album which can be turned off.
tonyg wrote:
Actually, I believe you are trying too hard in some ways, Elijah. I don't know about other people, but I don't really need image paging or integrated photo display. I am happy just to display thumbnails and have a self-configuring stripped popup window display the full photo.
Check out the "Pats-ImageGallery" and "Popup-Tables" (SVN version of Album only) templates. They show the full size photo in an auto-sized popup window.
tonyg wrote:
Also, I suspect the crazy URLs I am seeing are caused by Line 14 where Elijah uses
Code: Select all
$page_alias = substr(substr($_SERVER['REQUEST_URI'], 1), 0, strlen($_SERVER['REQUEST_URI']) - 2);
I think it's picking up too much of the string (i.e, it is replicating "/cms/index.php" when it doesn't need to.
You're right, I've removed all that "hackish" code and replaced it with a SQL query in the latest SVN version of Album.
Re: A new problem with Album 0.50
Posted: Fri Jun 23, 2006 3:58 pm
by Elijah Lofgren
tonyg wrote:
Would that also be cause other CMS links to be displayed in the page? All of a sudden, my internal page links are also being printed instead of converted to links, so I suspect there is more to this than your code change. But it's only happened since I went to Album 0.51.
You can see what I mean at
www.brisbanebikers.com/cms/ near the album thumbs at the bottom of the page.
Fixed in latest SVN:
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev
Thanks to calguy100 I found out about the ProcessTemplateFromData() function. Running the page content through that converts the {cms_selflink page='33' text='More ride photos'} tags into links correctly. Any other smarty tag (except the stripped {cms_module} ones) should be correctly converted also.
Just download this file
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup and replace your current modules/Album/action.default.php file with it.
If you don't want the page content shown above the pictures, update all Album files to latest SVN and then go to the "Options" tab of Album and uncheck the box next to "Check to show the content of the page which Album is called above all pictures. You'll want to turn this off if you have other smarty tags on the page where you put the Album smarty tag.:"
I think these changes should fix the problems you have reported.
Thanks for reporting these bugs, let me know if you find any other problems.
Later,
Elijah
Re: A new problem with Album 0.50
Posted: Sat Jun 24, 2006 4:28 am
by tonyg
Elijah Lofgren wrote:
tonyg wrote:
Also, any idea what is causing the strange URLs (e.g. /cms/index.php/cms/index.php/photo_gallery/three_dams_ride_200/album-5/22/34)?
Should be fixed in the latest SVN version of Album:
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev
I removed all that "hackish" code that was getting the page_alias out of the URL and replaced it with a database query to get the 'hierarchy_path' of the page calling Album
Please test and see if the URLs are fixed by downloading "action.default.php" from here
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup
Thanks,
Elijah
Hi Elijah
Installed the SVN version of action.default and it has fixed the URL problem. Thanks.
The {CMS_selflink} is still an issue, of course. Any idea how to deal with that? Is there standard parsing code somewhere else that could be copied across and added into action.default?
Tony
Re: A new problem with Album 0.50
Posted: Sat Jun 24, 2006 4:35 am
by Elijah Lofgren
tonyg wrote:
Installed the SVN version of action.default and it has fixed the URL problem. Thanks.
The {CMS_selflink} is still an issue, of course. Any idea how to deal with that? Is there standard parsing code somewhere else that could be copied across and added into action.default?
Tony
Hi Tony,
It's been fixed. Check my last post (quoted at the bottom of this post.

If it doesn't work for some reason (my test shows it does work now), please let me know and I'll try to fix it tomorrow.
Make sure you use the latest version of action.default.php available from here:
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup
Good night,
Elijah
Elijah Lofgren wrote:
tonyg wrote:
Would that also be cause other CMS links to be displayed in the page? All of a sudden, my internal page links are also being printed instead of converted to links, so I suspect there is more to this than your code change. But it's only happened since I went to Album 0.51.
You can see what I mean at
www.brisbanebikers.com/cms/ near the album thumbs at the bottom of the page.
Fixed in latest SVN:
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev
Thanks to calguy100 I found out about the ProcessTemplateFromData() function. Running the page content through that converts the {cms_selflink page='33' text='More ride photos'} tags into links correctly. Any other smarty tag (except the stripped {cms_module} ones) should be correctly converted also.
Just download this file
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup and replace your current modules/Album/action.default.php file with it.
If you don't want the page content shown above the pictures, update all Album files to latest SVN and then go to the "Options" tab of Album and uncheck the box next to "Check to show the content of the page which Album is called above all pictures. You'll want to turn this off if you have other smarty tags on the page where you put the Album smarty tag.:"
I think these changes should fix the problems you have reported.
Thanks for reporting these bugs, let me know if you find any other problems.
Later,
Elijah
Re: A new problem with Album 0.50
Posted: Sun Jun 25, 2006 8:20 am
by tonyg
Elijah Lofgren wrote:
Hi Tony,
It's been fixed. Check my last post (quoted at the bottom of this post.

If it doesn't work for some reason (my test shows it does work now), please let me know and I'll try to fix it tomorrow.
Make sure you use the latest version of action.default.php available from here:
http://viewsvn.cmsmadesimple.org/viewsv ... iew=markup
Good night,
Elijah
Indeed that has fixed it. Thanks Elijah, great work.
Tony
Re: A new gallery manager : Album
Posted: Mon Jun 26, 2006 4:17 am
by slloyd
Can we see it in action? I'd like to see how people are using the Album module. How difficult is it to get it uploaded and working? Are there specific instructions somewhere about how to install it and get it working?
Re: A new gallery manager : Album
Posted: Mon Jun 26, 2006 5:13 am
by Elijah Lofgren
slloyd wrote:
Can we see it in action? I'd like to see how people are using the Album module.
Here's an example of it in use on my website:
http://www.elijahlofgren.com/pictures/west-africa/
Edit: Also see it in use on tonyg's website:
http://www.brisbanebikers.com/cms/index ... to_gallery
slloyd wrote:
How difficult is it to get it uploaded and working? Are there specific instructions somewhere about how to install it and get it working?
It's really quite easy to install and get it (and most modules) running.
There are general instructions for installing Modules on this page:
http://wiki.cmsmadesimple.org/index.php ... ns/Modules
You can use either the .tar.gz file or the .xml file to install Album. They can be downloaded here:
http://dev.cmsmadesimple.org/frs/?group ... ase_id=501
Note: Album requires at least CMSMS 0.13
Basically:
1 Extract the Album-0.5.1.tar.gz file and put the Album folder in the modules folder (I.E. modules/Album)
2. Go to "Extensions -> Modules" in the Admin and click the "Install" link next to it
3. Put this code on the page that you want the Albums displayed (Make sure you use the "Source view of FCKeditor when pasting this code):
4. Go to Content -> Photo Albums and start adding Albums and Pictures.
Let me know if you have any problems or more questions and I'll be glad to try and help you.
Good night,
Elijah
Re: A new gallery manager : Album
Posted: Mon Jun 26, 2006 10:23 am
by tonyg
Hi Elijah,
If you ever get the time, I would really appreciate a step by step explanation of one of the Album templates so I can get a better understanding of what it is doing at each step and, so, how to create my own templates. I have read the code hints in the Help which are good, but not quite comprehensive enough for dills like me.
TonyG
Brisbane, Australia
Re: A new gallery manager : Album
Posted: Tue Jun 27, 2006 9:20 am
by zsero
Can you help me to write a simpleviewer template for Album? I just tried it and any solution for Simpleviewer is crazy, nothing like Album! Basically what's needed:
1. separate folders for pics and thumbnails, using the same filename for both.
2. a template generating an xml file like this one (very easy I think):
Code: Select all
<IMAGE>
<NAME>IMG_5781.jpg</NAME>
<CAPTION/>
</IMAGE>
−
<IMAGE>
<NAME>DSC_0629_6.jpg</NAME>
<CAPTION/>
</IMAGE>
−
<IMAGE>
<NAME>DSC_0439.jpg</NAME>
<CAPTION/>
</IMAGE>
The actual template would be like:
Code: Select all
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="100%" height="100%" align="middle">
<param name="movie" value="viewer.swf">
<param name="quality" value="high">
<param name="scale" value="noscale">
<param name="bgcolor" value="#191919">
<embed src="viewer.swf" width="100%" height="100%" align="middle" quality="high" scale="noscale" bgcolor="#191919" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
</object>
I think the only critical part is to make Album generate a xml file structure, not just html code. Can we solve it?
BTW, link to simpleviewer homepage:
http://www.airtightinteractive.com/simpleviewer/
Edit, Autoviewer and Postcardviewer are using the same back-end, so we could make three templates if we could solve the xml part.
http://www.airtightinteractive.com/proj ... iewer/app/
http://www.airtightinteractive.com/proj ... r/example/
Re: A new gallery manager : Album
Posted: Tue Jun 27, 2006 11:20 pm
by Dr.CSS
it's supposed to make it's own imageData.xml....
i haven't got it to work like that...: but :..>
http://www.multiintech.com/index.php?page=bob_seger_vid
under the Bob Seger video
Re: A new gallery manager : Album
Posted: Tue Jun 27, 2006 11:33 pm
by zsero
It's a client side only application, it
1. loads itself
2. loads the xml file
3. and tries to load thumbnails and pictures found in xml file.
Re: A new gallery manager : Album
Posted: Tue Jun 27, 2006 11:42 pm
by Dr.CSS
i know i'm using it on that pag it's a link at the bottom i'll give it more room so you can tell it's there :...
Re: A new gallery manager : Album
Posted: Wed Jun 28, 2006 12:28 am
by zsero
XML can be built using PHP/ASP/Perl scripts, or by desktop softwares (Picasa, iPhoto, Porta), or manually. Maybe you are using the PHP script method.
Re: A new gallery manager : Album
Posted: Wed Jun 28, 2006 1:05 am
by Dr.CSS
Yep :..
Re: A new gallery manager : Album
Posted: Wed Jun 28, 2006 6:08 am
by Gregor
Hi Mark,
Your album looks great. I would love it to have that on my site
www.uisge-beatha.eu as well. Could you tell step by step how you have it?
Thanks,
G