News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Member Color Link

Started by Nibogo, April 02, 2005, 06:32:51 AM

Previous topic - Next topic

ディン1031

@UnclEo: Is this happen after the custom change? (Because i could never test if this have problems with other thing...) ;). If you change it back to normal will it work?

@J-Rad14: No, currently i've not much time...
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

UnclEo


ที่นี่! DexMore.Com ลมหายใจแห่ง SMF เราอัพเดททุกลมหายใจ SMF 100++ mod แห่งเดียวในโลก SMF 2.0 แปลไทย 100%

apadong.net

dear, i found a little mistakes in this mod.

when i'm setting up in the options menu (see the attachment), there's no change at all.

but, then i try to edit 2 file (Calendar.template.php & BoardIndex.template.php) i see the changes.

i replace this code:
<span style="color:'.$member['color'].';">') : '>

with this one:
<span style="color:'.$modSettings['MemberColorBirthdayColor'].';">


position in Calendar.template.php:
                    /* Each of the birthdays has:
                        id, name (person), age (if they have one set?), and is_last. (last in list?) */
                    foreach ($day['birthdays'] as $member)
                        echo '
                        <a href="', $scripturl, '?action=profile;u=', $member['id'], '"'. (!empty($member['color']) ? (empty($modSettings['MemberColorLinkOldSpanStyle']) ? ' style="color:'.$member['color'].'">' : '><span style="color:'.$modSettings['MemberColorBirthdayColor'].';">') : '>'), $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', (!empty($member['color']) && !empty($modSettings['MemberColorLinkOldSpanStyle']) ? '</span>' : ''), '</a>', $member['is_last'] ? '' : ', ';
                    echo '
                    </div>';
                }



position in BoardIndex.template.php:
        /* Each member in calendar_birthdays has:
                id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
        foreach ($context['calendar_birthdays'] as $member)
                echo '
                            ', ($member['is_today'] ? '<b>' : ''), '<a href="', $scripturl, '?action=profile;u=', $member['id'], '"'. (!empty($member['color']) ? (empty($modSettings['MemberColorLinkOldSpanStyle']) ? ' style="color:'.$member['color'].'">' : '><span style="color:'.$modSettings['MemberColorBirthdayColor'].';">') : '>'), $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', (!empty($member['color']) && !empty($modSettings['MemberColorLinkOldSpanStyle']) ? '</span>' : ''), '</a>', ($member['is_today'] ? '</b>' : ''), $member['is_last'] ? '' : ', ';
        }



how do you think?

ディン1031

#743
Hmm in that way you change it it will only work on not set colors...

I hope i understand it you want in the birthdaylist the color change for the day when use have birthday?

May personal thought about the Calendar Page is that i thought if you go to this page you see the day and the the birthdays and i think it's not so important to color them as well in that color ;). But i will look at it.

But i will fix it with an option :).
The first thing is correct (not your code, but the issue) and it should be shown in that color on the user birthday.
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

apadong.net


ghof

I use member color link mod, i have a problem,  on the theme i use, there is a dropdown menu where the person's nick who is replying to a topic, see here : http://www.musikkforum.net/index.php?topic=26.msg1236;topicseen#new

Member color link is working everwhere else it is supposed to do, but since the code is different (because of another layout) i dont know what to do,   the color is default.

here is the code, how do i integrate member color link to this:

//Show information about the poster of this message.
//Show the author name and dropdown menu for the profile, website, email address, and personal message buttons.
if ($settings['show_profile_buttons'])
{
// Don't show the profile button if you're not allowed to view the profile.
if ($message['member']['can_view_profile'] && $context['user']['is_logged'])
echo '
<b><a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '" onclick="return overlay(this, \'', $message['member']['id'], '\',\'bottom\')" onblur="overlayclose(\''. $message['member']['id']. '\'); return false" class="postername">', $message['member']['name'], '</a></b>';
else
{
echo '
<b>', $message['member']['name'], '</b><br />';
}

echo '
<!-- Start Dropdown -->
<div id="', $message['member']['id'], '" style="width: 250px; display:none;" class="drop-down">
<table width="100%" border="0" cellpadding="0" cellspacing="1">';

// Don't show the profile button if you're not allowed to view the profile.
echo '
<tr>
<td class="catbg" height="20" align="left" valign="middle">'. $message['member']['name']. '</td>
</tr>';

if ($message['member']['can_view_profile'] && $context['user']['is_logged'])
{
echo '
<tr>
<td height="20" align="left" valign="middle"><a class="subNav-link" href="', $scripturl, '?action=profile;u=', $message['member']['id'], '">', $txt['view'], ' ', $message['member']['name'], '', $txt['public_profile'], '</a></td>
</tr>';
}

// Don't show these things for guests.
if (!$message['member']['is_guest'])
{
//Don't show a link if they haven't specified a website.
if ($message['member']['website']['url'] != '')
echo '
<tr>
<td height="20" align="left" valign="middle"><a class="subNav-link" href="', $message['member']['website']['url'], '" title="' . $message['member']['website']['title'] . '" target="_blank">', $txt['visit'], ' ', $message['member']['name'], '', $txt['members_website'], '</a></td>
</tr>';

//Don't show the email address if they want it hidden.
if (empty($message['member']['hide_email']))
echo '
<tr>
<td height="20" align="left" valign="middle"><a class="subNav-link" href="mailto:', $message['member']['email'], '">', $txt['send'], ' ', $message['member']['name'], ' ', $txt['an_email'], '</a></td>
</tr>';

// Since we know this person isn't a guest, you *can* message them.
if ($context['can_send_pm'])
echo '
<tr>
<td height="20" align="left" valign="middle"><a class="subNav-link" href="', $scripturl, '?action=pm;sa=send;u=', $message['member']['id'], '">', $txt['send'], ' ', $message['member']['name'], ' ', $txt['private_message'], '</a></td>
                </tr>';
             

//Show the last posts
echo '
<tr>
<td height="20" align="left" valign="middle"><a class="subNav-link" href="', $scripturl, '?action=profile;u=', $message['member']['id'], ';sa=showPosts">', $txt['show'], ' ', $message['member']['name'], '', $txt['last_post'], '</a></td>
</tr>';

//Show more stats for this user
echo '
<tr>
<td height="20" align="left" valign="middle"><a class="subNav-link" href="', $scripturl, '?action=profile;u=', $message['member']['id'], ';sa=statPanel">', $txt['show_genstats'], ' ', $message['member']['name'], '.</a></td>
</tr>';
}

echo '
</table>
</div>
<!-- End Dropdown -->';
}
echo '
<br />';


Thank you for helping

ディン1031

I think this will help



echo '
<b><a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '" onclick="return overlay(this, \'', $message['member']['id'], '\',\'bottom\')" onblur="overlayclose(\''. $message['member']['id']. '\'); return false" class="postername">', $message['member']['name'], '</a></b>';
else
{
echo '
<b>', $message['member']['name'], '</b><br />';
}


replace with


echo '
<b><a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '" onclick="return overlay(this, \'', $message['member']['id'], '\',\'bottom\')" onblur="overlayclose(\''. $message['member']['id']. '\'); return false" class="postername"'. (!empty($message['member']['color']) ? ' style="color:'.$message['member']['color'].';"' : '') .'>', $message['member']['name'], '</a></b>';
else
{
echo '
<b>', !empty($message['member']['colored_name']) ? $message['member']['colored_name'] : $message['member']['name'], '</b><br />';
}


Can not test it so i give no warranty that it work...

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

ghof

#747
yeah..almost...but the right color doesnt show when logged in,  when a guest viewing it, there is no dropdown, and the right color is shown,  but when logged in, the dropdown menu is there, and then the color are going back to basics.

The code needs a little modification, can you help? O:)

Btw...it is supposed to be no dropdown menu for guests..

Paragaya

Geri Döndüm :D...... :)

Tp.Net Turkish Moderator... ;)

ディン1031

Quote from: ghof on February 03, 2009, 05:20:45 AM
yeah..almost...but the right color doesnt show when logged in,  when a guest viewing it, there is no dropdown, and the right color is shown,  but when logged in, the dropdown menu is there, and then the color are going back to basics.

The code needs a little modification, can you help? O:)

Btw...it is supposed to be no dropdown menu for guests..
Oh i made a mistake... (i made this out of my mind without looking at the mod :P)

The replace should look like:


echo '
<b><a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '" onclick="return overlay(this, \'', $message['member']['id'], '\',\'bottom\')" onblur="overlayclose(\''. $message['member']['id']. '\'); return false" class="postername"'. (!empty($message['member']['online_color']) ? ' style="color:'.$message['member']['online_color'].';"' : '') .'>', $message['member']['name'], '</a></b>';
else
{
echo '
<b>', !empty($message['member']['colored_name']) ? $message['member']['colored_name'] : $message['member']['name'], '</b><br />';
}

I change the color to online_color i forgot the i used the term inside the script :X

Bye
DIN1031

Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

ghof

Quote from: ディン1031 on February 03, 2009, 06:46:48 AM
Quote from: ghof on February 03, 2009, 05:20:45 AM
yeah..almost...but the right color doesnt show when logged in,  when a guest viewing it, there is no dropdown, and the right color is shown,  but when logged in, the dropdown menu is there, and then the color are going back to basics.

The code needs a little modification, can you help? O:)

Btw...it is supposed to be no dropdown menu for guests..
Oh i made a mistake... (i made this out of my mind without looking at the mod :P)

The replace should look like:


echo '
<b><a href="', $scripturl, '?action=profile;u=', $message['member']['id'], '" onclick="return overlay(this, \'', $message['member']['id'], '\',\'bottom\')" onblur="overlayclose(\''. $message['member']['id']. '\'); return false" class="postername"'. (!empty($message['member']['online_color']) ? ' style="color:'.$message['member']['online_color'].';"' : '') .'>', $message['member']['name'], '</a></b>';
else
{
echo '
<b>', !empty($message['member']['colored_name']) ? $message['member']['colored_name'] : $message['member']['name'], '</b><br />';
}

I change the color to online_color i forgot the i used the term inside the script :X

Bye
DIN1031



Thank you!, that works,  I also have some other areas that needs to use this mod, i hope i will get help then :-P,   mostly related to Tinyportal.

ghof

Ok, here it comes:

I use tinyportal, and in "recent topics" block the membergroup color isnt showing,The smf's recent topic is working perfectly with correct membergroup color, but as said, not tinyportal.

I think this is the code for the block:
how do i integrate color links with this.

// TPortal recent topics block

function TPortal_recentbox()

{

global $context, $settings, $options, $txt , $modSettings;



    // is it a number?

if(!is_numeric($context['TPortal']['recentboxnum']))

$context['TPortal']['recentboxnum']='10';



// leave out the recycle board, if any

if(isset($modSettings['recycle_board']))

$bb=array($modSettings['recycle_board']);

else

$bb=array();



$what=ssi_recentTopics($num_recent = $context['TPortal']['recentboxnum'], $bb, $output_method = 'array');

// Output the topics

$counter=1; $cmax=count($what);

echo '

<div style="width: 100%; ' , $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , '">';

foreach($what as $w){

echo '

<div class="smalltext"><a href="'.$w['href'].'">'.$w['short_subject'].'</a></div>

<div class="smalltext">', $txt[525], ' <b>', $w['poster']['link'], '</b></div>

<div class="smalltext">';

if(!$w['new'])

echo '<a href="'.$w['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';

else
echo '<a href="'.$w['href'].'"><img border="0" src="'.$settings['images_url'].'/'.$context['user']['language'].'/not_new.gif" alt="new" /></a> ';



echo '['.$w['time'].']

</div>';



if($counter != $cmax)

echo '<hr />';

$counter++;

}

echo '

</div>';

}



I also have this,how to get groupcolor to work?:

$myposterarray = ssi_topPoster(10,'array');

echo'<table width="100%" border="0" cellpadding="2">
  <tr>
    <td align="left" class="middletext"><b>Medlem</b></td>
    <td align="right" class="middletext"><b>Innlegg</b></td>
  </tr>';
foreach ($myposterarray as $member)
{
  echo'
    <tr><td align="left" class="smalltext">'. $member['link'] .'</td>
    <td align="right" class="smalltext">'. $member['posts'] .'</td></tr>';
}

echo'</table>';


AND then it is the Felblog mod that i have, recent blogs block/infocenter,im not so sure if this is the right code/file to modify:

<?php
// ----------------------------------------------------------
// -- FelBlogTPinc.php                                     --
// ----------------------------------------------------------
// -- Version:                0.94.0 for SMF 1.1.x         --
// -- Copyright 2006,2007 by: Korinna "Feline" Brinkmann   --
// -- Support and Updates at: http://feline-networks.com   --
// ----------------------------------------------------------

if (!defined('SMF'))
die('Hacking attempt...');

global 
$context$settings$txt;

if(isset(
$context['FelBlog']) && $context['FelBlog']['loaded'])
{
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="2%" valign="top">
<img src="'
$settings['default_images_url'] .'/felblog/blogstats.gif" alt="" style="padding-right:5px;" />
</td>
<td class="smalltext">
'
$context['FelBlog']['total_blogs'] . ($context['FelBlog']['total_blogs'] == $txt['Felblog_stats-11'] : $txt['Felblog_stats-11']) . $context['FelBlog']['total_entries'] . ($context['FelBlog']['total_entries'] == $txt['Felblog_stats-21'] : $txt['Felblog_stats-2']);

if(isset($context['FelBlog']['recent_blogs']))
{
echo '
<br />'
.$txt['Felblog_recent'].'
</td>
</tr>
<tr>
<td colspan="2" class="smalltext">'
;
foreach($context['FelBlog']['recent_blogs'] as $rcb)
{
echo '
<hr />
<div style="vertical-align: top;">'
$rcb['conthref'] .'</div>
<div style="vertical-align:top;">'
.$txt[525].' '.$rcb['owner'].'</div>
<div style="vertical-align:top;">'
str_replace(array('('')'), array('['']'), $rcb['created']).'</div>';
}
}
echo '
</td>
</tr>
</table>'
;
}
?>




If i could get help with this codes to work with member color link mod i would be very happy  :)

ディン1031

#752
Install the "SSIMemberColorLink105.zip" attached to the first post. It will add to the SSI inserts the colors and so it will be work on the most tiny portal blocks.

I don't know how the felblock work, so i can not tell how i should insert there colors. I think it's better to ask the fel blog creator.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

ghof

Quote from: ディン1031 on February 03, 2009, 08:35:26 AM
Install the "SSIMemberColorLink105.zip" attached to the first post. It will add to the SSI inserts the colors and so it will be work on the most tiny portal blocks.

I don't know how the felblock work, so i can not tell how i should insert there colors. I think it's better to ask the fel blog creator.

Bye
DIN1031

Again, Thank you, All works now  :D well, not the felblog, but i will try figure it out.

ghof

No, it is something wrong, after installing "SSIMemberColorLink105.zip"

i get this(screenshots included)


meehan09

Hi,

when i try to install any off thease mod packages into the admin panel iam getting this error!

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Iam using SMF 1.1.7
www.Exoticforums.co.uk

Id be greatfull if you could get back to me as soon as possible.

Thanks

ディン1031

Quote from: ghof on February 03, 2009, 10:01:46 AM
No, it is something wrong, after installing "SSIMemberColorLink105.zip"

i get this(screenshots included)
Hmmm again this error, i would suggest you should deinstall the SSIMemberColorLink... i will try it together with the tinyportal, possible i need to find a diffrent way to change the colors there...

The second error you've is this also happen if you not install the SSIMemberColorLink?

Quote from: meehan09 on February 03, 2009, 10:42:46 AM
Hi,

when i try to install any off thease mod packages into the admin panel iam getting this error!

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Iam using SMF 1.1.7
www.Exoticforums.co.uk

Id be greatfull if you could get back to me as soon as possible.

Thanks
Download it and upload it again.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

ghof

QuoteHmmm again this error, i would suggest you should deinstall the SSIMemberColorLink... i will try it together with the tinyportal, possible i need to find a diffrent way to change the colors there...

The second error you've is this also happen if you not install the SSIMemberColorLink?

Im not even sure this is that packages's fault, i replaced SSI.php with the backup before, and the error is still there ::)

Do you have any idea whats wrong?

ディン1031

#758
Okay than i think this is related to other bug that someone mentioned... okay i will see... if i can narrow it down...

Today it's late i will try it tomorrow, than i will see if i can find the bug and why it happen on the send topic.
And i will try it with the tinyportal, too and the SSI Colors :).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

ディン1031

#759
Quote from: ghof on February 04, 2009, 06:22:56 AM
QuoteHmmm again this error, i would suggest you should deinstall the SSIMemberColorLink... i will try it together with the tinyportal, possible i need to find a diffrent way to change the colors there...

The second error you've is this also happen if you not install the SSIMemberColorLink?

Im not even sure this is that packages's fault, i replaced SSI.php with the backup before, and the error is still there ::)

Do you have any idea whats wrong?
Which SMF Version are you using?
Because i tried it know and i can not resolve this bug...

And it's not related to the SSI add on... i think it has something to do with the nickname... could you change the nick and test it again?

Or is it possible that you make this change -> http://www.simplemachines.org/community/index.php?action=post;msg=1896987;topic=32101.720

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Advertisement: