WordPress.org

Ready to get started?Download WordPress

Forums

In need of help, plugin works but breaks admin (1 post)

  1. carbontwelve
    Member
    Posted 8 years ago #

    Hi this is a bit of an odd problem. I finally got my plugin for showing the latest photos in zen photo working. But now as long as its active when ever I submit a post, the post is submitted but im left with a blank page instead of the post confermation page.

    Below is the code for my plugin, could anyone give any light on what is wrong?

    code
    <?php

    /*
    Plugin Name: ZenGo
    Plugin URI: http://www.photogabble.co.uk
    Description: Displays the recent additions to the zenphoto gallery
    Version: 0.5
    Author: Simon Dann
    Author URI: http://www.photogabble.co.uk
    */

    function zenlatest ($max){
    global $wpdb;
    if ($max == "") { $max = 1; }

    $zenimages = $wpdb->get_results("SELECT zen_images.filename AS filename, zen_images.desc AS file_desc, zen_album.folder AS folder, zen_images.title AS title FROM zen_images AS zen_images INNER JOIN zen_albums AS zen_album ON zen_album.id = zen_images.albumid WHERE zen_images.show =1 ORDER BY zen_images.id DESC LIMIT 0, ". $max ."");

    foreach ($zenimages as $zenimage ) {<br />
    echo '<a>folder .'/'. $zenimage->filename . '"><img src="/zenphoto/'. $zenimage->folder .'/image/thumb/'. $zenimage->filename .'"></a>';<br />
    }

    }
    code`

Topic Closed

This topic has been closed to new replies.

About this Topic