WordPress.org

Ready to get started?Download WordPress

Forums

wp-photos & the edit file (13 posts)

  1. mgrace74
    Member
    Posted 9 years ago #

    Please help.

    The readme file tells me to add lines to my edit.php files in places which I know are incorrect. The readme file tells me to:

    Add this at line 89:

    <th scope="col">Photos</th>

    as demonstrated here:

    <th scope="col"><?php _e('Delete') ?></th>
    <th scope="col">Photos</th>
    </tr>

    Add this at line 114 (was 113 before you added the line above):

    <td><?php wpphotos_link(); ?></td>

    as demonstrated here:

    <td><?php if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { echo "" . __('Delete') . ""; } ?></td>
    <td><?php wpphotos_link(); ?></td>
    </tr>

    These lines must be off because when I insert this code into those line numbers, my manage page does not load.

    Any and all help is greatly appreciated.

  2. spikeyslam
    Member
    Posted 9 years ago #

    The structure in edit.php has totally changed with WP 1.5. Try this instead:

    Add this at line 123:
    "photos" => __("Photos"),

    as demo here:


    "comments" => __("Comments"),
    "photos" => __("Photos"),
    "author" => __("Author")
    );
    $posts_columns = apply_filters("manage_posts_columns", $posts_columns);

    Add this at line 204:
    case "photos":
    ?>
    <td><?php wpphotos_link(); ?></td>
    <?php
    break;

    so that it looks like this:


    case "author":
    ?>
    <td><?php the_author() ?></td>
    <?php
    break;

    case "photos":
    ?>
    <td><?php wpphotos_link(); ?></td>
    <?php
    break;

    case "control_view":
    ?>
    <td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e("View"); ?></a></td>
    <?php
    break;

  3. mgrace74
    Member
    Posted 9 years ago #

    Thank you for your response. For whatever reason, it's still not working....here is my code:

    // define the columns to display, the syntax is 'internal name' => 'display name'
    $posts_columns = array(
    'id' => __('ID'),
    'date' => __('When'),
    'title' => __('Title'),
    'categories' => __('Categories'),
    'comments' => __('Comments'),
    'photos' => __('Photos'),
    'author' => __('Author')

    );
    $posts_columns = apply_filters('manage_posts_columns', $posts_columns);

    // you can not edit these at the moment
    $posts_columns['control_view'] = '';
    $posts_columns['control_edit'] = '';
    $posts_columns['control_delete'] = '';

    ?>

    <table width="100%" cellpadding="3" cellspacing="3">
    <tr>

    <?php foreach($posts_columns as $column_display_name) { ?>
    <th scope="col"><?php echo $column_display_name; ?></th>
    <?php } ?>

    </tr>
    <?php
    $what_to_show = 'posts';
    if ( empty($_GET['m']) || 0 == $_GET['m'] && empty($_GET['s']) ) {
    $showposts = 15;
    } else {
    $nopaging = true;
    }

    include(ABSPATH.'wp-blog-header.php');

    if ($posts) {
    $bgcolor = '';
    foreach ($posts as $post) { start_wp();
    $class = ('alternate' == $class) ? '' : 'alternate';
    ?>
    <tr class='<?php echo $class; ?>'>

    <?php

    foreach($posts_columns as $column_name=>$column_display_name) {

    switch($column_name) {

    case 'id':
    ?>
    <th scope="row"><?php echo $id ?></th>
    <?php
    break;

    case 'date':
    ?>
    <td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
    <?php
    break;
    case 'title':
    ?>
    <td><?php the_title() ?>
    <?php if ('private' == $post->post_status) _e(' - Private'); ?></td>
    <?php
    break;

    case 'categories':
    ?>
    <td><?php the_category(','); ?></td>
    <?php
    break;

    case 'comments':
    ?>
    <td>&c=1">
    <?php comments_number(__('0'), __('1'), __('%')) ?>
    </td>
    <?php
    break;

    case 'author':
    ?>
    <td><?php the_author() ?></td>
    <?php
    break;

    case 'photos':
    ?>
    <td><?php wpphotos_link(); ?></td>
    <?php
    break;

    case 'control_view':
    ?>
    <td>" rel="permalink" class="edit"><?php _e('View'); ?></td>
    <?php
    break;

    My screen looks like this now:

    http://www.bmgwebdesign.com/images/screenshotBlog.jpg

    The code looks good, so I can't figure out what it is. Please let me know if you can think of anything. TIA.

  4. spikeyslam
    Member
    Posted 9 years ago #

    That's strange. code looks fine. hmm. Try putting photos after author:

    'comments' => __('Comments'),
    'author' => __('Author'),
    'photos' => __('Photos')
    );

  5. mgrace74
    Member
    Posted 9 years ago #

    Again, thanks for your time and effort, but it is still not working. There is nothing displayed after the photo column on my screen, and only my most recent entry is displayed in the rows. The problem has to be in this code:

    case 'photos':
    ?>
    <td><?php wpphotos_link(); ?></td>
    <?php
    break;

    If you have any other suggestions, they would be greatly appreciated.

  6. spikeyslam
    Member
    Posted 9 years ago #

    That's so strange. Hmm. Did you activated the plugin in the plugins section?

    Here's my edit.php. Just download it and rename it to edit.php... It's the stock wordpress 1.5 with the changes needed for wp-photo 1.5.

  7. mgrace74
    Member
    Posted 9 years ago #

    Nope, that produced the same result as last time. I'm starting to wonder if I have the right files in the right place. I have wp-photo.php, wp-photos-installer.php, and wp-photos-manager.php in the root directory of my blog. I also have wp-photos.php in the plugin directory, and it is activated. Are these the correct files?

  8. spikeyslam
    Member
    Posted 9 years ago #

    Make sure wp-photo.php, wp-photos-installer.php and wp-photos-manager.php are in the root wordpress folder with all the wordpress files.

    Edit your wp-photos.php with the correct database settings. Make sure you loaded wp-photos-installer.php in a web browser. It will create a new database table for wp-photos. You can delete wp-photos-installer.php afterwards.

  9. mgrace74
    Member
    Posted 9 years ago #

    OK, I think we're finally getting somewhere. I'm not sure what I need to edit in the wp-photos.php file. Can you point me in the right direction as far as what settings need to be set?

  10. elmsblog
    Member
    Posted 9 years ago #

    I'm having a problem with wp-photos as well. Some windows users are telling me they're getting a 404 error when clicking a thumbnail to see the full pic. Any windows users wanna check this out for me? Let me know if it works or not, and if you have any clues. Thanks!

    I also got an e-mail saying RSS didn't work either...

    The thing is... it works for me just fine!

  11. Jaqueline
    Member
    Posted 9 years ago #

    I totally "lost" my ADD button on the edit post page. The pages I created using WP-Photos are working, but I can´t create a new post and add photos, just because I don´t have the option anymore.
    Is it at Edit.php file? What exactly I have to change there?
    I tried all galleries plug-ins available, but WP-Photos is the one that is perfect for me.
    Thanks!!!

  12. bambit
    Member
    Posted 9 years ago #

    I have edited my edit.php file successfully using spikeyslam's code as i am using 1.5. i cannot however, find the lines in the index.php that alex king is referring to. maybe that has changed as well? can anyone tell me what to put in and where? will appreciate all help :)

  13. Jaqueline
    Member
    Posted 9 years ago #

    spikeyslam, I tried to download your edit.tx, but the link is broken.
    Could you please send it to me or maybe put it in another place to me to download it? I´m afraid of modify it myself and ruin it! :) I´m awfull with all the code stuff!!! If you can help me, it´s my e-mail: jackie@maismoda.com.br Thank you so much!!!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.