News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Annoy User

Started by Arantor, October 22, 2009, 01:51:42 AM

Previous topic - Next topic

lazylivin

Thanks for the edits spoog. Worked great on 2.0 Final

Hackathon

Quote from: lazylivin on September 16, 2011, 08:12:15 PM
Thanks for the edits spoog. Worked great on 2.0 Final

How did you make it work for 2.0?  ???

live627

He looked back a few pages to the edits from Spoogs

Heeks

Did someone already post these modified files or do I have to modify them by myself ?

If i have to modify them, i'll post for other users.

Thx to Spoogs ;)

Heeks


ACAMS

It would be nice if we could see a list of all users added to the annoy user, or set a certain number of days it will annoy.

live627

Doesn't the moderation block list them all?

ACAMS


live627

You probably need to turn it on under Setttings

ACAMS

This is all I can find



live627

No no I meant in the moderation center

ACAMS

Thanks, I didn't even know that was there!
It would still be nice if there was a timer on the number of days to annoy, kinda like the warnings system.

snadge

any chance of an update for it too work on 2.0.1...?

tried emulation and fails on many test instals


snadge

Quote from: Spoogs on January 13, 2011, 10:24:20 AM
ok so here we go...

Code (find on themes/default/profile.template.php) Select

if (!empty($context['can_have_buddy']) && !$context['user']['is_owner'])
echo '
<br /><a href="', $scripturl, '?action=buddy;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">[', $txt['buddy_' . ($context['member']['is_buddy'] ? 'remove' : 'add')], ']</a>';

Code (add after) Select


if ($context['can_annoyuser'] && !$context['user']['is_owner'] && empty($modSettings['annoyuser_disabled']))
echo '<br /><a href="', $scripturl, '?action=annoyuser;u=', $context['id_member'], ';', $context['session_var'], '=', $context['session_id'], '">[', ($context['member']['annoyuser'] != 0 ? $txt['remove_from_annoy'] : $txt['add_to_annoy']), ']</a>';




Code (find on sources/load.php) Select
// Call load theme integration functions.
Code (add before) Select
AnnoyUser('popup');




Code (find on sources/moderationcenter.php) Select
$valid_blocks['w'] = 'WatchedUsers';
Code (add after) Select
$valid_blocks['a'] = 'AnnoyedUsers';



Code (add to end of themes/default/moderationcenter.template.php) Select


function template_annoyed_users() {
global $settings, $options, $context, $txt, $scripturl;

echo '
<div class="cat_bar">
<h3 class="catbg">
', $txt['mc_annoyuser'], '
</h3>
</div>
<div class="windowbg">
<span class="topslice"><span></span></span>
<div class="content modbox">
<ul class="reset">';

foreach ($context['annoyed_users'] as $user) {
echo '
<li class="smalltext">
<span class="smalltext">', sprintf(!empty($user['last_login']) ? $txt['mc_seen'] : $txt['mc_seen_never'], $user['link'], $user['last_login']), '</span>
</li>';
}

// Don't have any watched users right now?
if (empty($context['annoyed_users']))
echo '
<li>
<strong class="smalltext">', $txt['mc_annoyed_users_none'], '</strong>
</li>';

echo '
</ul>
</div>
<span class="botslice"><span></span></span>
</div>';
}


is that after you install it and it fails on 2.0.1?  im a noob but can edit the files

Chalky

Are there any plans to upgrade for 2.0.2?  I would love to have this.

Chalky

Quote from: Spoogs on January 15, 2011, 04:45:49 PM
lol... no worries... do this... install the mod ingoring all the errors and post those 4 files and i'll fix you up

Will this work for installing on 2.0.2 as well?  Attached screenshot shows the failed tests I'm getting.

GlitchPC

#217
Question regarding this modification.

I'm currently running SMF 2.0.2 and trying to install this mod using RC3 emulation.  It would seem some of the edits, the mod said were successful, were not done.  One of those edits were as follows with the Load.php file...

Find:
mem.id_member

Add After:
, mem.annoyuser

I have 12 instances of mem.id_member.  Which one do I add ,mem.annoyuser after?

Here are the 12 locations...

1.  WHERE mem.id_member = {int:id_member}

2.  IFNULL(mem.id_member, 0) AS id_moderator,

3.  LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = mods.id_member)

4.  $select_columns = '
         IFNULL(lo.log_time, 0) AS is_online, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type,
         mem.signature, mem.annoyuser, mem.personal_text, mem.location, mem.gender, mem.avatar, mem.id_member, mem.member_name,

5.  LEFT JOIN {db_prefix}log_online AS lo ON (lo.id_member = mem.id_member)

6.  LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)

7.  $select_columns = '
         IFNULL(lo.log_time, 0) AS is_online, IFNULL(a.id_attach, 0) AS id_attach, a.filename, a.attachment_type,
         mem.signature, mem.annoyuser, mem.personal_text, mem.location, mem.gender, mem.avatar, mem.id_member, mem.member_name,

8.  LEFT JOIN {db_prefix}log_online AS lo ON (lo.id_member = mem.id_member)

9.  LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = mem.id_member)

10.  $select_columns = '
         mem.id_member, mem.member_name, mem.real_name, mem.email_address,

11.  IFNULL(mem.id_member, 0) AS id_moderator,

12.  LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = mods.id_member)

The above 12 occurrences are in order of appearance in the Load.php file.  I can rule out a couple of them...but, I wouldn't want to be wrong.  Like I always say..."I'm not, really, a coder."

The above information is based on the information from SMF's Modifications via the Package Parser for 2.0 RC3.  This may be a typo...since I went ahead and made all the manual edits from the Parser...except for that one...and it appears to be working.  Yet...I would like to get some clarification on it.

Thanks, in advance, for any light you can shed on this issue...

GlitchPC

Politely bumping the above post...

Chalky

Did you ever figure this out GlitchPC?  I want to try installing this but I'm expecting the same problem.

Advertisement: