PDA

View Full Version : Add Photos from the admin panel



Kristopher Catterall
October 2, 2012, 09:06 PM
Will there be a way to add photos from the backend of the site during the listing post process. It is tedious to make a listing then go find it and use the photo manager. I would like an <input type="file" /> to select the photo and have it uploaded with the new listing all from one page.

At the very least is there a way to click add a listing then, instead of taking me to the listings page take me to the new listing's photo manager page to upload the picture.

My only option right now is to create a separate form that posts to the current database that allows me to do this, but it is time consuming to have two sites for the same purpose.

Brandon

Mike
October 3, 2012, 06:39 AM
Hello Brandon,

It's big work to integrate pictures to the current step of listing adding in admin panel.

But another idea is pretty simple to do (after adding redirect to manage photo page)

Changes to make it:

open admin/controllers/listings.inc.php

find code ~800line



$rlNotice -> saveNotice( $lang['notice_listing_added'] );
if ( $_SESSION['listings_redirect_mode'] )
{
$aUrl = array( "controller" => "browse", "id" => $_SESSION['listings_redirect_ID'] );
}
else
{
$aUrl = array("controller" => $controller);
}

$reefless -> redirect( $aUrl );
}
}
}
}
/* add listing end */

change to



$rlNotice -> saveNotice( $lang['notice_listing_added'] );
if ( $_SESSION['listings_redirect_mode'] )
{
$aUrl = array( "controller" => "browse", "id" => $_SESSION['listings_redirect_ID'] );
}
else
{
// $aUrl = array("controller" => $controller);
$aUrl = array("controller" => $controller, "action" => "photos", "id" => $listing_id);
}

$reefless -> redirect( $aUrl );
}
}
}
}
/* add listing end */

Kristopher Catterall
October 3, 2012, 02:09 PM
This works perfectly.

Thank you very very much this saved me a ton of time.

Brandon