Discussion
test(back to index)works?
posted by Sandro Stark on 4 Aug 05 at 6:58 AM
OH, I'm sorry. I tried the half week to post a new thread and got a php error every time. So I thought, I just post a test before my whole text gets killed again.
My Question is, if there is any possibility to post the latest uploaded Image on a website, like the flickr badge?
sorry again for stupid-posting
enJoy Sandro
Hello Sandro -
I am pretty much doing this with a Dashboard Widget I made to go along with FolderBlog. You can see it (and download it if you are a Mac user) here:
http://widgets.dizandat.com/
Basically, I duplicated the "template_main.php" file and stripped everything out except for the:
<img src="<#fbimageurl#>" alt="<#fbtitle#> : <#fbdate#>" width="<#fbwidth#>" height="<#fbheight#>" />
line of code. Save it as "include_template.php".
Now, duplicate your "fb.php" file and rename it to "include.php". Open up this file in a text editor and do a search for the phrase:
$template_file = "{$template_name}_$page.php";
Replace the "{$template_name}_$page.php" with "include_template.php".
Now when you call http://www.yourdomain.com/include.php, you will see that it is calling that new seperate template that just has your most recently added photo!
From this point, you can include this file via PHP just as you would normally. That probably wasn't very clear but if you follow the steps closely you should be fine. I am sure there are better ways of doing this but, I got it working this way just fine.
- Abraham
http://photos.dizandat.com
posted by
Abraham on 6 Aug 05 at 7:52 PM
great explanation, would be nice to see a Zip-Package in the Wiki soon! i also wanted to have such, but didnt came on that idea... btw, we should also wait for donald as he uses the same thing (different way?) on his own photolog (there's an extra link-page)
erik
posted by
erik on 7 Aug 05 at 3:03 AM
Ok, i think i understood.
I'm not a mac user but i'll try anyway...great explanation like eric already said!
Ok, perhaps it didin't work anyway.
Is there a need for a ";" after
"include_template.php" ?
because i get a = http://sandrostark.de/fb/include.php
error :(
On the topic of widgets, I've got a widget running for my photoblog too... You can try it out at http://www.brentkirkwood.com/downloads/Brent%20Kirkwood.wdgt.zip . It simply displays thumbnails that it rips from the RSS feed. This is version 1.3.1 of a work in progress (written by Mark Miller, a faithful viewer). Any feedback is appreciated. Planned visible improvements include an icon and improved "slide-look".
posted by
Brent on 8 Aug 05 at 3:37 PM
My widget:
http://widgets.dizandat.com/
posted by
Abraham on 10 Aug 05 at 12:20 PM
Very nice widget, Brent Kirkwood. Amazing photos, too.
posted by Charles Bucket on 10 Aug 05 at 11:04 PM
@brent:
do you plan to publish your widget that everybody can use it with his own photoblog?
posted by
nick on 11 Aug 05 at 5:21 AM
Is there also way for Windows Users?
Every time you use the post interface, a current.jpg (and random.jpg) is created in your thumbs directory. You can use static links (i.e. http://example.com/thumbs/current.jpg) to display that thumbnail on any other page. It'd be pretty straightforward to duplicate this functionality (via extension) with a full sized image.
posted by
donald on 19 Aug 05 at 1:29 AM
Nick: sorry for the slow reply. I didn't write the widget, so I can't be the one to give others permission to use it, but I will definitely post something here if the author of it decides to allow that!
Charles: thanks!
posted by
Brent on 4 Sep 05 at 7:18 AM
Post a Reply:
(back to index)