Request for help : Show 'last Uploaded By' thumbnails

Begonnen von Beyond_Doubt, 16 März 2006, 11:34:07

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

Beyond_Doubt

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...



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.


________________________________________

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. :)

Beyond_Doubt

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 :)

Beyond_Doubt

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. :)

Beyond_Doubt

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 !