Jump to content

Profile Slideshow - Screenshot Center Mod


Jason

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...