This is the comment thread for WebExport 1.0, including all releases.
This entry was posted
on Wednesday, August 9th, 2006 at 9:57 pm and is filed under Comment Threads, Hidden.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.
First I had to say "Bravo", cause WE is the best iPhoto plugin to export pictures the way we want them to be.
But as I always want to do my best, I've got some questions to improve my template.
I want my template to be an HTML table with 5.3 cells by gallery page. I managed to add the td tags, but I didn't the way to add the \tr tr tags every 5 pictures. So is there a tag in cell i can use it for, or what is the exact syntax for the if tag used with p_index as string to compare to a multiply of 5 - didn't work - I'm know there is the prev and the next function to change the gallery or the photo page. But is there a function which gives the link to all the gallry pages using their number as label? or is there as the if tag a for tag so I can make it myself in my template.
Last question I'd lyke my pictures pages to have tiny thumbs of the prev and the net picts. How I'm supposed to call the image function?
I've also noticed a few strange things. First if my pictures has keywords in Iphoto, webexport shows some errors of linking. In the documentation you use has_prev and has_next but they don't work I had to use others found in another template.
Final Point, can you always set the picture author to a space or the gallery author, because it shows up some errors which are not important when not using the autor tag and it will be easier when making a gallery of 30 pictures with the same author.
PS I m using a macmini G4 with tiger - las update- and iPhoto 5.x
I'll answer your question in a few parts, since I only have small chunks of time.
The first thing is that in "i" defines the photo you are currently on, and "r" is a list of all photos that will be processed by cells. So, if you have an statement, this condition will evaluate to true only on the first image of a row:
((i-r)%3==0) and on the last of a row: ((i-r)%3==2). You will run into problems if there is an non-even (in this case, multiple of 3) number of photos, because then the last-of-last-row won't be executed.
In general, tables are deprecated (there used to be a table() command in CHTML), so my first suggestion is to use CSS, which is much more flexible and cool. Take a look at Compact.weTemplate (in the templates page), it will show you how to make a CSS "table" that has fixed number of columns.
If popular support wants it, I may think about implementing a equivalent to but for producing tables. I much prefer CSS, though.
The other questions, which appear to be potential bugs, I'll get to those later today, when I have some time with my compiler.
Thanks for your answer, I will try to use CSS table, hope i just need some practice.
About the photo with keywords not working I was wrong, in fact the issue comes from the way picture are organised and where they are picked up to be exported. Those limking errors only appears when the picts are taken from the whole library or from smart albums, if they are called so in English, - purple icon- but there is no error when getting from a usual album -blue icon-, actually.
Hope it's help.
Allright, let me know if I\'ve misunderstood your questions. With respect to the CSS/HTML stuff, there are some awesome tutorials on how to make photo galleries with CSS, search for \"float tutorial\" on Google.
There is a function which returns a link to a gallery, given an index: gallery_link(i), where i is the gallery you want a link to. The variable \"gallery\" also points towards the current gallery.
With respect to the image() command (this is in the advanced docs too), the command structure is like this:
Where style should usually be \"nice\" unless you want to fill in maxw and maxh (clip the image to size), and i is the index of the photo you want. So, giving p_index-1 or p_index+1 would give you the next and previous images. The current version of image() DOES NOT LOOP. If you do negative numbers or above p_count, it will probably generate a weird error. This will get fixed in the next version (along with the annoying META errors), for now use conditional blocks, which you should anyway, with next and prev buttons. Or do something like (p_index+1)%p_count, to guarantee it\'s within the specified range.
I could not replicate your linking error with smart/regular albums… You will have to tell me more specifically what is happening.
Well, I downloaded the last version of WE, and I'm still experimenting the same issue while exporting my Pictures. Here is the log returned by the plugin (a bit different from the former - without the Meta errors and maybe the numbers of line - ):
Linking Error (closeup.html,CIMG2470.html)
Linking Error (closeup.html,CIMG2471.html)
Linking Error (closeup.html,CIMG2472.html)
Linking Error (closeup.html,CIMG2473.html)
Linking Error (closeup.html,CIMG2474.html)
Traceback (most recent call last):
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 405, in ?
File "", line 2, in ?
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 378, in gen_galleries
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 323, in processFile
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 327, in process_file
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 317, in process
code = code[:m.start()] + processEval(m.group(1)) + code[m.end():]
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 279, in processEval
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 7: ordinal not in range(128)
Thanks for the idea of the CSS table, they are harder to create the first time but much esaier after and more pretty.
Your answer about the p_index is exactly the one I was waiting for, because I was wondering about the -1 and p_count value.
The gallery_link function is interresting but you need to know wwhich page and the number of page, can it work with another cells block?
Allright, I think I fixed the '"ascii' codec can't encode character…." error with v. 1.0r19. It's up, very small changes that make so it encodes everything with Unicode, which it should, instead of ascii, which it was. It should be more compatible.
"Linking Error" is sort of a blanket error… which (after looking at my code) means it's an block error. I'll add in a new error message for that, and post the new version. At the end of this, we may be a little higher than 1.0r19…
The gallery_link function is not usually used by templates, use the variable "gallery" (< ?gallery?>), which returns a direct link to the current gallery. You can get the current gallery index with g_index, and the total number of galleries with g_count.
What I meant about the gallery link is that you can have in yout pages two kinds of links to a gallery page (prev or next) but I would like to have a few links like this:
"Gallery Pages: 1 - 2 - 3 - …" and each numbers link to indexn.html where n is the number minus 1. I don't really know .py script but If it's possible (and allowed) to change the script, I may try to make a function to explain more precisely what I'm looking for.
I saw a part of your code so I wrote this which provides no error but also nothing is shown whle using return or print:
if (g_index == i):
ret += " - " + str(i+1)
ret += " - " + str(i+1) + ""
Hmm, I can't really read what you wrote, because WordPress is mangling it. I am looking into fixes for this, but for now, email me a copy of the code you are trying to use, and see if my link (to a gallery.html) is of any use.
Nice software but I've having a bit of trouble with iPhoto 5 on 10.3.9 (I'm using WebExport 1.0r107). I seem to be able to use WebExport once and then trying to do an Export from the Share menu just fails, no Export window is displayed. I think it's something to do with the templates because deleting the template that i used previously displays the Export window correctly. There are some debugging messages written to the console, not sure whether they'll help or not: -
2006-09-02 21:54:52.990 iPhoto *** -[NSTextField setAllowsMultipleSelection:]: selector not recognized
2006-09-02 21:55:27.056 iPhoto Hello
2006-09-02 21:55:27.119 iPhoto *** -[NSPopUpButton selectItemWithTag:]: selector not recognized
2006-09-02 21:55:27.125 iPhoto *** -[NSPopUpButton selectItemWithTag:]: selector not recognized
Thank you for providing this great tool. I'm not that smart when it comes to programming but I found two other viewers like SimpleViewer. One is called PostcardViewer and the other AutoViewer. Can you or someone else create WebExport template's for these. I assume that it would be relativley quick work for someone who knows what they doing. As a last resort, how would I go about creating a template from these. The CREATE TEMPLATE link on the WebExport instructions is dead.
JimB: The error messages you put there do not make sense… I'll check 10.3.9, but it should have selectItemWithTag:, if you could, figure out which of those are for the first export and which are for the second. This probably has something to do with 10.3 compatability, because it works fine on my machine. I'll poke around for the NIB compatability, but could you post/send the templates you have and are using?
Chris: An autoviewer template is posted under webexport/templates (3rd "page" link), and you should have no problem converting it over to PostcardViewer. It involves no programming whatsoever (not even HTML, just a tiny bit of XML), and it should be pretty clear how to do it if you download his example PostcardViewer, and look at the auto/simple viewers. What CREATE TEMPLATE link are you referring to? The documentation links from the main page work, and I think all of the links in those work…
I'm experimenting a new and very strange issue with WE1.0r107 and 109. There is one (I didn't manage to do it with another one) picture that makes iPhoto crash the last message I see in the WE tab is Standard Export running . Below is the crash log report made by MacOS.
I've also seen something weird, sometimes, the Template selecter show no template but
something like this is automaticly cleared, then I have to change the exporter tab and get back to WebExport and my templates are listed.
Last point can we print the exif datas in the web pages?
P.S.: this crash occurs with all the templates. the template used for the report is Compact
[CLIP: there was a large error dump here, I can provide it to people who are interested, but it made the page pretty long]
Td: The problem is that the filename has non-ascii characters in it. WebExport assumes filenames are in ASCII, and everything else is UTF-8. So, if you use a template that uses iso-8859-1, instead of UTF-8, and you have non-ascii characters in it, it will display them wrong (WebExport writes UTF-8, browser expects ISO-8859-1), and I will have to fix this. The solution now is to make sure all of the templates you use (if you use international characters), are set up as UTF-8, and not ISO. Also, for now you can't use non-ascii characters in filenames. I will be working on fixing this in the coming weeks, but I am not very experienced with python's international solutions.
Maybe the best solution is to remove those characters from the filename when exported. So a word with such characters like "Espérant", "même" or "août" will be transformed into "esprant", "mme" and "aot" instead of something better but harder to programm "esperant", "meme" and "aout".
used the WordPress template. Everything seemed to work fine, but after uploading to my site, getting error below when trying to view the page/s. Is it because I'm not using the default theme, but WP3Column Kubrick? Also, because of something screwy in iPhoto, I now can't recreate the gallery or anything because the export function is completely not working in iPhoto (no export window)!
iPhoto 5.0.4, OS10.3.9
Fatal error: Call to undefined function: wp() in /home/…/blog/galleries/…/index.php on line 5
dave: two things, first make sure you're using 1.0r109 (posted earlier in this thread), because if fixes the no-restart problem in 10.3.9 (i use 10.4.7, so it's hard to debug panther problems). Also, wp() is a central call to WordPress, and so it as to find it. It is defined in wp-config.php, make sure you have your paths set up (in the website attributes) to point to the folder that contains all of that. I use ../../ because it's pretty standard for small-fry blogs, but for yours, which appears much larger than, for example, mine, you will need a more complex path. Basically, make it a relative path from wherever your photo gallery is to the root directory of WP (or, if you know your server structure, it can be an absolute one). If you need more help, I'm going to need a little more information about your server's directory structure.
I'm using 1.0r109 now, and I thought my path setup should have been the same…
Wordpress is installed in earleyedition.com/blog, and the gallery is in /blog/galleries/folder, so thought it would be the same ../../ path. I'll give it another go with just a few photos tomorrow and see how it turns out.
I upgraded to WordPress 2.0.4 (from 1.5.2) over a week ago and just remembered my gallery today. I checked it out again to see if the upgrade changed anything. It did! Gallery now working fine, it seems…
That is very weird… are you not running 10.4? Compatability-wise, it shouldn't have made a difference, I added literally one line, and that was in the Template Installer. Try removing it from the iPhoto bundle manually and reinstalling. Of that doesn't work, you can still access the old binary 1.0r109 by typing it into the URL.
I got it to install now, but when I run Autoviewer template, I get this error:
Traceback (most recent call last):
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 434, in ?
File "", line 2, in ?
File "/Applications/iPhoto.app/Contents/PlugIns/WebExport.iPhotoExporter/Contents/Resources/exporter.py", line 342, in process_file
codecName = re.search("",contents).group(1)
AttributeError: 'NoneType' object has no attribute 'group'