Jump to content


Avatar in welcomepanel


  • You cannot reply to this topic
36 replies to this topic

#21 RisingPhoenix

    Advanced Member

  • Administrators[Admin]
  • PipPipPip
  • 249 posts
  • Gender:Male
  • Location:Fort Benning, GA
  • Interests:I am currently in the US Army. I am not a coder. I am really familiar with Unreal Portal and IPB. So if it isn't in reference to something I have on my site ba4life.com then there isn't much I can do to help you.<br /><br />I am a normal user like most of you. Please don't invade my personal life by asking me questions that can already be found on this website.

Posted 01 September 2006 - 07:03 PM

Use the last widescreen post.

you can edit it by going to admin cp>Look & Feel>Edit Template HTML>skin uportal

And on the right you should see

WelcomePanel

Replace all that code w/ the code from widescreen's post above.

Save template and then it should work!
Posted Image
MultiGaming Clan Playing Games since 1997

#22 ShootMePls

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 02 September 2006 - 12:07 AM

Hi, I did what you said Phoenix but no avatar showed up after I saved the template bit and refreshed the site so I put back my original code for now which is:

<tr>
				 <td class='row1' colspan='2'>
					 <table width="100%" border="0" cellspacing="1" cellpadding="4">
		<tr> 
<td class="row1" width="50%">{ipb.lang['it_is_now']} {$data['time']}.<br/>
{ipb.lang['last_visited']} {$data['lastv']}.<br/>
{ipb.lang['there_has_been']} {$data['posts_since']} {ipb.lang['posts_in']} {$data['topics_since']}<br/>
{ipb.lang['topics_since_last_visit']}<br/>
<a href="{ipb.script_url}act=Search&amp;CODE=getnew">{ipb.lang['view_newposts']}</a></td>
<td class="row1" width="50%">{ipb.lang['forum_stats']}<br/>
{ipb.lang['mem_count']} {$data['stats']['MEM_COUNT']}, {ipb.lang['total_topics']} {$data['stats']['TOTAL_TOPICS']}<br/>
{ipb.lang['total_replies']} {$data['stats']['TOTAL_REPLIES']}, {ipb.lang['total_posts']} {$data['stats']['TOTAL_POSTS']}<br/>
{ipb.lang['newest_member']} <a href="{ipb.script_url}showuser={$data['stats']['LAST_MEM_ID']}">{$data['stats']['LAST_MEM_NAME']}</a><br/>
{ipb.lang['top_thread_starter']} <a href="{ipb.script_url}showuser={$data['tt_id']}">{$data['tt_name']}</a> ({$data['tt_num']})<br/>
{ipb.lang['top_poster']} <a href="{ipb.script_url}showuser={$data['tp_id']}">{$data['tp_name']}</a> ({$data['tp_num']})<br/></td>
		</tr>
	  </table>
					 </td>
			   </tr>


#23 RisingPhoenix

    Advanced Member

  • Administrators[Admin]
  • PipPipPip
  • 249 posts
  • Gender:Male
  • Location:Fort Benning, GA
  • Interests:I am currently in the US Army. I am not a coder. I am really familiar with Unreal Portal and IPB. So if it isn't in reference to something I have on my site ba4life.com then there isn't much I can do to help you.<br /><br />I am a normal user like most of you. Please don't invade my personal life by asking me questions that can already be found on this website.

Posted 02 September 2006 - 06:37 AM

Sorry I left out this part

In ./sources/action_public/uportal.php
Find:


 $data['avatar'] = $this->ipsclass->get_avatar( $member['avatar'], 1,
				$member['avatar_size'] );


Replace with:
				//**** Start Avatar Fix ****//
				$avatar_query = $this->ipsclass->DB->query("SELECT * FROM ibf_member_extra WHERE id = " . $this->ipsclass->member['id']);
				$avatar = $this->ipsclass->DB->fetch_row($avatar_query);
				$data['avatar'] = $this->ipsclass->get_avatar( $avatar['avatar_location'], 1, $avatar['avatar_size'], $avatar['avatar_type']);
				//**** End Avatar Fix ****//

Posted Image
MultiGaming Clan Playing Games since 1997

#24 ShootMePls

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 03 September 2006 - 05:27 PM

Thank You once again RisingPhoenix, that has worked nicely! :)

#25 highlander

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts

Posted 24 September 2006 - 12:40 AM

what i would like to know is... i get an error when people are not logged in and the welcome panel is active... anyone have af ix for this?

#26 RisingPhoenix

    Advanced Member

  • Administrators[Admin]
  • PipPipPip
  • 249 posts
  • Gender:Male
  • Location:Fort Benning, GA
  • Interests:I am currently in the US Army. I am not a coder. I am really familiar with Unreal Portal and IPB. So if it isn't in reference to something I have on my site ba4life.com then there isn't much I can do to help you.<br /><br />I am a normal user like most of you. Please don't invade my personal life by asking me questions that can already be found on this website.

Posted 24 September 2006 - 08:10 AM

View Posthighlander, on Sep 24 2006, 03:40 AM, said:

what i would like to know is... i get an error when people are not logged in and the welcome panel is active... anyone have af ix for this?

NO, because it works. Recheck your edits. When People aren't logged in it turns into a login block. It is possible your error is elsewhere.

What version of IPB are you running?
Posted Image
MultiGaming Clan Playing Games since 1997

#27 highlander

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts

Posted 24 September 2006 - 05:43 PM

the error was inside uportal.php and i fixed it with an edit that is on invsionize

$today = mktime (0,0,0,date("m"),date("d"),date("Y"));


that is the corrected line and that is the correct format... now i wonder, yes it converts into a login box, but how to edit that box when its in login form???

#28 WhosBlazin

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 18 November 2006 - 08:17 PM

I downloaded this and installed it but ./sources/action_public/uportal.php doesn't exist its now just portal.php and I can't find the lines to edit anywhere..I really want to have the avatar displayed.

#29 WhosBlazin

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 21 November 2006 - 06:15 AM

Does anybody have a solution to this???!!

#30 LASTWARRIOR

    Member

  • Members
  • PipPip
  • 16 posts

Posted 21 November 2006 - 08:43 AM

You need to recache your templates from the ACP in order for skin_uportal.php to show up. B)

#31 WhosBlazin

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 21 November 2006 - 05:25 PM

Thanks...

#32 il saggio

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 12 December 2007 - 12:31 PM

don't work with Unreal_Portal_2.2.0_v4_For_IPB_2.(2-3).x ?

#33 Majestro

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 04 January 2008 - 09:59 AM

View Postil saggio, on Dec 12 2007, 10:31 PM, said:

don't work with Unreal_Portal_2.2.0_v4_For_IPB_2.(2-3).x ?


it works or not ?

#34 Suzanne

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 05 January 2009 - 03:02 AM

hey hambil thanks for the code.. now i can fix it..

#35 Steve

    Advanced Member

  • Administrators[Admin]
  • PipPipPip
  • 130 posts
  • Gender:Male

Posted 05 January 2009 - 07:48 AM

View PostSuzanne, on Jan 5 2009, 05:02 AM, said:

hey hambil thanks for the code.. now i can fix it..


I have a modified version for a navigation menu, not the welcome panel if interested. I adapted code from another post.

#36 il saggio

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 19 January 2009 - 12:10 PM

this block work fine in ipb 2.3.6

<?php

if ($this->ipsclass->member['id'])
{
// for members
$welcometext ="<table cellpadding='0' cellspacing='0' border='0' width='100%' align='center'><tr><td align='center'>";

// avatar (1st row)
$welcomequery1 = $this->ipsclass->DB->query("SELECT * FROM ibf_member_extra WHERE id = " . $this->ipsclass->member['id']);
$avatar = $this->ipsclass->DB->fetch_row($welcomequery1);
$data['avatar'] = $this->ipsclass->get_avatar($avatar['avatar_location'], 1,$avatar['avatar_size'], $avatar['avatar_type']);
$welcometext .= $data['avatar'];
$welcometext .="</td></tr>";
$welcometext .="<tr>";
// Member text (2nd row)
$welcometext .="<td align='left'>";
$welcometext .= "Bentornato <font color=#FF3333><strong>{$this->ipsclass->member['members_display_name']}</strong></font><br>";

$welcomedate= $this->ipsclass->get_date($this->ipsclass->member['last_visit'], LONG);
$welcometext .= "Sei stato qui {$welcomedate}<br>";

$welcomequery2 = $this->ipsclass->DB->query("SELECT COUNT(DISTINCT(t.tid)) as tcnt, COUNT(DISTINCT(p.pid)) as pcnt FROM ibf_posts p, ibf_topics t WHERE p.post_date < ".time()." AND p.post_date > ".$this->ipsclass->member['last_visit']." AND p.topic_id=t.tid");
$row = $this->ipsclass->DB->fetch_row($welcomequery2);
$data['topics_since']	= $row[tcnt];
$data['posts_since']	= $row[pcnt];

$welcometext .= "Ci sono {$data['topics_since']} risposte in {$data['posts_since']} topic dalla tua ultima visita!<br>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=Search&CODE=getnew\">{$this->ipsclass->lang['view_new_posts']}</a><br>";

$welcometext .="</td></tr></table>";
}
// for guests
else
{
// first row
$welcometext ="<table cellpadding='0' cellspacing='0' border='0' width='100%' align='center'><tr><td align='center'>";

$welcometext .="<img src=\"style_images/defcon/noavatar.gif\" alt=\"Non sei iscritto\"  border=0 />";

$welcometext .="</td></tr>";
// second row
$welcometext .="<tr><td>";
$welcometext .="Benvenuto visitatore!<br>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=Search&CODE=getactive\">Vedi i post di oggi.</a><br>";
$welcometext .="</td>";
// third row
$welcometext .="<tr>";
$welcometext .="<td align='left'>";
$welcometext .="<form action=\"{$this->ipsclass->base_url}act=Login&CODE=01\" method=\"post\" name=\"LOGIN\" onsubmit=\"return ValidateForm()\">
<input type=\"hidden\" name=\"CookieDate\" value=\"1\" checked=\"checked\" />
<table width=\"30%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td>Username:</td>
<td><input type=\"text\" size=\"15\" maxlength='100' value=\"\" name=\"UserName\" class=\"forminput\" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type=\"password\" size=\"15\" name=\"PassWord\" class=\"forminput\" /></td>
</tr>
<tr>
<td><input class=\"button\" type=\"submit\" name=\"submit\" value=\"Login\" /></td>
</tr>
</table>
</form>";
$welcometext .="</td></tr></tr></table>";
}

echo "$welcometext";
?>

in italian :)

#37 Steve

    Advanced Member

  • Administrators[Admin]
  • PipPipPip
  • 130 posts
  • Gender:Male

Posted 19 January 2009 - 02:20 PM

This is the modified code that I use as the navigation block.

																				  <?php
$referer = base64_encode($_SERVER["HTTP_REFERER"]);
$thispage = base64_encode($_SERVER["REQUEST_URI"]);
$id = "230604";
$time = time();

if ($this->ipsclass->member['id'])
{
// for members

// avatar 
$welcomequery1 = $this->ipsclass->DB->query("SELECT * FROM ibf_member_extra WHERE id = " . $this->ipsclass->member['id']);
$avatar = $this->ipsclass->DB->fetch_row($welcomequery1);
$data['avatar'] = $this->ipsclass->get_avatar($avatar['avatar_location'], 1,$avatar['avatar_size'], $avatar['avatar_type']);
$welcometext .= "<center>";
$welcometext .= $data['avatar'];
$welcometext .="<br>";

// Member text
$welcometext .= "Welcome Back {$this->ipsclass->member['members_display_name']}<br>";
$welcometext .="</center><br>";
$welcomedate= $this->ipsclass->get_date($this->ipsclass->member['last_visit'], LONG);
//$welcometext .= "You last visited {$welcomedate}<br>";
$welcomequery2 = $this->ipsclass->DB->query("SELECT COUNT(DISTINCT(t.tid)) as tcnt, COUNT(DISTINCT(p.pid)) as pcnt FROM ibf_posts p, ibf_topics t WHERE p.post_date < ".time()." AND p.post_date > ".$this->ipsclass->member['last_visit']." AND p.topic_id=t.tid");
$row = $this->ipsclass->DB->fetch_row($welcomequery2);
$data['topics_since']	= $row[tcnt];
$data['posts_since']	= $row[pcnt];

// Print Out
//$welcometext .= "There has been {$data['topics_since']} posts in {$data['posts_since']} topics since your last visit!<br>";
$welcometext .= "<hr><br>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=Search&CODE=getnew\">{$this->ipsclass->lang['view_new_posts']}</a><br>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=idx\">Forums</a><br/>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=search\">Search</a><br/>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=members\">Member List</a><br/>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=boardrules\">Board Rules</a><br/>";
$welcometext .= "<a href=\"{$this->ipsclass->base_url}act=help\">Help</a><br/>";

$welcometext .="</td></tr>";
}



// for guests
else
{
// first column
$welcometext ="<table cellpadding='0' cellspacing='0' border='0' width='100%' align='center'><tr><td align='left'>";
// $welcometext .="Welcome Guest!<br>";
// $welcometext .= "<a href=\"{$this->ipsclass->base_url}act=Search&CODE=getactive\">View all of todays active posts.</a><br>";
 $welcometext .="</td>";
// second column
$welcometext .="<td align='left'>";
$welcometext .="<form action=\"{$this->ipsclass->base_url}act=Login&CODE=01\" method=\"post\" name=\"LOGIN\" onsubmit=\"return ValidateForm()\">
<input type=\"hidden\" name=\"CookieDate\" value=\"1\" checked=\"checked\" />
<table width=\"50%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td>Username:</td>
<td><input type=\"text\" size=\"15\" maxlength='150' value=\"\" name=\"UserName\" class=\"forminput\" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type=\"password\" size=\"15\" name=\"PassWord\" class=\"forminput\" /></td>
</tr>
<tr>
<td><input class=\"button\" type=\"submit\" name=\"submit\" value=\"Login\" /></td>
</tr>
</table>
</form>";
$welcometext .="<a href=\"{$this->ipsclass->base_url}act=Reg&CODE=00\">Register</a>";
$welcometext .="</td></tr></table>";
}

// Prints
echo $welcometext


?>






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users