Again I appologise for having to use English on a German forum. :-\
I am hoping that someone can help me with a feature in is not in CPG-MX; but is in the stand alone CPG.
In the stand alone CPG it is possible to see a thumbnail album showing all the last uploads by a certain UserID. This is done from the User Profile screen, under the 'last uploaded file' thumbnail.
Like this...
(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fhomepage.ntlworld.com%2Fjonrollinson%2FUploads.jpg&hash=474ba927a477002e39343417122068cc0b95350e)
With CPG-MX the users profile of CPG is not used as the Users list in PragmaMX are used instead.
So when I try to use the CPG url ( thumbnails.php?album=lastupby&uid=2 ) nothing happens.
I guess because of...
//if (defined('UDB_INTEGRATION')){
$cpg_udb->view_profile($_GET['uid']);
Looking at the code in the Thumbnails.php and Profile.php from CPG and CPG-MX they are very similar.
So my first question is...
Can I view all uploads by a user done in CPG-MX from a single click?
Without using the Search.php.
I am hoping to change the code in the Album.php so that by clicking on the User Name it would show all uploads by that user.
(https://forum.pragmamx.org/proxy.php?request=http%3A%2F%2Fhomepage.ntlworld.com%2Fjonrollinson%2FClick_Name.jpg&hash=d3e907b5c6e4010e963978b1cb31c3bd29c3ef41)
________________________________________
There is also another way I can think of getting the same results.
The Search.php can search by User Name and show all the uploads by that user.
Is there a way that the Search.php code could be used in the Album.php to achive the same results?
Thank you for reading, and I hope you can help. :)
hmmm, hang on.
I can enter the url and it worked...
modules.php?name=Gallery&act=thumbnails&album=lastupby&uid=2
I think I had missed out the Gallery&act= the first time.
hmm, I might be able to do it after all :)
okay,
in displayimage.php I changed
$owner_link = '<a href ="profile.php?uid=' . $CURRENT_PIC_DATA['owner_id'] . '">' . $CURRENT_PIC_DATA['owner_name'] . '</a> ';
to
$owner_link = '<a href ="?name=Gallery&act=thumbnails&album=lastupby&uid=' . $CURRENT_PIC_DATA['owner_id'] . '">' . $CURRENT_PIC_DATA['owner_name'] . '</a> ';
Which has worked.
But I would appreciate someone telling me the correct way to build that URL using the $SOMETHING to replace parts of the url. :)
and same again to get the right link to appear in the main thumbnail view of the album
in functions.inc.php find
$caption .= ($row['owner_id'] && $row['owner_name']) ? '<span class="thumb_title"><a href ="profile.php?uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>' : '';
and change to
$caption .= ($row['owner_id'] && $row['owner_name']) ? '<span class="thumb_title"><a href ="?name=Gallery&act=thumbnails&album=lastupby&uid='.$row['owner_id'].'">'.$row['owner_name'].'</a></span>' : '';
The same thing occurs in other areas of CPG but none that seem important to change :)
Now we just need someone to correct my long text solution to a short code solution !