Clan Adverts

Sponsors

CT on Facebook

Latest Product

User Box

Anonymous
38.107.179.219
Nickname:

Password:

Security Code
Security Code
Type Security Code


PND Downloads Feed

Phpnuke Downloads
How to Delete or Reset yo...
How to Delete or Reset your PHPNuke Admin Account
Lost your admin password ?Ā  Cant login to your admin account ? This s...
Back Online & Stuff
Back Online & Stuff
Look at us with our nifty website back up and running… Seriously...
How to edit the admins in...
How to edit the admins in the forums
Here is a way to make someone admin in your forums on your Evo site. I...
Demo Splash Screen
Demo Splash Screen
Ped @ Clan Themes has released a simple splash screen entrance hack.Ā ...
Free Phpnuke Business The...
Free Phpnuke Business Theme 6
This is the 6th Business theme for Phpnuke that Clan Themes has releas...
Tricked Out Slider
Tricked Out Slider
We have seen some great new things come out of Tricked Out News and th...

Custom Work

PHP Nuke Custom Work

www.clanthemes.com :: View topic - Block-forums_center posters avatar
Block-forums_center posters avatar

3 Replies / 516 Views


Post new topic   Reply to topic  

   www.clanthemes.com Forum Index » Blocks

View previous topic :: View next topic


texxta
Reputation: 17.5 Add RepSubtract Rep
Local time: 3:13 AM

australia.gif

Noob
Noob

0.02 posts per day
Medals: 0

Joined: Apr 16, 2010
Last Visit: 27 Nov 2011
Posts: 12
Points: 6728 

Post Block-forums_center posters avatar Posted: Wed Aug 18, 2010 6:38 am

Shop Purchases:
Diablo 3 Ultimate Theme · Call of Duty Black Ops Theme · Modern Warfare 3 Theme

block-Forums_Center posters avatar

hi again

I have been rebuilding our clan website

http://www.esaclan.com.au/

I have noticed that on the "block-Forums_Center" block, the highest 5 posters avatars are no longer showing although it used to on our old website

maybe its a new code or maybe i have something pointing in the wrong direction

could you please advise me on how to correct this

thankyou

kind regards
texxta

the uploaded avatar forlder is /public_html/uploads/website
this is the latest file i downloaded from your site, I have only increased the posts to 15

<?php
if( eregi( "block-Forums_Center.php",$PHP_SELF ) )
{
Header("Location: index.php");
die();
}
global $user, $cookie, $sitename, $prefix, $user_prefix, $sitename, $admin, $module_name, $bgcolor1, $bgcolor2, $db;

// When set to 1 then Forums permissions which View and/or Read are NOT set to 'ALL' will NOT be displayed in the center block
$HideViewReadOnly = 'ALL';
// Show only 15 last new topics
$Last_New_Topics = 15;
// Icon that is displayed in Center Block in front of Topic
$IconPath = "images/msg.png";
//size of the outer border
$border = 1;
//cell spacing around the tables
$cellspacing = 0;

/* Total Amount of Topics */
$result = $db->sql_query( "SELECT * FROM ".$prefix."_bbtopics");
$Amount_Of_Topics = $db->sql_numrows($result);

/* Total Amount of Posts */
$result = $db->sql_query( "SELECT * FROM ".$prefix."_bbposts");
$Amount_Of_Posts = $db->sql_numrows($result);

/* Total Amount of Topic Views */
$Amount_Of_Topic_Views = 0;
$result = $db->sql_query( "SELECT topic_views FROM ".$prefix."_bbtopics" );
while( list( $topic_views ) = $db->sql_fetchrow($result) )
{
$Amount_Of_Topic_Views = $Amount_Of_Topic_Views + $topic_views;
}

/* Total Amount of Topic Replies */
$Amount_Of_Topic_Replies = 0;
$result = $db->sql_query( "SELECT topic_replies FROM ".$prefix."_bbtopics" );
while( list( $topic_replies ) = $db->sql_fetchrow($result) )
{
$Amount_Of_Topic_Replies = $Amount_Of_Topic_Replies + $topic_replies;
}

/* Total Amount of Members */
$result = $db->sql_query( "SELECT * FROM ".$prefix."_users" );
$Amount_Of_Members = $db->sql_numrows($result);

/* Last X New Topics */
$Count_Topics = 0;
$Topic_Buffer = "";
$result1 = $db->sql_query( "SELECT topic_id, forum_id, topic_last_post_id, topic_title, topic_poster, topic_views, topic_replies, topic_moved_id FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC" );
while( list( $topic_id, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = $db->sql_fetchrow( $result1 ) )
{
$skip_display = 0;
if( $HideViewReadOnly == 1 )
{
$result5 = $db->sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'" );
list( $auth_view, $auth_read ) = $db->sql_fetchrow( $result5 );
if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }
}

if( $topic_moved_id != 0 )
{
// Shadow Topic !!
$skip_display = 1;
}

if( $skip_display == 0 )
{
$Count_Topics += 1;
$result2 = $db->sql_query( "SELECT topic_id, poster_id, FROM_UNIXTIME( post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id = '$topic_last_post_id'" );
list( $topic_id, $poster_id, $post_time ) = $db->sql_fetchrow( $result2 );

$result3 = $db->sql_query( "SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'" );
list( $username, $user_id ) = $db->sql_fetchrow( $result3 );
$LastPoster = "<a href=\"forum-userprofile-.html$user_id\">$username</a>";

$result4 = $db->sql_query( "SELECT username, user_id FROM ".$prefix."_users where user_id='$topic_poster'" );
list( $username, $user_id ) = $db->sql_fetchrow( $result4 );
$OrigPoster = "<A HREF=\"forum-userprofile-.html$user_id\"STYLE=\"text-decoration: none\"> $username </a>";

$TopicImage = " <img src=\"$IconPath\" border=\"0\" alt=\"\">";
$TopicTitleShow = "<a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\">$topic_title</a>";

$Topic_Buffer .= "<tr><td>$TopicImage  $TopicTitleShow</td><td><div align=\"center\">$OrigPoster</div></td><td><div align=\"center\"><b>$topic_views</b></div></td><td><div align=\"center\"><b>$topic_replies</b></div></td><td align=\"center\">$LastPoster <a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"images/icon_latest_reply.gif\" border=\"0\"></a><br><font size=\"-2\"><i>$post_time</i></font></td></tr>";
}

if( $Last_New_Topics == $Count_Topics ) { break 1; }

}

$cat = $db->sql_query("SELECT * FROM ".$prefix."_bbcategories");
$content = "";


/* Write Table to Screen */
$content = "<center><table width=\"100%\" border=\"$border\" cellspacing=\"$cellspacing\" bordercolor=\"#292929\">";
$content .= "<td width=\"100%\" height=\"21\" colspan=\"6\" align=\"center\"><STRONG>Last 5 Forum Posts</STRONG></td></tr>";
$content .= "<td rowspan=\"0\" >";
$content .= "<table width=\"100%\" cellpadding=\"$cellspacing\" bordercolor=\"$bgcolor1\" cellspacing=\"1\" border=\"$border\" vAlign=\"top\">";

$forum_id = $forum_row[0];
$forum_title = $forum_row[5];
$for_count ++;



$content .= "</table>";
$content .= "<tr><td align=\"center\" >"._BBFORUM_TOTTHREAD."</td><td align=\"center\">"._BBFORUM_POSTER."</td><td align=\"center\">"._BBFORUM_VIEWS."</td><td align=\"center\">"._BBFORUM_REPLIES."</td><td align=\"center\">"._BBFORUM_LASTPOSTER."</td></tr>";
$content .= "$Topic_Buffer";
$content .= "<tr><td align=\"center\" colspan=\"6\">"._BBFORUM_TOTTOPICS."<b>$Amount_Of_Topics</b> <b>|</b> "._BBFORUM_TOTPOSTS."<b>$Amount_Of_Posts</b> <b>|</b> "._BBFORUM_TOTVIEWS."<b>$Amount_Of_Topic_Views</b> <b>|</b> "._BBFORUM_TOTREPLIES."<b>$Amount_Of_Topic_Replies</b> <b>|</b> <a href=\"modules.php?name=Members_List\">"._BBFORUM_TOTMEMBERS."</a> <b>$Amount_Of_Members</b></center></td></tr>";
$content .= "<tr><td colspan=\"6\">";
$content .= "<table width=\"100%\" cellpadding=\"0\" bordercolor=\"$bgcolor1\" cellspacing=\"$cellspacing\" border=\"0\" vAlign=\"top\" height=\"32\">";
$content .= "<tr>";
$a = 1;
global $user, $cookie, $sitename, $prefix, $user_prefix, $admin, $module_name, $db;
$result=$db->sql_query("SELECT user_id, username, user_posts, user_avatar FROM ".$user_prefix."_users ORDER BY user_posts DESC LIMIT 0,5");
while(list($user_id, $username, $user_posts, $user_avatar) = $db->sql_fetchrow($result)) {

$content .= "<td width=\"32\" vAlign=\"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\" height=\"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\" height=\"32\"></a></td>";
$content .= "<td vAlign=\"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> </td>";
}
$content .= "</tr></table>";
$content .= "</td><tr>";
$content .= "</table>";
//Please leave the following link in place so other people can also share this block !!
$content .= "<p align=right><a href= http://udesign.me.uk>©</a></p>";
?>
 

 
View user's profileSend private message Reply with quote

Ped
Reputation: 94 Add RepSubtract Rep
votes: 37
Local time: 3:13 AM
Location: Great British Empire
uk.gif

Site Founder
Site Founder

1.82 posts per day
Medals: 2 (View more...)
Super Dedicated User (Amount: 1)
Theme Guru
Theme Guru
Joined: Nov 13, 2006
Last Visit: 25 May 2012
Posts: 3675
Points: 191987 

Post Re: Block-forums_center posters avatar Posted: Wed Aug 18, 2010 7:57 am

Shop Purchases:
Clan Roster 2.0 · Bad Company 2 Vietnam Xtreme Theme

The code is near the end:

Code:
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\" height=\"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\" height=\"32\"></a></td>";


Its basicly saying

if (eregi("http://", $user_avatar = post the users avatar

OR post it from here

<img alt src=\"modules/Forums/images/avatars/$user_avatar\"

So you need to change the second piece of code to

<img alt src=\"uploads/website/$user_avatar\"

If that doesn't work, I would change the if (eregi("http://", $user_avatar to be the same as well !!

Should work then !!
 

 
View user's profileSend private messageSend e-mail Reply with quote

Ped
Reputation: 94 Add RepSubtract Rep
votes: 37
Local time: 3:13 AM
Location: Great British Empire
uk.gif

Site Founder
Site Founder

1.82 posts per day
Medals: 2 (View more...)
Forums MoD (Amount: 1)
Theme Guru
Theme Guru
Joined: Nov 13, 2006
Last Visit: 25 May 2012
Posts: 3675
Points: 191987 

Post Re: Block-forums_center posters avatar Posted: Wed Aug 18, 2010 8:02 am

Shop Purchases:
Clan Roster 2.0 · Bad Company 2 Vietnam Xtreme Theme

I just viewed your source for the Avatar of the user "Goobs52" and this is the link of the avatar

Code:
<img alt src="modules/Forums/images/avatars/20074345524c6a13cb77bbe.gif"


so you do need to change the piece of code above from

Code:
<img alt src=\"modules/Forums/images/avatars/$user_avatar\"


to

Code:
<img alt src=\"uploads/website/$user_avatar\" 
 

 
View user's profileSend private messageSend e-mail Reply with quote


texxta
Reputation: 17.5 Add RepSubtract Rep
Local time: 3:13 AM

australia.gif

Noob
Noob

0.02 posts per day
Medals: 0

Joined: Apr 16, 2010
Last Visit: 27 Nov 2011
Posts: 12
Points: 6728 

Post Block-forums_center posters avatar Posted: Wed Aug 18, 2010 9:53 am

Shop Purchases:
Diablo 3 Ultimate Theme · Call of Duty Black Ops Theme · Modern Warfare 3 Theme

FANTASTIC thx heaps Ped u da man

let me know if there is anything i can to for ya

cheers bro
 

 
View user's profileSend private message Reply with quote
Post new topic   Reply to topic  
   www.clanthemes.com Forum Index » Blocks


 
3 Replies / 516 Views
Page 1 of 1
All times are GMT
Display posts from previous:   
 
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 can download files in this forum