[ABD] Ignore Suite+++ 1.0.6

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
cheesypeanut
Registered User
Posts: 121
Joined: Mon May 05, 2003 12:51 am
Location: England

[ABD] Ignore Suite+++ 1.0.6

Post by cheesypeanut » Mon Aug 02, 2004 2:55 pm

Code: Select all

############################################################## 
## MOD Title: Ignore Suite+++
## MOD Author: cheesypeanut < simonpitfield@frogspawn.org > (Simon Pitfield) http://www.frogspawn.org/ 
## MOD Description: Adds an ignore button below each post, clicking it will 
## add the user to your ignore list. Users can control who is ignored through the ignore list. Both PMs and posts are blocked 
## from users on your ignore list. Users cannot ignore Administrators or Moderators.
## MOD Version: 1.0.6 
## 
## Installation Level: (Intermediate) 
## Installation Time: 15 Minutes 
## Files To Edit: 	viewtopic.php
##			privmsg.php	
##			search.php
##			admin/admin_users.php				
##			includes/constants.php
##                      includes/page_header.php
##			includes/topic_review.php
##			includes/usercp_viewprofile.php 
##			language/lang_english/lang_main.php
##                      templates/subSilver/overall_header.tpl
##			templates/subsilver/subsilver.cfg
##			templates/subsilver/viewtopic_body.tpl
##			templates/subsilver/profile_view_body.tpl
##					
## Included Files:	ignore.php
##			templates/subSilver/ignore_body.tpl
##                      templates/subSilver/images/icon_mini_ignore.gif
##			templates/subSilver/images/{LANG}/icon_ignore.gif
##			templates/subSilver/images/{LANG}/icon_unignore.gif
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes: 
## 
############################################################## 
## MOD History: 
## 
##   2004-07-25 - Version 1.0.0 
##      - First Release
##
##   2004-08-02 - Version 1.0.1 
##      - updated to enable compatibility with phpBB 2.0.10
## 
##   2004-08-04 - Version 1.0.2 
##      - added an "unignore" button to viewtopic.php
##
##   2004-08-06 - Version 1.0.3 
##      - when a user is deleted, their ignore data is removed too
##
##   2004-08-07 - Version 1.0.4 
##      - added several missing COPY actions from install template
##      - fixed missing lines from language/lang_english/lang_main.php
##      - added header link, lovingly coded by Shof515 :D
##
##   2004-10-25 - Version 1.0.5 
##      - fixed mySQL table name in topic_review.php
##      - fixed user_level issue in viewtopic.php
##      - fixed several issues in ignore.php
##
##   2004-10-26 - Version 1.0.6 
##      - fixed ability to ignore administrator PMs
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################   
Props to Ravenhearte for some of the original coding.

Get the latest version here.
Last edited by cheesypeanut on Mon Oct 25, 2004 11:34 pm, edited 8 times in total.

MaddoxX
Registered User
Posts: 450
Joined: Sat May 15, 2004 4:43 pm
Location: Russia

Post by MaddoxX » Mon Aug 02, 2004 3:21 pm

Can you make something when someone is ignored that another ignore button will come?

Like when a user is ignored you will see a unignore button
and when he's not ignored you will see ignore button
:D

cheesypeanut
Registered User
Posts: 121
Joined: Mon May 05, 2003 12:51 am
Location: England

Post by cheesypeanut » Mon Aug 02, 2004 4:35 pm

OK sure, I will do it later on this evening.

EDIT: If someone makes the button, I'll code it up. I don't have the font.

Let me know.

MaddoxX
Registered User
Posts: 450
Joined: Sat May 15, 2004 4:43 pm
Location: Russia

Post by MaddoxX » Tue Aug 03, 2004 3:36 pm

Me neither but can you fix the code anywayz? I can make my own button because i use other theme :/
:D

Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 » Tue Aug 03, 2004 3:39 pm

cheesypeanut wrote: OK sure, I will do it later on this evening.

EDIT: If someone makes the button, I'll code it up. I don't have the font.

Let me know.

i can try and make it for you..what type of font do u need?
Whos missing up my sig?

cheesypeanut
Registered User
Posts: 121
Joined: Mon May 05, 2003 12:51 am
Location: England

Post by cheesypeanut » Wed Aug 04, 2004 11:07 pm

To add the unignore button, firstly you will need the button image itself.

Get it here Image, or in the MOD zip file found in the first post.

Code: Select all

#
#-----[ COPY ]------------------------------------------
# 
copy icon_unignore.gif to templates/subSilver/images/{LANG}/icon_unignore.gif

# 
#-----[ OPEN ]------------------------------------------ 
# 
viewtopic.php

# 
#-----[ FIND ]------------------------------------------ 
#
	//Apply User Ignore Settings 
	if ( isset($ignored_ids[$postrow[$i]['user_id']]) && $ignored_ids[$postrow[$i]['user_id']] ) 
	{
		$ignore_img = "";
		$temp_url = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start&mode=unignore&ignoree_id=" . $postrow[$i]['user_id'] . "&sid=" . $userdata['session_id'];

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
	//Apply User Ignore Settings 
	if ( isset($ignored_ids[$postrow[$i]['user_id']]) && $ignored_ids[$postrow[$i]['user_id']] ) 
	{
		$temp_url = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start&mode=unignore&ignoree_id=" . $postrow[$i]['user_id'] . "&sid=" . $userdata['session_id'];
		$ignore_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_unignore'] . '" alt="' . $lang['Unignore_user'] . '" title="' . $lang['Unignore_user'] . '" border="0" /></a>';

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subsilver/subsilver.cfg

# 
#-----[ FIND ]------------------------------------------ 
# 
$images['icon_profile'] = "$current_template_images/{LANG}/icon_profile.gif";
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
$images['icon_ignore'] = "$current_template_images/{LANG}/icon_ignore.gif";
$images['icon_unignore'] = "$current_template_images/{LANG}/icon_unignore.gif";

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
Any problems, raise them in a reply :D

Narc0sis
Registered User
Posts: 662
Joined: Tue Apr 09, 2002 12:59 am
Contact:

Post by Narc0sis » Thu Aug 05, 2004 4:24 am

I havent had time to try it out yet but this sounds like a great mod.

If youre still developing this mod further, a nice feature would be an option for the admin to add a user to every member's ignore list at once.

MaddoxX
Registered User
Posts: 450
Joined: Sat May 15, 2004 4:43 pm
Location: Russia

Post by MaddoxX » Fri Aug 06, 2004 11:03 am

Jup this is a great mod :)
:D

cheesypeanut
Registered User
Posts: 121
Joined: Mon May 05, 2003 12:51 am
Location: England

Post by cheesypeanut » Fri Aug 06, 2004 1:28 pm

Narc0sis wrote: If youre still developing this mod further, a nice feature would be an option for the admin to add a user to every member's ignore list at once.


I've coded this up, but I'm thinking about its viability. I've also got to tidy up the code a little too. If I decide to go ahead with adding the feature, it will be in the next version of the MOD.

I'll keep you posted :D

Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 » Fri Aug 06, 2004 2:16 pm

cheesypeanut wrote: Image,

Just by any chance,can you make this image for dark backgrounds or maybe give me the PSD so i can make it look good on my skin
Whos missing up my sig?

MaddoxX
Registered User
Posts: 450
Joined: Sat May 15, 2004 4:43 pm
Location: Russia

Post by MaddoxX » Fri Aug 06, 2004 2:33 pm

Updated my version!
Dunno if some1 else is using the BBTech Template anywayz
I made these buttons:

Image
&
Image

'|'
__
:D

Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 » Fri Aug 06, 2004 3:19 pm

I made some quick dark subsilver-ish buttons:
Image
Image
Whos missing up my sig?

Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 » Fri Aug 06, 2004 3:39 pm

I got a small problem:

Code: Select all

# 
#-----[ FIND ]------------------------------------------ 
#
			if ( $search_id == 'newposts' )
			{
				if ( $userdata['session_logged_in'] )
				{
					$sql = "SELECT post_id 
						FROM " . POSTS_TABLE . "
						WHERE post_time >= " . $userdata['user_lastvisit'];
				}

# 
#-----[ REPLACE WITH ]------------------------------------------ 
#
			if ( $search_id == 'newposts' )
			{
				if ( $userdata['session_logged_in'] )
				{
					$sql = "SELECT post_id 
						FROM " . POSTS_TABLE . "
						WHERE post_time >= " . $userdata['user_lastvisit'] ." 
						$ignored_sql";
				}
I cant find that bit of code:
http://shof515.com/search.txt

To the MOD Author,i made a litte add-on thats adds a link to the Ignore List to the header,if you want,you can include this in when you update the mod,or you can leave it as a stand alone add-on,I have included 2 header icons,one for light skins,and one for dark skins,to download it,go here:
http://shof515.com/ignoresuite_headerlink.zip
Whos missing up my sig?

MaddoxX
Registered User
Posts: 450
Joined: Sat May 15, 2004 4:43 pm
Location: Russia

Post by MaddoxX » Fri Aug 06, 2004 5:14 pm

LOL! You're code is heavy modified :/ I can't find the line too m8.. Try for searching little parts..
:D

Shof515
Registered User
Posts: 1169
Joined: Wed Mar 19, 2003 4:36 am

Post by Shof515 » Fri Aug 06, 2004 5:53 pm

I have install this mod onto another forum of mine,and it says Check All UnCheck All under the delete button,on the forum where i first installed this mod,nothing is under the delete button except a big space with just this: /
.Both forums have problems finding the code in the search
--------------------------------------------------------------------------------------
That problem is fixed,it turned out that the lang_main.php file did not have this code:
$lang['Check_All'] = 'Check All';
$lang['UnCheck_All'] = 'UnCheck All';
..I still need help with the search file thru
Whos missing up my sig?

Locked

Return to “[2.0.x] MODs in Development”