Facebook integration

2

Comments

  • I updated a few albums so that they have no spaces in the name or in the files. Still getting an unexpected error. Any thoughts?

    Here is the facebook URL:
    http://apps.facebook.com/zenface-dev/?q=album&owner=777235163&album=2007OctoberMisc/

    Here is the zenphoto URL (ignore the theme for now, it's a WIP):
    http://thenears.homeserver.com/zenphoto/index.php?album=2007OctoberMisc&page=1
  • pnear, I cannot access the 2007OctoberMisc album on your site (using the url you provided): it says the page is password-protected. I don't know if this the cause of the error you're seeing or not, but it might be worth to test with a public album. As a matter of fact this is anyway a good use case: i didn't even know it was possible to protect albums with zenphoto (and so i didn't take this in consideration). It's also worth noting that the album name ends with a '/'. Removing it manually doesn't change anything, but i wonder if we should let it or trim it - again i have no way test the app against fancy server options.
  • Interesting... I specifically took out the password so that you could hit it, but yeah when I clear out cookies it is indeed still looking for a password. Hmmm... think that might be a ZP bug.

    FWIW, I would be happy handing off authorization to Facebook perms (ie only my friends can see my zenbook pics). Whether your script works around the password, or passes it in from Facebook I'd be happy.

    My main concern is keeping "the wrong people" from having access to 4000+ pictures of my little daughters.
  • Entered bug #350 regarding the sticky password option.
  • I second the security issue. This should be on top of the todo list. However I've looked quickly into zenphoto admin area and can't see where to enable password-protection. I use zp 1.1.1, so i assume this is a posterior feature, or did i miss something obvious ? I'll try to update to 1.1.3 and look into this.
  • acrylian Administrator, Developer
    Yes this is a 1.1.3 feature: http://www.zenphoto.org/category/news/changelog/

    Maybe you should try the nightly build as well.
  • There have been some issues with passwords that were corrected post 1.1.3. So if you are interested in password protection, the nightly build is the thing to try.
  • acrylian, sbillard: i was a bit reluctant to update my zp installation, but i just realize i should be able to install concurrent zp versions on the same server. So i will try the nightly build asap. Thanks!
  • What is all this that now appears?

    Album name 'yself/' construction steps:

    1. Constructing name from '/photos/zp-facebook/myself/'
    2. Left trimming '/photos/zp-facebook/' => myself/
    3. Left trimming 'index.php?album=' => yself/

    Album name 'y/' construction steps:

    1. Constructing name from '/photos/zp-facebook/family/'
    2. Left trimming '/photos/zp-facebook/' => mily/
    3. Left trimming 'index.php?album=' => y/

    Album name 'ravels/' construction steps:

    1. Constructing name from '/photos/zp-facebook/travels/'
    2. Left trimming '/photos/zp-facebook/' => ravels/
    3. Left trimming 'index.php?album=' => ravels/

    Album name 'sc/' construction steps:

    1. Constructing name from '/photos/zp-facebook/misc/'
    2. Left trimming '/photos/zp-facebook/' => misc/
    3. Left trimming 'index.php?album=' => sc/
  • This is what i wrote about in a previous post (see previous page). Those are debug messages that list the steps involved in the retrieval of the gallery names. It can't be disabled through user-configuration: It is globally enabled in the server-side configuration - and only in zenbook-dev until it is production-ready and deployed under zenbook. I've added it to understand the issue with the truncated album names. Please keep in mind that zenbook-dev, as the name implies, isn't in a stable/production state. Actually the log you provided here might prove quite useful, although i'm not sure to grasp what could go wrong here.
  • I'm also encountering the odd album name parsing... It seems really random to say the least:

    "bikes" -> ""
    "SF07" -> "SF07"
    "picnic" -> ""
    "bellemont" -> ""
    "juliegoinwaway" -> "juliegoinwaway"
    "yuppieville" -> "yuppieville"
    "wedding" -> "wedding"
    "flagstaff" -> "gstaff"
    "ftf07" -> "07"
    "friend" -> "riends"
    "bryans" -> "ryans"
    "mbmexico" -> ""
    "05PassatWagon" -> "05PassatWagon"
  • The name retrieval issue should be fixed (both in zenbook and zenbook-dev).

    I'm going to add image data retrieval (exif, tag, etc.) in the coming weeks. However life caught up with me and i don't think i'll find the time to implement the "social" stuff (tagging inside fb, "friends" notifications, etc.). So if the zp team is interested i'm willing to open/donate the app after it is stabilized (feature-wise).
  • Yo, the naming convention seems to work now (ie the links "look" correct now)... but when clicking on album links, I get a zenface application error page stating "Error Unexpected error."
  • Ray, that naming issue is driving me crazy. As far as i can tell it depends on the target installation configuration. So i should just probably try to grab the name from the target site instead of reconstructing afterhand. Anyway, until that i added some additional specific logic bits to try to workaround the issue. Just a workaround, really, however please let me know if that solves it for you.
  • Hello
    I have installed the plug in on facebook
    And upload the zp-facebook on my site.
    But my site is http://sbfotos.free.fr/ only without Root folder.
    And i have error when i test zenphoto

    Have you any ideas ?

    Thank you for your help
  • I have this error when i'm going directly on http://sbfotos.free.fr/zp-facebook/album.php!
    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /mnt/122/sdb/0/8/sbfotos/zp-facebook/common.php on line 8

    Thank u
  • If i write common-php4.php instead of common.php in gallery.php and album.php
    i have this error on album.php :
    Fatal error: Call to a member function on a non-object in /mnt/122/sdb/0/8/sbfotos/zp-core/template-functions.php on line 820
  • I haven't a .htaccess file.
  • Tazz, I just looked at your preferences as stored in zenbook database, and can see that you specified a root folder which is in fact an album name. That can't possibly work. You should set your root folder to either / or an empty string.

    As for accessing album.php directly, this doesn't make sense unless you also specify the expected parameters (namely the album name parameter).
  • Hi I have been getting errors like the 4 below, can anyone help, I am using awardspace for hosting

    I erased my website add, which should be infront of the zp-facebook folder

    Warning: fopen() [function.fopen]: Unable to access zp-facebook/gallery.php in /mnt/141/sdb/6/4/rhillou/facebook/apps/zen-dev/facebook-app/WEB-INF/classes/IntegrationHelper.php on line 26

    Warning: fopen(/zp-facebook/gallery.php) [function.fopen]: failed to open stream: No such file or directory in /mnt/141/sdb/6/4/rhillou/facebook/apps/zen-dev/facebook-app/WEB-INF/classes/IntegrationHelper.php on line 26

    Warning: stream_get_contents() expects parameter 1 to be resource, boolean given in /mnt/141/sdb/6/4/rhillou/facebook/apps/zen-dev/facebook-app/WEB-INF/classes/IntegrationHelper.php on line 27

    Warning: fclose(): supplied argument is not a valid stream resource in /mnt/141/sdb/6/4/rhillou/facebook/apps/zen-dev/facebook-app/WEB-INF/classes/IntegrationHelper.php on line 37
  • shmii Member
    Hi

    I've a problem with this application...
    I've an error message
    "Error
    Unexpected error. "

    This is the URL of my gallery :
    http://reflexart.free.fr/zenphoto/
    My vertion of zenphoto is :
    zenphoto version 1.1.5 [1219]
    I've copy the laste integration files to the zenphoto directory next zp-core
    I've probably miss something

    Someone Can help me plz

    --
    Thomas
  • I have been trying to figure out why the Zenbook app won't display my galleries on facebook. We use a subdomain to host our images so I've configured it to use that instead of a path. Sometimes the app shows the preview on the facebook profile page, but never the galleries.

    After digging around a bit, I found that Zenphoto is checking for "empty($_zp_albums)", which triggers - even when there is an array in that variable. This might be an issue with the version of php I'm running (5.2) or Zenphoto I'm running (1.1). Either way, when I added " && !is_array($_zp_albums) " to the check, miraculously I started getting albums showing up on my facebook.

    I'm sure there is much more to this, but I don't have the time right now to track down the effect of this change, so I've gone back to disabling mine. The code itself was at line 291 in zp-core/template-functions.php . If anyone finds out what other changes may be necessary, or is more familiar with the code, please post your results!

    Thanks,
    Mike
  • acrylian: two months or so ago I've posted the facebook "application" code and the latest integration files on a public server for anyone to use and modify (I can't work on it anymore). It's licensed under a modified GPL and can be found at http://fbzp.free.fr/. Perhaps the description could be modified to integrate that information?

    As a side note, concerning general integration, i integrated recently zp in an Ext-based application, and found again a few critical features missing in zp: 1- the ability to fetch image and album data (as json or xml) from a third-party server; 2- a high-level nicely encapsulated data access api (some kind of dao not just global functions). Such a data access api would also greatly simplify theming. But that's another story and i'll post more about that in a few days/weeks (and in a dedicated topic..)

    Cheers-
  • acrylian Administrator, Developer
    Sure, no problem I include that new description and the new link. Thanks for letting us know.

    As to your two "critictal missing features" I don't really understand.
    1. You mean getting images from Facebook for example? This is not the intention of Zenphoto which is meant to host you own images/albums on your own server, to be the opposite of such public services like Facebook etc.

    2. I am not sure what you mean with that, I find theming really easy with zenphoto (and I say that coming from illustration/design, not coding!) so I wait until you post more about..
  • Has anyone worked with this integration recently? Im getting this error in facebook: Error
    Unexpected error.
  • Yes "coalesce". I too get same issue.
  • So this extension should maybe have it's status set to not working?
  • acrylian Administrator, Developer
    As said on anthother thread reageding this it's the reponsibility of its developer. The "Unsupported" button just means that.
  • Hi Acrylian,

    I don't usually excavate posts, though i realized i still owned you an answer about third-party integration. Sorry for the (very, very) late reply.

    Concerning the first point: i meant the other way around. Consider a server A running some kind of application, and a zenphoto gallery on server B. I think it would be nice if images hosted on server B could be pulled in json form, so that A could fetch images from B. This would allow to easily integrate zenphoto into any kind of remote applications without having to hack zp to allow it.

    Concerning the second point - it's not really important but nonetheless let me clarify my point. When theming i always need to read zp sources again and again because i never know what this printAlbumTitle() function (for instance) will do. Will it print the title as text? wrapped inside a span? What is the css class of the span? etc. So instead (or in addition) of this functional api, we could have a way to let the theme developer to manually iterate objects. For instance instead of: while ( next_album() ) we'd write: $albums = $dao.getAlbums(); foreach ( $albums as $a ). However long ago i seen wordpress and drupal use the same kind of templating system - which i mostly seen in the php world. Besides others seem comfortable with it. So i guess i just am being biased towards other programmatic idioms.

    @southdreamz and coalesce:
    I don't maintain this thing anymore (i actually closed my facebook account long ago), but sources are available if you want to fix it (see previous post).

    Regards,
  • acrylian Administrator, Developer
    Thanks for the answere even if late..;-)

    I don't remember exactly the details of the beginning of the discussion (and I am too lazy to reread). But some "short" answers nevertheless:

    1. You can use elements from other sources in Zenphoto using the text-object plugin. Just upload an text file with a link or whatever and it will be displayed. Sure that is not the same but I don't think that Zenphoto needs to be able to integrate with everything..

    I can understand that there are numerous possibilites and nice feature the one or the other may want to have. But we are a small voluntary team (2 frequently active developers plus one server administrator) so we focus on things we can manage and maybe "need" ourselves. Much is possible via plugins now so any contribution from third parties for special stuff is needed.

    2. Generally, we only return html stuff with complex "print" functions. Some return full sets of html like lists when applicable as this is convenient for many users like the pageslist navigation that reequires a list. Just a titlte or so is never wrapped into a <span>. If a function is named printLinksomething it prints a link meaning a ``
    CSS classes are sometimes attached by default but can nearly always be passed manually (some functions have fixed ones for convenience or to keep the number of parameters little).

    But to have flexibility we have nearly always a "get" equivalent returning raw data. What raw data depends on the type of function so some return objects, some strings or array or simply a value.

    But if you want to go the full manual way you can since ever! Zenphoto has an object orientated framework so you can do everything directly if you wish to. Look at the documentation of the classes. But you will probably do some work that the template functions already do for you.
Sign In or Register to comment.