Jump to content
DevFuse Forums

(iNV23) Portal System v3.0.4


Lubu

Recommended Posts

on the portal it shows Top Posters,Latest Topic Replies,Welcome back Lubu,Pinned:

 

anything that shows a username of any members i would like it to show the color from this mod (T23) Individual Username Format 1.2.1

 

he told me this is the code you need to add to make it work but he told me to ask u to do it since he has not idea how u made ur mod

 

[quote name='terabyte' date='09 June 2009 - 05:53 PM' post='12642']
Open sources/components_public/shoutbox/lib/lib_shoutbox.php and find:
[code]$this->ipsclass->make_name_formatted( $r['members_display_name'], $r['mgroup'] )

Replace With:

$this->ipsclass->t23_iuf_render($r, $r['members_display_name'])

Then find:

'add_join' => array( 0 => array('select' => 'm.id, m.mgroup, m.members_display_name',

Replace With:

'add_join' => array( 0 => array('select' => 'm.id, m.mgroup, m.members_display_name, m.t23_iuf_use, m.t23_iuf_color, m.t23_iuf_background, m.t23_iuf_border, m.t23_iuf_bold, m.t23_iuf_italic',

[/code]

 

this is for the shout box but he said its the same for anything that shows a user name

 

 

oh and where it say welcome back and it says my user name and e-mail and my member group why anit the member group showing up as the member group color

 

heres a pic of what im talkin about

 

samplebaz.jpg

Link to comment
Share on other sites

  • Management

Ok open sources/components_public/portal.php

 

latest_replies function

 

Find:

t.tid,t.title,t.last_poster_name,t.last_post

 

Add After:

,t.last_poster_id,m.id, m.mgroup, m.members_display_name, m.t23_iuf_use, m.t23_iuf_color, m.t23_iuf_background, m.t23_iuf_border, m.t23_iuf_bold, m.t23_iuf_italic

 

Find:

LEFT JOIN ibf_forums f ON (f.id=t.forum_id)

 

Add Below:

LEFT JOIN ibf_members m ON (m.id=t.last_poster_id)

 

Find:

$row['date'] = $this->ipsclass->get_date($row['last_post'], "SHORT");

 

Add ABOVE:

$row['last_poster_name'] = $this->ipsclass->t23_iuf_render($row, $row['last_poster_name']);

 

show_member_panel function

 

Find:

$output = $this->ipsclass->compiled_templates['skin_bfportal']->show_member_panel_html($this->ipsclass->member, $show);

 

Add ABOVE:

			$member_extra = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'm.id, m.mgroup, m.members_display_name, m.t23_iuf_use, m.t23_iuf_color, m.t23_iuf_background, m.t23_iuf_border, m.t23_iuf_bold, m.t23_iuf_italic', 'from'   => 'members m', 'where'  => "id=".$this->ipsclass->member['id'],  'limit'  => array( 0, 1 ) ) );
			   $this->ipsclass->member['username'] = "<a href='{$this->ipsclass->base_url}showuser={$this->ipsclass->member['id']}'>".$this->ipsclass->t23_iuf_render($member_extra, $member_extra['members_display_name'])."</a>";

 

top_posters function

 

Find:

members_display_name as name,id,posts

 

Add After:

, mgroup, t23_iuf_use, t23_iuf_color, t23_iuf_background, t23_iuf_border, t23_iuf_bold, t23_iuf_italic

 

Find (all instances):

{$ohboy['name']}

 

Replace With:

".$this->ipsclass->t23_iuf_render($ohboy, $ohboy['name'])."

 

Save sources/components_public/portal.php

Link to comment
Share on other sites

if u look at my site www.d2tc.com and look at the middle news i have the green box color effect it worked but when another user posts in that topic it gives him my color name effect even when he doesnt have a color effect plus the top 20 posters didnt get color i think u forgot that one

Link to comment
Share on other sites

  • Management
if u look at my site www.d2tc.com and look at the middle news i have the green box color effect it worked but when another user posts in that topic it gives him my color name effect even when he doesnt have a color effect plus the top 20 posters didnt get color i think u forgot that one

 

Did you follow all the edits, the top posters functions was included. I've updated the top posters edit to be more clear, try them again.

Link to comment
Share on other sites

  • Management
i did noticed that 2 edits u posted there way 2 of them want me to edit those as well

 

Find (all instances):

{$ohboy['name']}

Replace With:

".$this->ipsclass->t23_iuf_render($ohboy, $ohboy['name'])."

Link to comment
Share on other sites

i did all the edits but the Top Posters dont show color and when even i make a topic and it shows on the portal it shows my name in color but if someone esle post in the topic it makes the name have my color to take a look

 

 

Last post made by: Lubu on Mar 31 2009, 01:41 PM

 

 

then say soemone esle posts

 

Last post made by: strowl on Jun 10 2009, 10:09 PM see there name in same topic it will give them my color

 

 

all of it works but those 2 things

Link to comment
Share on other sites

  • Management
i did all the edits but the Top Posters dont show color and when even i make a topic and it shows on the portal it shows my name in color but if someone esle post in the topic it makes the name have my color to take a look

 

 

Last post made by: Lubu on Mar 31 2009, 01:41 PM

 

 

then say soemone esle posts

 

Last post made by: strowl on Jun 10 2009, 10:09 PM see there name in same topic it will give them my color

 

 

all of it works but those 2 things

 

Send me your sources/components_public/profile.php file. I'll take a look.

Link to comment
Share on other sites

just goto my site and look www.d2tc.com and i found a problem in the donor tracker when we added color on the portal page when i look at this

 

Top 20 Donors

1st love

2nd TrusT-Fenix

3rd Calypso

4th Kimo

5th Strowl

6th Lucifer

 

and i click anyone of these names it brings me to my profile and not theres

 

this only happens on the portal top 20 if i goto the donate section that shows it works fine

 

 

if u look at the pic i posted in this post u will see those members are getting my color off my name and they dont have color names

Link to comment
Share on other sites

I've been unable to replicate this problem on my test board, will need to test it on your board.

what he is saying Lubu is that he needs ftp/acp access to your site because he can't get the mod to do what it's doing on his test site like it is on your site so he needs to have access to yours to find the problems and fix em, just going on your site and looking at it with no access to the acp/ftp will not help him find the problem any more than looking at the screen shots did.

Link to comment
Share on other sites

  • Management

Top posters area should be fixed. The news feed was more of a problem. Problem is the sql query to pull the latest topics in 1 go won't feed the t23_iuf_render function the unique style variables (t23_iuf_color,t23_iuf_background, t23_iuf_border) for both the topic author and last poster. You'll most likely need to assign a different name for the t23_iuf_color,t23_iuf_background, t23_iuf_border etc.. fields and feed it to another function.

 

Terabyte would have the most experience with his own mod, maybe he might have some ideas, could be a simpler solution available. I won't be able to do this for a few weeks until I have some spare time.

Link to comment
Share on other sites

  • 2 weeks later...

hmm it was working fine one day and now it still shows a member taking my name color in the news feeds thats one problem u said u look into it when u had time i still have time u dont have to do it unless u got time or feel like it :-)

Link to comment
Share on other sites

  • Management

Issue resolved, here are the file edits if needed.

 

process_news_feed function

 

Open sources/components_public/portal.php

 

Find (both instances):

t.*,p.*,m.mgroup,me.avatar_location, m.view_avs, me.avatar_size

 

Replace With:

t.*,p.*,m.mgroup as author_mgroup, ms.mgroup as last_poster_mgroup,me.avatar_location, m.view_avs, me.avatar_size, m.t23_iuf_use, m.t23_iuf_color, m.t23_iuf_background, m.t23_iuf_border, m.t23_iuf_bold, m.t23_iuf_italic, ms.t23_iuf_use as t23_iuf_use2, ms.t23_iuf_color as t23_iuf_color2, ms.t23_iuf_background as t23_iuf_background2, ms.t23_iuf_border as t23_iuf_border2, ms.t23_iuf_bold as t23_iuf_bold2, ms.t23_iuf_italic as t23_iuf_italic2

 

Find (both instances):

LEFT JOIN ibf_members m ON (p.author_id=m.id)

 

Add BELOW:

LEFT JOIN ibf_members ms ON (t.last_poster_id=ms.id)

 

Find:

$final .= $this->ipsclass->compiled_templates['skin_bfportal']->news_feed_html($row,$show,$avatar);

 

Add ABOVE:

			$row['author_name'] = $this->ipsclass->t23_iuf_render($row, $row['author_name'], $row['author_mgroup']);
		$row['last_poster_name'] = $this->ipsclass->t23_iuf_render2($row, $row['last_poster_name'], $row['last_poster_mgroup']);

 

Save sources/components_public/portal.php

 

Open sources/ipsclass.php

 

Find:

		return $prefix.$name.$suffix;
}

Add Below:

	function t23_iuf_render2($m, $name="", $group=0)
{
	if ( !intval($group) )
	{
		$group = $m['mgroup'];
	}

	if ( $this->cache['group_cache'][$group]['g_t23_iuf_enable'] && $m['t23_iuf_use2']>0 )
	{
		$t23_iuf = "";

		if ( $this->cache['group_cache'][$group]['g_t23_iuf_color'] && strlen($m['t23_iuf_color2']) )
		{
			$t23_iuf .= "color:#".$m['t23_iuf_color2']."; ";
		}

		if ( $this->cache['group_cache'][$group]['g_t23_iuf_background'] && strlen($m['t23_iuf_background2']) )
		{
			$t23_iuf .= "background-color:#".$m['t23_iuf_background2']."; ";
		}

		if ( $this->cache['group_cache'][$group]['g_t23_iuf_border']  && strlen($m['t23_iuf_border2']))
		{
			$t23_iuf .= "border: 1px solid #".$m['t23_iuf_border2']."; ";
		}

		if ( $this->cache['group_cache'][$group]['g_t23_iuf_bold'] && $m['t23_iuf_bold2'] )
		{
			$t23_iuf .= "font-weight:bold; ";
		}

		if ( $this->cache['group_cache'][$group]['g_t23_iuf_italic'] && $m['t23_iuf_italic2'] )
		{
			$t23_iuf .= "font-style:italic;";
		}

		if ( strlen($t23_iuf) )
		{
			return "<span style='$t23_iuf'>{$name}</span>";
		}
		else
		{
			return $name;
		}
	}
	else
	{
		return $name;
	}
}

 

Save sources/ipsclass.php

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • Create New...