Member Color Link

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

Previous topic - Next topic

ディン1031

Quote from: AlenNS on September 18, 2009, 05:45:27 AM
I don't understand what is happening.
Every other mod works fine.

I've downloaded MemberColorLink307PostgreFix.zip from here http://custom.simplemachines.org/mods/index.php?mod=111 and when I upload it and apply modification it says there are errors:

In my MessageIndex.php Source file there isn't any line similiar to this:

  //First the Thread Owner Link

Sould be replaced with:

  if (empty($context['topics'][$topicid_memcolor]))
                   continue;
          //First the Thread Owner Link 


I've attached MessageIndex.php and Load.php and there are no lines that this mod should edit.
Where did stand this? :)
I don't find this replacement you mention oO.
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

AlenNS

I've downloaded this file - http://custom.simplemachines.org/mods/index.php?action=download;mod=111;id=113001
Then uploaded and apply. After that I got errors, that mod cannot find any of that lines.

But I don't understand this: o0

When I parse mod on SMF site it changes lots of files, but when I upload mod and apply it it changes only

/Sources/MessageIndex.php
/Sources/Load.php

Why's that? o0

Sabre™

Quote from: AlenNS on September 18, 2009, 05:45:27 AM
In my MessageIndex.php Source file there isn't any line similiar to this:

  //First the Thread Owner Link

Sould be replaced with:

  if (empty($context['topics'][$topicid_memcolor]))
                   continue;
          //First the Thread Owner Link 

That is part or the replace code, not the code you're supposed to replace

You look for
determineTopicClass($context['topics'][$row['id_topic']]);
}
$smcFunc['db_free_result']($result);


and replace it with
determineTopicClass($context['topics'][$row['id_topic']]);
}
$smcFunc['db_free_result']($result);

//Now let's replace the orginal link to the Color Link ;)
if (!empty($context['MemberColor_ID_MEMBER'])) {
$colorDatas = load_onlineColors($context['MemberColor_ID_MEMBER']);
//You are not know what you do ;P Colors allready loaded :D
if(!empty($modSettings['MemberColorModeratorLinks']) && !empty($context['boards'])) {
//Okay now... do a heavy serach for moderators... only jokeing... but you know... it look so ugly ;)
$onlineColor = load_mod_color(true);
foreach($context['boards'] as $ID_BOARD => $boardid_memcolor) {
//Reset it :D
$context['boards'][$ID_BOARD]['link_moderators'] = array();
global $color_profile;
foreach($context['boards'][$ID_BOARD]['moderators'] as $moderators) {
$cmemcolid = $moderators['id'];
//Replace "Profil of" with "Moderator" ;D
$link = str_replace($txt['profile_of'], $txt['board_moderator'], $colorDatas[$cmemcolid]['colored_link']);
if(empty($colorDatas[$cmemcolid]['online_color']) && !empty($onlineColor))
$link = '<a href="' . $scripturl . '?action=profile;u=' . $color_profile[$cmemcolid]['id_member'] . '" title="' . $txt['board_moderator'] . ' ' . $color_profile[$cmemcolid]['real_name'] . '"'.(!empty($modSettings['MemberColorLinkOldSpanStyle']) ? '><span style="color:'.$onlineColor.';">' : ' style="color:'.$onlineColor.';">') . $color_profile[$cmemcolid]['real_name'] . (!empty($modSettings['MemberColorLinkOldSpanStyle']) ? '</span>' : '').'</a>';
//Standard Color ;)
$context['boards'][$ID_BOARD]['moderators'][$cmemcolid]['link'] = $link;
//Creat the new list...
$context['boards'][$ID_BOARD]['link_moderators'][] = $link;
}
}
}

//Need the Childs some Colors XD
if (!empty($modSettings['MemberColorThreadChild']) && !empty($context['boards'])) {
foreach($context['boards'] as $ID_BOARD => $boardid_memcolor) {
if(empty($context['boards'][$ID_BOARD]['last_post']['member']['id']))
continue;
//My Childs need a Member Color ;)
$cmemcolid = $context['boards'][$ID_BOARD]['last_post']['member']['id'];
if(!empty($colorDatas[$cmemcolid]['colored_link']))
$context['boards'][$ID_BOARD]['last_post']['member']['link'] = $colorDatas[$cmemcolid]['colored_link'];
}
}
//The Owner or the Last Post of the thread
if (!empty($modSettings['MemberColorThreadOwner']) || !empty($modSettings['MemberColorThreadLastPost'])) {
foreach($topic_ids as $topicid_memcolor) {
if (empty($context['topics'][$topicid_memcolor]))
continue;
//First the Thread Owner Link
if (!empty($modSettings['MemberColorThreadOwner'])) {
$cmemcolid = $context['topics'][$topicid_memcolor]['first_post']['member']['id'];
if(!empty($colorDatas[$cmemcolid]['colored_link']))
$context['topics'][$topicid_memcolor]['first_post']['member']['link'] = $colorDatas[$cmemcolid]['colored_link'];
}
//Or the Last Post Link ;)
if (!empty($modSettings['MemberColorThreadLastPost'])) {
$cmemcolid = $context['topics'][$topicid_memcolor]['last_post']['member']['id'];
if(!empty($colorDatas[$cmemcolid]['colored_link']))
$context['topics'][$topicid_memcolor]['last_post']['member']['link'] = $colorDatas[$cmemcolid]['colored_link'];
}
}
}
}


The code you mentioned is in the above replace code

Quote from: AlenNS on September 22, 2009, 07:06:34 AM
...After that I got errors, that mod cannot find any of that lines.

Strange, I just looked over your messageindex.php and all is fine in it.
Maybe a manual install for those templates are in order
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


AlenNS

That's what I don't understand. How's that possible that package on site parse fine and when I upload it on my forum it tries something else?
Is there any other file that I could use?
Maybe author of this mod has one?

ディン1031

I've tested it yesterday on a fresh installed smf... and it work oO.
On SMF 1.1.10 and SMF 2 RC 1.2 both version install fine...

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

chinaren

Hi.   Added this mod (wooo, that was a job), and it works fine, but now I get a load of errors in the log such as:


Quote8: Undefined index: name_style
File: /blahblahblah/smf/Sources/Load.php
Line: 1157

and

Quote8: Undefined variable: request2
File: /blahblahblah/smf/Sources/Load.php
Line: 991

Like I said, it's only a niggle, but annoying.  Can you tell me what to do to define this, or fix it? 

Merci.  :D
The Opus Path - The Next Generation of the Written Word

ディン1031

Nothing that come from my mod, i don't use any variable names oO. Even my array item names are diffrent.

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

AlenNS

Whatever I do with your mod I get errors.
I have upload via Package manager and I get errors.
Then I've deleted and upload via FTP and it shows that package is old!?

I don't understand anything... o0

chinaren

Quote from: ディン1031 on September 29, 2009, 06:36:09 AM
Nothing that come from my mod, i don't use any variable names oO. Even my array item names are diffrent.

Bye
DIN1031

Oh, sorry.  My bad then.
The Opus Path - The Next Generation of the Written Word

ディン1031

Quote from: AlenNS on September 29, 2009, 06:44:15 AM
Whatever I do with your mod I get errors.
I have upload via Package manager and I get errors.
Then I've deleted and upload via FTP and it shows that package is old!?

I don't understand anything... o0
Hmm? Which Version did you use? :X
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

Hmmm what kind of errors did you get? :X
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

Quote from: AlenNS on October 06, 2009, 10:01:00 AM
Quote from: ディン1031 on October 06, 2009, 12:20:41 AM
Hmmm what kind of errors did you get? :X
It's all in this message... http://www.simplemachines.org/community/index.php?topic=32101.msg2270743#msg2270743
I can not read what stand on the image :). I can only a assume you have installed other mod which make it nor possible to install this mod :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

AlenNS

This is installed mods on my forum:



And when I try to install your mod I get this:



As you can see on this picture this installation doesn't try to change correct files. I don't know how. And when I cancel installation it says that the mod is outdated. o0


ディン1031

Two questions:

You've allready installed the modification and try to upgrade?
Is this a SMF 2? And you did uninstall the old Version and now you like to install the new versioner?


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

AlenNS

I'm using SMF 2.0 RC1.2
This was clean install and I never installed MCL mod because it is clean install of SMF 2.0 RC1.2. In fact, I've upgraded from RC1 and there was no mods.
First time when I tried to instal MCL mod I got that errors.

I want to install this mod for the first time on new, upgraded forum which never had MCL mod.

ディン1031

Because this red thing with outdate will show only if you've already installed this mod =).
And you are sure it's not installed?

Than you need to remove the row with the package_id of the member color link mod from the database table {your_prefix}log_packages.

Normal than it should be install normal, with a lot of changes *g*
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

AlenNS

Unbelievable! That was solution!
In log_packages left two logs from previous installation and that made those errors!
When I removed them installation has finished without problems! Thanks ディン1031!

FragaCampos

Hello once more.

I found a minor issue with this mod and thought of sharing it.
I have a membergroup which has the colour pink. The mod changes the colours everywhere i want, and everything is fine.

But recently, i added a new user to that group and there's one section where the colour doesn't change to pink. It is in the statistics part, like i'm showing in the following pic:



As you see, user spinky should have the colour pink like user TheJPL, but it doesn't.
I'm i doing something wrong?


Advertisement: