Top Posters block question.

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Top Posters block question.
Killa
CZ Super Newbie
Killa has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Gender: Male
Status: Offline
Joined: Apr 02, 2004
0.01 posts per day
Posts: 65
Points: 4,417
   
How can I get it display user uploaded avatars? It displays the avatars that come with the forum fine.In our words could i point the top posters block to look at the upload folder where user avatars are uploaded so they will be displayed and how could i do it?what line would I need to edit..thx



Back to top Reply with quote
#2   re: Top Posters block question.
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Its allready configured to do that. If you having problems getting it working post the code for it.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   Re: re: Top Posters block question.
Killa
CZ Super Newbie
Killa has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Gender: Male
Status: Offline
Joined: Apr 02, 2004
0.01 posts per day
Posts: 65
Points: 4,417
   


Originally posted by Telli @ Thu Apr 15, 2004 3:12 am:

Its allready configured to do that. If you having problems getting it working post the code for it.


if (eregi("block-Top_Posters.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}
$a = 1;
    global $user, $cookie, $sitename, $prefix, $user_prefix, $dbi, $admin, $module_name;
    $result=sql_query("SELECT user_id, username, user_posts, user_avatar, user_points FROM ".$user_prefix."_users ORDER BY user_posts DESC LIMIT 0,5", $dbi);
    while(list($user_id, $username, $user_posts, $user_avatar, $user_points) = sql_fetch_row($result, $dbi)) {
$content .= "<div align=\"left\"><table class=\"outer\" cellpadding=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" cellspacing=\"1\" border=\"0\">";
$content .= "<tr class=\"even\" vAlign=\"middle\">";

$content .= "<td align=\"middle\">";
if (eregi("http://", $user_avatar)) {
$content .= " ;; ;;<a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$user_id\"><img alt src=\"$user_avatar\" border =\"0\" width=\"32\"></a></td>";
}
else
$content .= " ;; ;;<a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$user_id\"><img alt src=\"modules/Forums/images/avatars/$user_avatar\" border =\"0\" width=\"32\"></a></td>";
$content .= "<td align=\"middle\"> ;;<a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$user_id\"><b>$username</b></a> ;;<br> ;;<a href=\"modules.php?name=Forums&amp;file=search&amp;search_author=$username\">Posts:</a>";
$content .= " ;;<a href=\"modules.php?name=Forums&amp;file=search&amp;search_author=$username\">$user_posts</a><br> ;;Points: ;;<b>$user_points ;;</td>";
$content .= "</tr>";
$content .= "</table></div><hr>";
}

?>



Back to top Reply with quote
#4   re: Top Posters block question.
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Try this one



Attached Files
block-Top_Posters.zip (1017 Bytes, Downloaded: 5250 Time(s))



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: Top Posters block question.
Killa
CZ Super Newbie
Killa has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Gender: Male
Status: Offline
Joined: Apr 02, 2004
0.01 posts per day
Posts: 65
Points: 4,417
   
i found the problem .I didnt have the upload path set to /modules/Forums/images/avatars...Now i put some avatars in that folder they display on the main page.

Now i have a new problem,when i upload to theat path i get this error

Warning: copy(./modules/Forums/images/avatars/32034407e887e2abf0.jpg): failed to open stream: Permission denied in C:\web\gfyclan\includes\usercp_avatar.php on line 264 here the code on that line.

    $move_file($avatar_filename, './' . $board_config['avatar_path'] . "/$new_filename");
                }



i appreciate all your help...Im still new to nuke and im learning alot.....thx


Back to top Reply with quote
#6   re: Top Posters block question.
Taut
PayPal Donation
CZ Revered Member
 Codezwiz Site Donator
usa.gif california.gif
Occupation: Entrepreneur
Gender: Female
Fav. Sports Team: SF Giants
Status: Offline
Joined: May 27, 2003
0.70 posts per day
Posts: 5530
Points: 481,695
   
try altering the permissions for that file.



Back to top Reply with quote
#7   Re: re: Top Posters block question.
Killa
CZ Super Newbie
Killa has been a member for over 20 year's 20 Year Member
usa.gif newyork.gif
Gender: Male
Status: Offline
Joined: Apr 02, 2004
0.01 posts per day
Posts: 65
Points: 4,417
   


Originally posted by Taut @ Thu Apr 15, 2004 10:01 pm:

try altering the permissions for that file.


of the avatars folder?



Back to top Reply with quote
#8   re: Top Posters block question.
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
yes chmod it 777




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum