News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ignore User

Started by Rudolf, September 12, 2005, 01:00:12 PM

Previous topic - Next topic

thesquadbay

OK Rudolf, First thank you for the reply second here is the info you requested.

Error Log:

Nothing on error log.

Url to forum: The Squadbay Forums

Test account:

Username: Rudolf
Password: smfguru

My display.template.php



There are 10 types of people in the world: those who understand binary, and those who don't.

Rudolf

Your template doesn't contains the changes for the mod, so no wonder you don't see the buttons and that the posts are not hidden.
I attached the modified template file witch should make it work.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

thesquadbay

Looks like that did the job! Thank you so much!!


There are 10 types of people in the world: those who understand binary, and those who don't.

thesquadbay

OK now when I hit the ignore buton I get this..

QuoteUnable to load the 'main' template.


There are 10 types of people in the world: those who understand binary, and those who don't.

Rudolf

I suppose you have the mod installed. It doesn't seems so.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

thesquadbay



There are 10 types of people in the world: those who understand binary, and those who don't.

thesquadbay

I will uninstall and try again


There are 10 types of people in the world: those who understand binary, and those who don't.

Mikeba

#407
I'm having a problem with this mod functioning properly.

Prior to installing it, all tests were successful. After installation was complete, I received a message the mod was installed successfully. When I go to Features and Options, there is no text in the area which controls the mod functions. Also, none of the icons are showing up in the messages or profiles. I've uninstalled and reinstalled with the same results.

I'm assuming all of the code didn't install properly, but have no idea where to begin to look. I'm testing with the default theme and there are no other mods installed except SMF 1.0.12 / 1.1.4 /. Below are the error messages I receive.

Would someone please point me in the right direction to correct the problem? Thanks!


8: Undefined index: ignore_show
File: /public_html/forums/Sources/Display.php
Line: 772

8: Undefined index: ignore_hide
File: /public_html/forums/Sources/Display.php
Line: 781

8: Undefined index: member
File: /public_html/forums/Themes/default/Profile.template.php (summary sub template - eval?)
Line: 212

8: Undefined index: ignored_by
File: /public_html/forums/Themes/default/Profile.template.php (summary sub template - eval?)
Line: 211

8: Undefined index: ignoreset
File: /public_html/forums/Sources/Profile.php
Line: 235

RickJ

I see that I need to manually insert the code into our custom theme - copying from the default theme, but when I go to

Admin > Themes and Layout > Modify Themes, I do not find the Default Theme listed (see attached).

Am I looking in the wrong place?  Where can I see the code of the default theme?

Thanks so much!
Rick.

(I do search before asking, so please pardon me if I missed something :) )

Rudolf

You can't edit the default theme from the admin center. You will have to open the files through ftp and edit them that way.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

digit

A feature I would like to see...

Most ignored user stat!
Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

Antechinus

Having a slight problem with this one.

It works well, but on one of my themes (Devil's Rejects) the ignprefs template wont load.
According to the parser the only relevant file for this theme is Profile.template.php
I've done the recommended edits but the problem is still there.

It isn't a major drama, since the ignore/unignore function in the posts still works, but if someone could suggest a fix it'd be nice.

Thanks. 

Antechinus

I've also just tried setting this mod up with babylon (which I haven't been using) and I can't get it to work.

According to the parser I only need to edit Display.template.php for babylon. I've done that and checked the results but there's still no ignore feature functioning. The ignore options show in Profile but selecting and saving a member name doesn't hide their posts, and there's no ignore/unignore link under the avatar in their posts.

All the other themes have it working. Is babylon a special case? Do I have to import default themes? 
Given that this mod is working fine with default I would have thought babylon would just call the extra ones it needs from default anyway.
What am I missing here?

Rudolf

I haven't tried with the babylon theme. I'll take a look at it, but you will have to have a little patience.
If I don't come with an answer withing a few days, feel free to remind me.
Thanks.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Antechinus

#414
Not a problem. We all have to eat and sleep.  ;)

I'll keep messing with it in my spare time too. If all else fails I suppose I can just import all the modified default files.
That should fix it even if it is rather clumsy.




QuoteIt works well, but on one of my themes (Devil's Rejects) the ignprefs template wont load.
According to the parser the only relevant file for this theme is Profile.template.php
I've done the recommended edits but the problem is still there.

ETA: I just tried importing the files from default which are edited by this mod but not usually present in Devil's Rejects.
No difference. I still get an 'Unable to load "ignprefs template"' error.
This is what I expected since DR usually calls on the default files anyway, but I thought it was worth a shot.

After trying this I don't think importing the modified default theme files will help Babylon.

Rudolf

Attached you can find a working modified Display.template.php for the Babylon theme.

As for the profile error, you should make sure that the Profile.template.php contains the template_ignprefs() function. (see code below) Though if it's missing you should get that error in any theme not only the babylon. On my test install the profile section worked out of the box.

//-Ignore MOD- Start
function template_ignprefs()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;

// The main containing header.
echo '
<form action="', $scripturl, '?action=profile2" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator">
<table border="0" width="85%" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td height="26">
&nbsp;<img src="', $settings['images_url'], '/icons/profile_sm.gif" alt="" align="top" />&nbsp;
', $txt['ignore_settings'], '
</td>
</tr><tr class="windowbg">
<td class="smalltext" style="padding: 2ex;">
', $txt['ignore_info'], '
</td>
</tr><tr>
<td class="windowbg2" style="padding-bottom: 2ex;">
<table border="0" width="100%" cellpadding="3">';

// A text box for the user to input usernames of everyone they want to ignore personal messages from.
echo '
<tr>
<td valign="top">
<b>', $txt['ignore_list'], ':</b>
<div class="smalltext">
', $txt['ignore_tip'], '<br />
<br />
<a href="', $scripturl, '?action=findmember;input=ign_ignore_list;delim=\\\\n;sesc=', $context['session_id'], '" onclick="return reqWin(this.href, 350, 400);"><img src="', $settings['images_url'], '/icons/assist.gif" alt="', $txt['find_members'], '" align="middle" /> ', $txt['find_members'], '</a>
</div>
</td>
<td>
<textarea name="ign_ignore_list" id="ign_ignore_list" rows="10" cols="50">', $context['ignore_list'], '</textarea>
</td>
</tr>';

if (allowedTo('moderate_forum') || $context['can_view_own_ignored_by_list'])
echo '
<tr>
<td colspan="2">
<div class="titlebg" style="width: 95%;">',$txt['ignored_by_title'.($context['user']['is_owner'] ? '_own':'_any')],'</div>
<div style="width: 100%; height: 4em; overflow:auto">
'. (count($context['ignored_by_links']) ? implode(', ', $context['ignored_by_links']) : $txt['ignored_by_empty']) .'
</div>
</td>
</tr>';

// Show the standard "Save Settings" profile button.
template_profile_save();

echo '
</table>
</td>
</tr>
</table>
</form>';
}
//-Ignore MOD- End
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Rudolf

Quote from: digit on April 02, 2008, 06:46:35 AM
A feature I would like to see...

Most ignored user stat!

Where would you want this to appear?
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Antechinus

Great. Thanks for the file and the tip.
php isn't exactly my forte and consequently I'm reduced to following idiot proof instructions.

Btw, the theme missing the ignprefs template wasn't Babylon, but I think I can fix it now.

unrelenting

Quote from: Rudolf on April 09, 2008, 07:11:01 AM
Quote from: digit on April 02, 2008, 06:46:35 AM
A feature I would like to see...

Most ignored user stat!

Where would you want this to appear?

One good spot would be in Display.template.php somewhere in there profile next to their posts, if they are indeed the most ignored user.  :D

Thorolf

#419
I'm having a problem with this mod that I didn't see listed here...

I'm including before and after images... I have dilber mc running, and there is no display.template.php or anything like that.  Just index.template.php.

Any ideas what I need to change? Thanks!

EDIT: I was able to get the text to be hidden by fixing the aforementioned problem with different themes not displaying the button .gifs (odd)... but now I still have blank space where the "show" text would appear (see "after" image).

I'll go through the thread again and see if it's mentioned somewhere, but it sure would be nice to get that space to minimize until someone hits "show."

Advertisement: