New Module: photowidget
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I have created a new module inspired from photo widget from www.roytanck.com Adds 3 configurable blocks to show items in a flash sphere on the sidebar. I've also set up a Wiki page for it here: Attached: |
|
Slarioux
![]()
Joined: 2009-08-08
Posts: 56 |
![]() |
Cool! Will check it out |
|
Okat
![]()
Joined: 2009-04-05
Posts: 78 |
![]() |
Looks awesome! It doesn't respect viewing rights though. Thumbnails of photographs are still viewable. The photo's themselves aren't. Is this by design? Great work though. My playground (using customized 3nids theme) http://www.okat.nl |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
@floridave: BTW: I just skimmed over the code. Any reason you don't use UTF-8 as character encoding in the XML you generate? G3 stores everything as UTF-8, so the XML document you generate should be UTF-8 as well. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Fixed permissions and XML encoding. re-attached above. Dave |
|
Okat
![]()
Joined: 2009-04-05
Posts: 78 |
![]() |
Updated with new download. Don't see any changes regarding permissions. Can still see thumbnails of restricted photographs. Used ctrl+F5 so cache shouldn't be a problem. My playground (using customized 3nids theme) http://www.okat.nl |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
in controllers/photowidet.php I only did this for the recent and popular xml generation. Dave |
|
Okat
![]()
Joined: 2009-04-05
Posts: 78 |
![]() |
Version I downloaded after you applied the fix didn't contain those lines. Have downloaded again (just now) after a forced refresh (just in case) and they aren't there. Added them manually and can confirm it works. Maybe something went wrong while attaching the .zip the second time. Btw, where did you learn the ORM::factory("item")->viewable() part? Am still trying to get a grip on Gallery 3 code and the latest I've heard about access and permissions is http://gallery.menalto.com/node/94063 where Bharat talks about Model based validation. Could not find any reference to any access/permission PHP code in http://codex.gallery2.org/Category:Gallery_3, or maybe I didnt' look/search well enough. Thanks again. It's looking great. My playground (using customized 3nids theme) http://www.okat.nl |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I just checked the zip file attached above and I see the ->viewable() in controllers/photowidet.php so don't know why you don't. I am a copy paste type of developer so I found: $children_count = ORM::factory("item") ->viewable() ->where("type", "!=", "album") ->count_all(); in the dynamic album modules code. /** * Add a set of restrictions to any following queries to restrict access only to items * viewable by the active user. * @chainable */ public function viewable() { return item::viewable($this); } I am sure more docs will come, but I don't understand half the terminology and will not be writing it. Dave |
|
Serge D
![]()
Joined: 2009-06-11
Posts: 2466 |
![]() |
Like the module! Nice. Replaced the tags for now
|
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Quote:
Would it be possible to break admin sections in parts for each sideblock? Yes. I was thinking of that anyway and will do it in the future. The thing is you have to make 3 different forms to have the sections (more code). Quote:
Would it be possbile block be selective? Turn off availability from the admin panel instead of having all 3 in widget section? Currently the user can remove the block(s) he/she does not want via the Manage sidebar admim page. I will be investigating making the sphere an ellipse so it might look better in the narrow sidebar. Dave _____________________________________________ |
|
Serge D
![]()
Joined: 2009-06-11
Posts: 2466 |
![]() |
Quote:
Yes. I was thinking of that anyway and will do it in the future. The thing is you have to make 3 different forms to have the sections (more code). Why? just different groups |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Updated module to compartmentalize the blocks for easier administration. Thanks Serge D. Any flash experts to help out in creating a different .swf movie? To help make an ellipse so it might look better in the narrow sidebar. Dave |
|
h_s
Joined: 2009-06-26
Posts: 43 |
![]() |
Dear Dave! I enjoy your module a lot. I just found a little bug: the flash clouds stay on top of the cooliris slideshow (unless cooliris is maximised to full screen). Cheers h_s |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I thought I fixed that. Do they stay over the top of other modal windows like the organize? Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
h_s, Dave |
|
h_s
Joined: 2009-06-26
Posts: 43 |
![]() |
Dear Dave! I tried it again with the transparent background. Works fine in Firefox 3.6, but has this overlay issue in Seamonkey 2.0.3. So, thats maybe a minor issue, because Seamonkey is not so popular as Firefox. Thanks for your help, h_s |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I don't have that browser so you could see if changing the code in the view from transparent to opaque Dave |
|
h_s
Joined: 2009-06-26
Posts: 43 |
![]() |
Dear Dave, did that, but it didn't change anything. However, it is not such a big issue. Thanks for your help again!! Have a nice day h_s |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Example URL I can't seem to reproduce. Dave |
|
jokeofalltrades
Joined: 2010-03-03
Posts: 3 |
![]() |
I love this module, but I have also noticed that it floats on top of the full-sized image (in both Firefox 3.5 and IE 8 on XP). See, for example, this picture - click on the picture to view full size, and make sure to resize the browser window so that the module overlaps with the full-size photo. Thanks for the great work! |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Setting the block to transparent on the settings page seems to work for me: Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Updated the module to remove data from the var table on deactivation. Dave |
|
hebhansen
![]()
Joined: 2009-02-10
Posts: 573 |
![]() |
Very nice module Dave ... Download in first post, is that the updated code? all the best |
|
mwilson_20
Joined: 2008-04-24
Posts: 2 |
![]() |
Great job on porting this to gallery3... Really nice addition. Is it possible to enable a "lightbox" function depending on if your gallery3 theme is using one? I have it enabled on my test site and haven't been able to figure out how or if its possible... |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
hebhansen wrote:
Download in first post, is that the updated code? Yes. _____________________________________________ |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
@lightbox: No. Unless you are well versed at doing some flash development. Dave |
|
jokeofalltrades
Joined: 2010-03-03
Posts: 3 |
![]() |
floridave wrote:
Setting the block to transparent on the settings page seems to work for me: Yep, that worked. The widget is perfect as far as I can tell. Thanks! |
|
mwilson_20
Joined: 2008-04-24
Posts: 2 |
![]() |
@lightbox function... really wish I could work more with Flash than I can... I was using the 3nids theme with the lightbox script for image viewing instead of the standard image page. I was hoping a change in the link value or something would allow an easier resolution but thanks for the feedback... Still nice module just wanted to keep the image viewing the same for links etc... My test Gallery3 installation: http://sandbox.wilsonwhirlwind.com/gallery3 |
|
inposure
![]()
Joined: 2010-04-23
Posts: 304 |
![]() |
A request: drop ->where("type", "=", "photo") from recent_xml() and popular_xml() to include videos as well. As a matter of fact, it could be configurable in the admin page, along with number of items to display. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
updated module to include videos as well. Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
fixed a typo in the version for module.info causing upgrade issues. Dave |
|
DocMartin
Joined: 2005-07-13
Posts: 55 |
![]() |
Nifty module - thanks! |
|
gossamer
Joined: 2011-01-07
Posts: 47 |
![]() |
Okat wrote:
Version I downloaded after you applied the fix didn't contain those lines. Have downloaded again (just now) after a forced refresh (just in case) and they aren't there. Added them manually and can confirm it works. Maybe something went wrong while attaching the .zip the second time. Hi, I really like your customized 3nids theme. Did you do this customization, or is it available in codex? Thanks, |
|
MCC-Nash
Joined: 2008-08-28
Posts: 10 |
![]() |
hi guys, i have a small problem, i used this plugin already before on my joomla 1.5 site, but now i upgraded to joomla 1.6 and now i always get the message "This widget requires Flash Player 9 or better" do i have to change any php settings or why is it not showing anymore in joomla. if i add the code in the html window in the joomla window, joomla will rearange the code and i cant stop it from doing it... does it not work anymore on joomla 1.6? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Are you using the 'external example' as described in http://codex.gallery2.org/Gallery3:Modules:photowidget Dave |
|
MCC-Nash
Joined: 2008-08-28
Posts: 10 |
![]() |
yes, and it was working fine with joomla1.5 now i upgradet to 1.6 and it isnt working anymore, not even the flickr sphere is working from roytanck.com |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Seems to be a joomla issue then. A real url might help, but I don't think I should be troubleshooting joomla issues as well. Dave |
|
MCC-Nash
Joined: 2008-08-28
Posts: 10 |
![]() |
i did a test created a empty page, outside of joomla, and inserted the code...but the only thing i got was the "flash-box" but no sphere inside.... hows that? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Works for me. http://www.langleycom.com/gallery3/test.html Dave |
|
MCC-Nash
Joined: 2008-08-28
Posts: 10 |
![]() |
yes the photowidget module is activated. do i need any other modules....? i just used that code: <object type="application/x-shockwave-flash" and only replaced the example with my site adress. i cant get it to work, what am i doing wrong? i tried diffrent browsers... its showing yours just fine.... could it be any server setting in php.ini? UPDATE either i am totaly crazy and stupid or something weired is going on. i just put above mentioned code in a empty html page and uploaded it. the only thing i get is a white square of the flashplayer but no photos shown... if i take the code and enter it in joomla sql database for that modul. it works fine, but as soon as i open this modul in joomla, all the code gets messed up by joomla again. but why cant i view it on a empty html page? with just the code in there... |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Do you get content when you visit Dave _____________________________________________ |
|
MCC-Nash
Joined: 2008-08-28
Posts: 10 |
![]() |
hi dave i get an xml feed with above link... i got it running in joomla, i think i am just doing something wrong by creating the html page... |
|
wise_mike
Joined: 2008-10-21
Posts: 158 |
![]() |
Just tested the photowidget, and it is very nice.. Re using it at external pages other than the gallery root: how to make it show a certain album that I want, not just the recent images? Quote:
<param name="flashvars" value="feed=http://sitename/Gallery/index.php/photowidget/recent_xml/" /> to the album of my choice? Thanks, |
|
wise_mike
Joined: 2008-10-21
Posts: 158 |
![]() |
found it by trial and error.. should be: |
|
wise_mike
Joined: 2008-10-21
Posts: 158 |
![]() |
If a gallery has 100 images, this widget would choose something like the first 20 images to display, and each time the user open that album or any images from that album, would see the same images in the widget.. it would be nice that the widget could have some kind of random choices of images, or shuffle them or something.. what do you think? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
glad you got the ID of the album sorted out. Dave |
|
wise_mike
Joined: 2008-10-21
Posts: 158 |
![]() |
before I give it a try, does this random query for the whole gallery? or could it be for a particular album? |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
The imageblock does gets a ramdom from the whole gallery, it could be changed to get items from a specific album. Dave |
|
wise_mike
Joined: 2008-10-21
Posts: 158 |
![]() |
I noticed for two days the content of the "Popular items" doesn't change.. although the gallery had thousands of hots.. am I missing something? Thanks, |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
it uses the view count for sorting. Dave |
|