Jason Posted September 12, 2012 Report Share Posted September 12, 2012 This Mod Requires Simpilots Screenshot Center - http://forum.phpvms....nshotcenter-20/ This is a small mod that allows you to show a users uploaded photos in a jquery slideshow. It also lists each photo that the user uploaded in a table, including a jquery photo preview (Mouse over the file name) DEMO: http://d12hd.com/ind.../profile/view/1 Installation 1. Download the attached file and upload it to your server 2. Add the code below to core/common/ScreenshotsData.class.php public function get_pilots_screenshots($pilot_id) { $query = "SELECT * FROM screenshots WHERE pilot_id='$pilot_id'"; return DB::get_row($query); } 3. Add the code below in core/modules/Screenshots/Screenshots.php public function get_pilots_screenshots($pilot_id) { $screenshot = ScreenshotsData::getscreenshots(); $this->set('screenshot', $screenshot); $this->show('Screenshots/screenshots_profile.tpl'); } 4. Add the code below in core/modules/profile/profile.php - In the VIEW function $this->set('pilot_id', $pilotid); Screenshots::get_pilots_screenshots($pilot_id); Screenshots_ProfileMod.zip Quote Link to comment Share on other sites More sharing options...
flyalaska Posted September 13, 2012 Report Share Posted September 13, 2012 What shows if the pilot hasn't uploaded a screenshot? Quote Link to comment Share on other sites More sharing options...
Industrialshadow Posted September 13, 2012 Report Share Posted September 13, 2012 i become a syntax failure when i will add this code public function get_pilots_screenshots($pilot_id) { $query = "SELECT * FROM screenshots WHERE pilot_id='$pilot_id'"; return DB::get_row($query); into my data class any idea ? Quote Link to comment Share on other sites More sharing options...
Jason Posted September 13, 2012 Author Report Share Posted September 13, 2012 i become a syntax failure when i will add this code public function get_pilots_screenshots($pilot_id) { $query = "SELECT * FROM screenshots WHERE pilot_id='$pilot_id'"; return DB::get_row($query); into my data class any idea ? Make sure this is in the PHP tags, and now that a look at it, you have to add a } at the end. public function get_pilots_screenshots($pilot_id) { $query = "SELECT * FROM screenshots WHERE pilot_id='$pilot_id'"; return DB::get_row($query); } Try that Quote Link to comment Share on other sites More sharing options...
gian1992 Posted September 14, 2012 Report Share Posted September 14, 2012 Hi sr. you've missed a <div> in "screenshots_profile.tpl" but If you use this module at the end of the profile isn't a problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.