Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Photo Module

11 years 3 weeks ago
Licenses:
JomSocial Expired

Hi,

Is it possible to let "Photo" module to display user own photo only?

instead of all user

Hope to hear you soon.

11 years 3 weeks ago
Licenses:

Hi,

it can. but need small changes at jomsocial core file.
if we do that, that changes will be disappeared after jomscoial upgrade and you need to put that changes back

if you doesn't mind with that, I can provide the it for you.

Regards

11 years 3 weeks ago
Licenses:
JomSocial Expired

Hi Albertus,

Thank you for your reply, yes i don't mind by hacking the core.
Hope to hear you soon thanks

11 years 3 weeks ago
Licenses:

Hi,

please provide me FTP access detail, by editing your first post at this topic.
put it at site info form.

Regards

11 years 3 weeks ago
Licenses:

Hi,

I got your FTP from other topic. here the changes:
/public_html/dev/modules/mod_community_photos/mod_community_photos.php
I put new code

// get logged in user id
$loggedID = CFactory::getUser();
and at line 58, I changing it from
$photos = $model->getAllPhotos(null, $photoType, $limit, array(0,10), COMMUNITY_ORDER_BY_DESC, $sortBy);
to
$photos = $model->getAllPhotos(null, $photoType, $limit, array(0,10), COMMUNITY_ORDER_BY_DESC, $sortBy, $loggedID->id);

at /public_html/dev/components/com_community/models/photos.php
line 274
from
 public function getAllPhotos($albumId = null, $photoType = PHOTOS_USER_TYPE, $limit = null, $permission = null, $orderType = 'DESC', $primaryOrdering = 'ordering') {
to
 public function getAllPhotos($albumId = null, $photoType = PHOTOS_USER_TYPE, $limit = null, $permission = null, $orderType = 'DESC', $primaryOrdering = 'ordering', $userid = null) {
and I put new code at line 292
if ($userid > 0) {
    $where .= ' AND b.`creator`'
            . '=' . $db->Quote($userid);
}

Regards

11 years 3 weeks ago
Licenses:
JomSocial Expired

Hi Albertus,

Thank you for your modification, however i've edit the code to suit my needs

this is what i done.

$loggedID = CFactory::getUser();

to

$loggedID = CFactory::getUser($userId);
$loggedID = CFactory::getRequestUser();

so that visitor will be able to view user photo too.

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW