I've posted a new version of my photos hack that works with WordPress 1.0+.
http://www.alexking.org/software/wordpress/
I've posted a new version of my photos hack that works with WordPress 1.0+.
http://www.alexking.org/software/wordpress/
Alex
This is what I am looking. I downloaded wp-photos and modified WordPress 1.0 by README.
I have few questions on this.
4) Add this to edit-showposts.php before the
tag and
after the Edit/Delete links at line 275:
Which version of WP? Is it better if you add the wp version to your download.
Anyway I think I added that line at the right place but when I am in edit mode I can not find
"Photo Add/Edit" command in the screen as you shown in your example.
Any suggestions ?
Not really, the function output the links just fine on my install. I'm using code that is a day or so older than the 1.0.1 release candidate.
I couldn't find that line either. I put it in where I thought it would go, then I received a MySQL error on another line and gave up. I took the hack out and I'm just going to upload them manually.
edit-showposts was removed in 1.0.1.
Try line 275 in edit.php
I couldnt find the file to put this info in
- this goes just in front of <?php the_content(); ?>
<?php
if (!isset($c) || $c != 1) {
$photo = get_preview_photo($id);
if (!empty($photo->thumb)) {
print($photo->preview_thumbnail());
}
}
?>
- this goes before the comments
<?php
if (isset($c) && $c == 1) {
$photos = get_post_photos($id);
$photos = get_thumbnail_grid($photos);
print($photos);
}
?>
that goes in index.php
yes but where in index.php i added it and still i cant use my wp-photos.
hmm... seems like the latest nightly changed the edit page significantly. any advice on how to install it for the new system?
After the links to edit/delete, etc.
It can be anywhere within the posts loop.
THanks alex for a great addition. Your website is what got me to go with WP. Below is something I added to keep images and linking from defeating the password option.
[code]
if (!isset($c) || $c != 1) {
$photo = get_preview_photo($id);
if (!empty($photo->thumb)) {
if($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) {
print "";
}else{
print($photo->preview_thumbnail());
}
}
}
[/code]
I'll add that, good catch.
Hi Alex,
I got a parse error in wp-photos.config.p h p when I ran wp-photos.set-up.p h p, I found the error on line 33 of wp-photos.config.p h p
.wp-caption {
/* font-family: verdana; */
}
// -->
</style>
*/
This is line 33: /* font-family: verdana; */
Once I removed /* font-family: verdana; */ I was able to run and add the tables with no problem.
Karl
I don't think the /* font-family: verdana; */ is the problem. I think you have to delete the
// -->
</style>
*/
Once you have put those CSS-elements in a stylesheet, you can delete them from the wp-photos.config.php.
I think it's that last '}' that PHP don't like.
Karl
Looks like the //--> would toss an error.
hello,
i can find "- this goes just in front of <?php the_content(); ?>",
but cannot find the place "-this goes before the comments".
where is "before comments"?
just tell me the line number.
thank you.
Can't seem to get this thing working either. Uploaded everything, created table (after deleting the /* font-family: verdana; */ string), tried to put all the stuff in the right place in the index.php.
There still is no edit/add image link in the admin-screens... Maybe "<?php
if (isset($c) && $c == 1) {
$photos = get_post_photos($id);
$photos = get_thumbnail_grid($photos);
print($photos);
}
?>"
is not at the right place?
Please help.
Paul
Oops, it works! in the edit screen! Thanks for this great script! Paul
Alex,
I noticed a typo in wp-photos.php @ line 41
if ($b2photos->import_IPTC == 1) {
Should be $wpphotos->
I've got everything loaded, worked out the bugs and issues, but don't see anything.
http://www.urbanredneck.org/index.php
What is wrong if it says "No suitable folders found" when I try to select the folder with the photos in it (after clicking on "Photos: Add" in the edit page)? It is set up exactly as described in the readme, and I am stumped. The folder shows up, but then when I try to select it I get this error.
Thanks Jim, I'll fix that.
redneck, what do you expect to see?
litlnemo, usually that means the folders and files aren't arranged as required. Does it work with the included sample photo?
Um. I'm a dork because I deleted the sample after I added my own folder. The folder(s) I added were exactly the same -- in the wp-photos folder, I placed a folder called "test" containing the full-size jpegs, and inside the "test" folder, a folder called "t" with the thumbnail jpegs. Since everything seemed correct I was an idiot and deleted the sample folder without actually trying it. I wonder if I still have a copy here somewhere....
Anyway, this is the current set-up:
wp-photos folder in my blog's directory
test folder in the wp-photos folder
t folder in the test folder
That's correct, right?
Is there any specific permissions setting I should give the folders?
Hmm. I found the sample folder in the original archive I downloaded, and put it back in its place on the server. I still get the same error.
Alex: "what did I expect to see?"
From the README: "Then click the Add link next to a post and click the (Use ->) link next to your folder."
redneck, If you don't have Photo Add?Edit links as shown in the screenshot here:
http://alexking.org/index.php?content=software/wordpress/wp-photos.php
Then something isn't set up properly.
litlnemo, check your permissions I guess. It works when everything is in place.
No, I don't see that text (you can check my site). There's nothing in the page source either.
I fool around with my category, so there is never a case where there is no category selected (forces $c to 1 if no $c is set). I don't know whether that would screw up your !isset($c) || $c != 1) test. Also, your !empty($photo->thumb) texst might fail, since all I have in there is the one sample that came with your download.
Not a big deal at the moment. I just thought I would try it. I have other fish to fry for now.
you are looking in the admin area, right?
Oops, um, yay, it works!
This topic has been closed to new replies.