WordPress.org

Ready to get started?Download WordPress

Forums

WP Photos Hack (1.0+ Compatible) (61 posts)

  1. Alex King
    Member
    Posted 10 years ago #

    I've posted a new version of my photos hack that works with WordPress 1.0+.
    http://www.alexking.org/software/wordpress/

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    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 ?

  3. Alex King
    Member
    Posted 10 years ago #

    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.

  4. southerngal
    Member
    Posted 10 years ago #

    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.

  5. Alex King
    Member
    Posted 10 years ago #

    edit-showposts was removed in 1.0.1.
    Try line 275 in edit.php

  6. sbakalor
    Member
    Posted 10 years ago #

    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);
    }
    ?>

  7. Alex King
    Member
    Posted 10 years ago #

    that goes in index.php

  8. westforwishing9
    Member
    Posted 10 years ago #

    yes but where in index.php i added it and still i cant use my wp-photos.

  9. Anonymous
    Unregistered
    Posted 10 years ago #

    hmm... seems like the latest nightly changed the edit page significantly. any advice on how to install it for the new system?

  10. Alex King
    Member
    Posted 10 years ago #

    After the links to edit/delete, etc.
    It can be anywhere within the posts loop.

  11. Anonymous
    Unregistered
    Posted 10 years ago #

    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]

  12. Alex King
    Member
    Posted 10 years ago #

    I'll add that, good catch.

  13. KarlB
    Member
    Posted 10 years ago #

    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

  14. ByteWarrior
    Member
    Posted 10 years ago #

    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.

  15. KarlB
    Member
    Posted 10 years ago #

    I think it's that last '}' that PHP don't like.
    Karl

  16. NuclearMoose
    Member
    Posted 10 years ago #

    Looks like the //--> would toss an error.

  17. Anonymous
    Unregistered
    Posted 10 years ago #

    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.

  18. Anonymous
    Unregistered
    Posted 10 years ago #

    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

  19. Anonymous
    Unregistered
    Posted 10 years ago #

    Oops, it works! in the edit screen! Thanks for this great script! Paul

  20. JimLinch
    Member
    Posted 10 years ago #

    Alex,
    I noticed a typo in wp-photos.php @ line 41
    if ($b2photos->import_IPTC == 1) {
    Should be $wpphotos->

  21. redneck
    Member
    Posted 10 years ago #

    I've got everything loaded, worked out the bugs and issues, but don't see anything.
    http://www.urbanredneck.org/index.php

  22. litlnemo
    Member
    Posted 10 years ago #

    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.

  23. Alex King
    Member
    Posted 10 years ago #

    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?

  24. litlnemo
    Member
    Posted 10 years ago #

    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?

  25. litlnemo
    Member
    Posted 10 years ago #

    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.

  26. redneck
    Member
    Posted 10 years ago #

    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."

  27. Alex King
    Member
    Posted 10 years ago #

    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.

  28. redneck
    Member
    Posted 10 years ago #

    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.

  29. Alex King
    Member
    Posted 10 years ago #

    you are looking in the admin area, right?

  30. redneck
    Member
    Posted 10 years ago #

    Oops, um, yay, it works!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.