Something like the Top module, except query on the username. Shouldn't be too difficult, have to craft the queries correctly depending on how the data is stored. Really have to understand the data structure of those specific modules.
Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
Posted:
Mon May 12, 2008 5:29 am
You could also take some ideas from kguske's nukeSEO/nukeFEED where he uses classes and then each content type has a script and class which extends the base. This would make it very easy to add additional content types if/when you should decide to do so, OR, if you should decide to release this publically.
Hey guys, thanks for helping and sharing ideas but I think I am going to try a different approach, like you said that you have to understand the data I look and came up with the following plan:
I am going to edit usercp_viewprofile.php and profile_view_body.tpl which control the user profile of a user. I am going to use the phpbb user profile to display each user contribute. all the data has a submitter row so I going to query the data for each user to he's profile page and display it.
for now I have started to work on the sent gallery images that the user have sent, I copied and modified the following code from a block file:
Code:
//
// Generate gallery
//
$Display_numpic = 6;
$result = mysql_query("SELECT p.pid, p.img, p.name, p.description, p.submitter, c.galloc FROM nuke_gallery_pictures AS p LEFT JOIN nuke_gallery_categories AS c ON c.gallid=p.gid where p.submitter='$u_search_author' ORDER BY date DESC LIMIT 0, $Display_numpic");
$t = 1;
while (list($pid, $img, $name, $description, $submitter, $galloc) = mysql_fetch_row($result)) {
$list_pic .= "<a href=\"showfile-$pid.html\"><img src=\"modules/My_eGallery/gallery/$galloc/thumb/$img\" height=\"90\" width=\"110\" border=\"1\" alt=\"$description\"></a>";
$list_pic .= ($t != $Display_numpic ? " " : "");
$t++;
}
It is working but I have one small problem, for some reason it will not return diffrent images but always the first raw. any idea why? it should give the last 6 pictures with the following code doesnt it? can you spot the problem maybe?
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum