WordPress.org

Forums

Alex WP-Photos any plans to implement in 1.1? (4 posts)

  1. FionaGilbert
    Member
    Posted 11 years ago #

    Hi
    I would really like to see WP Photos implemented into 1.1. I was going to add it today to the nightly build then I realised that everytime there is a WP update it would mean I would have to make the changes for WP photos to work.
    Just a thought.

  2. Cyril
    Member
    Posted 11 years ago #

    I just work on an adaptation of Alex wp-photos on the last 1.1 beta.
    I can give you help with my changes.
    Alex, do you want a copy of them to update your package ?
    Cyril

  3. Alex King
    Member
    Posted 11 years ago #

    Fiona - WP Photos is a temporary solution, eventually there will be something like this built into WP and I'll write an upgrade script to convert the data.
    Cyril - sure sent it over - make sure your changes are made on the current release.

  4. Cyril
    Member
    Posted 11 years ago #

    How to use wp-photo with wp 1.1 (cvs extract from 17 feb 2004)
    Open up the wp-photos.config.php file and change the settings as needed.
    in index.php :
    - this goes at the top somewhere before the rest of these tags
    <?php require_once('wp-photos.hack.php'); ?>
    replace the story content 'div' by :
    <div class="storycontent">
    <?php
    if (!isset($single) || $single != 1) {
    $photo = get_preview_photo($id);
    if (!empty($photo->thumb)) {
    print($photo->preview_thumbnail());
    }
    }
    ?>
    <?php the_content(); ?>
    <?php
    if (isset($single) && $single == 1) {
    $photos = get_post_photos($id);
    $photos = get_thumbnail_grid($photos);
    print($photos);
    }
    ?>
    </div>
    in wp-admin/edit.php :
    add :
    <th scope="col">Photos</th>
    after
    <th scope="col">Delete</th>
    and before </tr>
    add :
    <td><?php include_once('../wp-photos.hack.php'); wpphotos_link(); ?></td
    >
    after
    <td><?php if (($user_level > $authordata->user_level) or ($user_login == $au
    thordata->user_login)) { echo "
    ss='delete' onclick=\"return confirm('You are about to delete this post \'".the_
    title('','',0)."\'\\n \'OK\' to delete, \'Cancel\' to stop.')\">Delete
    "; }
    ?></td>
    and before </tr>
    in wp-photos.hack.php, replace wpphoto_link function by
    function wpphotos_link() {
    global $wpphotos, $id;
    $path = '';
    if (strtolower($wpphotos->type) == 'wordpress') {
    $path = '../';
    }
    $string = '
    nk">Add
    /'
    .'
    target="_blank">Edit
    '
    .' ['.get_post_photos_count($id).']';
    print($string);
    }
    Now the edit post look like that :
    ID When Title Categories Comments Author Edit Delete Photos
    13 2004-02-15
    5:30:00 pm Sortie motoneige General no comments Cyril Edit Delete Add/Edit [2]
    you can update the story content 'div' in the Preview
    part of wp-admin/post.php by :
    <div class="storycontent">
    <?php
    $photo = get_preview_photo($id);
    if (!empty($photo->thumb)) {
    print($photo->preview_thumbnail());
    }
    ?>
    <?php the_content(); ?>
    <?php
    $photos = get_post_photos($id);
    $photos = get_thumbnail_grid($photos);
    print($photos);
    ?>
    </div>
    if you like.
    Cyril
    Montreal

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.