Page 4 of 9

Posted: Fri Feb 25, 2005 3:51 pm
by jlenko
You have to create a new forum... called Bin or actually whatever you want. Then check the forum ID... enter that number in the Configuration pane of the ACP.. then it'll work.

...j

Posted: Fri Feb 25, 2005 4:41 pm
by blinddruid
jlenko wrote: You have to create a new forum... called Bin or actually whatever you want. Then check the forum ID... enter that number in the Configuration pane of the ACP.. then it'll work.

...j


Thanks. It works great.

Posted: Fri Feb 25, 2005 11:54 pm
by kooky
jlenko wrote: I'm using phpbb 2.0.12... with style CharCoal3:Steel (c3s). Thing is.. I didn't edit this file for the Bin mod...

Out of all the mods I'm using... the only one that I've had to edit groupcp for, was the User Levels mod... same author :)

Are these two mods incompatible? I've checked all my code, and I've modified it exactly as I should have. Nothing else comes to mind... then again.. I've only really been modding these phpbb forums for.. oh.. 6 months?
No, they are not, otherwise i would have this error too :)

You error is older than the bin mod installation
maybe cause by the user level
Are you sure about your line 541?
Word is not really good to find the correct line number, i can suggest you take a try with Crimson Editor for Win OS (freeware)

here, i give you my own code for groupcp.php, maybe will debug your error:

Code: Select all

	//
	// For security, get the ID of the group moderator.
	//
	switch(SQL_LAYER)
	{
		case 'postgresql':
			$sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod 
				FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa 
				WHERE g.group_id = $group_id
					AND aa.group_id = g.group_id 
					UNION (
						SELECT g.group_moderator, g.group_type, NULL 
						FROM " . GROUPS_TABLE . " g
						WHERE g.group_id = $group_id
							AND NOT EXISTS (
							SELECT aa.group_id 
							FROM " . AUTH_ACCESS_TABLE . " aa 
							WHERE aa.group_id = g.group_id  
						)
					)";
			break;

		case 'oracle':
			$sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod 
				FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa 
				WHERE g.group_id = $group_id
					AND aa.group_id (+) = g.group_id";
			break;

		default:
			$sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod 
				FROM ( " . GROUPS_TABLE . " g 
				LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = g.group_id )
				WHERE g.group_id = $group_id";
			break;
	}
	if ( !($result = $db->sql_query($sql)) )
	{
		message_die(GENERAL_ERROR, 'Could not get moderator information', '', __LINE__, __FILE__, $sql);
	}

	if ( $group_info = $db->sql_fetchrow($result) )
	{
		$group_moderator = $group_info['group_moderator'];
	
		if ( $group_moderator == $userdata['user_id'] || $userdata['user_level'] == ADMIN )
		{
			$is_moderator = TRUE;
		}

		//
		// Handle Additions, removals, approvals and denials

Posted: Sun Feb 27, 2005 1:59 am
by jlenko
Somehow... fixed it. No idea why... but somehow it worked.

Thanks!!!

...j

Posted: Tue Mar 01, 2005 4:54 am
by eq4bits
jlenko wrote: You have to create a new forum... called Bin or actually whatever you want. Then check the forum ID... enter that number in the Configuration pane of the ACP.. then it'll work.

...j


Exactly where/how does one do this? install phpBB2 somewhere else?? I'm really confused now...
I installed this MOD this evening, but in my ACP - general configuration -board settings pane it DID create a little box in the right hand column to obviously put a choice into but there is nothing in the left hand column as an 'explanation'/title like the other settings.

in the ACP menu there isn't anything about the Bin nor is there anything in the moderator cp about the Bin...'where' is the bin? the only thing I've found that even references the bin is the little icon at the bottom of a topic page alongside the move/split/delete icons.......I did go in under a regular non-admin moderator i.d. and 'recycled' an old topic but where the heck did it go? I can't see it either as main/first admin i.d. either...

*feeling like a complete idiot*

Posted: Tue Mar 01, 2005 6:32 pm
by kooky
eq4bits wrote: *feeling like a complete idiot*
no we (all) began from zero

in your AdminCP, go to General Admin -> Configuration,
then between Enable Forum Pruning and Cookie settings
you have
Bin forum
Fill with the forum ID where topics moved to bin, a value of 0 will disable this feature. You should edit this forum permissions to allow or not view/post/reply... by users or forbid access to this forum.
:)

Posted: Tue Mar 01, 2005 7:35 pm
by eq4bits
Thanks
I figured it out after another cup of coffee last night. ;D
but I do have a question...
Is it possible to change the 'delete' icon in viewtopic and the 'delete' button modcp to 'direct' the topic being 'deleted' to the recylce bin or another bin? Is it possible to have 'another' bin? Say one called trash that is accessible by admin to verify what is being deleted by the moderator(s), just in case? I had a moderator 'accidentally' delete some topics that shouldn't have been, but don't necessarily want these 'deleted' items to go to the recycle bin that we are essentially using as an 'archive'.... or is there a mod for archives that I just haven't seen?

Posted: Tue Mar 01, 2005 9:35 pm
by kooky
on 1st page i answered to the same question
http://www.phpbb.com/phpBB/viewtopic.ph ... 07#1294607

in viewtopic.php

Code: Select all

#
#-----[ FIND ]------------------------------
#
	$topic_mod .= "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a>&nbsp;';
#
#-----[ REPLACE WITH ]-------------------------
#
Famitsu wrote: something like this

Code: Select all

	$topic_mod .= ( $userdata['user_level'] == ADMIN ) ? "<a href=\"modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete&sid=" . $userdata['session_id'] . '"><img src="' . $images['topic_mod_delete'] . '" alt="' . $lang['Delete_topic'] . '" title="' . $lang['Delete_topic'] . '" border="0" /></a>&nbsp;' : "";


and in modcp.php, you can try this

Code: Select all

#
#-----[ FIND ]----------------------------
#
		$mode = 'delete';
#
#-----[ REPLACE WITH ]------------------------
#
		$mode = ($userdata['user_level'] == ADMIN ? 'delete' : '';

Posted: Mon Mar 07, 2005 4:20 pm
by eq4bits
Thanks though I guess I wasn't very clear on what I meant, which is:

what would be the 'coding' to make it so when a moderator clicks the 'delete' icon instead of deleting the topic/post it sends it to the recycle bin...
essentially so the moderator or user 'thinks' they are deleting it but where admin/anyone with permission to see the 'hidden' recycle bin can see what it was that was 'deleted'? I know sneaky but having the recycle icon is confusing some of my peeps, and also i've had moderators delete things completely that 'shouldn't' be but I want them to still think they are actually deleting when they are really recycling so I or another admin can essentially approve the deletion before it's lost forever....(since i also have the log actions mod installed this would be very useful...) did any of that make sense? I don't always express my question properly since I lack a lot of the technical terms/expertise that you Wiz's have....heh

Posted: Sat Mar 12, 2005 3:12 am
by joefish
That would be a nice feature to have (as an option).

Posted: Sat Mar 12, 2005 3:22 am
by cinderbdt
I agree, this would be very useful. Once you have created the "bin" area on your forum, what would be involved in changing the "delete" function to "move to bin"? It would be a change to the UPDATE queries, right?

Posted: Sat Mar 12, 2005 5:44 pm
by Daku
Silly question: :oops:
I just went through the list of my "subforums", marked "autoprune" then set the number of days under "Remove topics that have not been posted to in" to 60.
Numerous topics are over a year old.

My question is: when does it actually remove the topics ? After clicking on "Update" at the bottom of that page nothing happened.
So when are the topics actually removed ?

many thanks to anyone who can tell me !

Posted: Sat Mar 12, 2005 6:47 pm
by kooky
cinderbdt wrote: It would be a change to the UPDATE queries, right?
No, just restrict the delete feature to ADMIN and use the delete icon instead of bin icon for bin :roll:

Anyway i noticed your request, maybe for a future upgrade...
Daku wrote: So when are the topics actually removed ?
they are lost :wink:

Posted: Tue Mar 29, 2005 1:21 pm
by Noonster
Snowboardalliance wrote:
addso wrote:PostPosted: Tue Dec 07, 2004 4:18 am Post subject:
it's easy to get the logs to log the recycle feature. just add the line

Code: Select all

// Log actions MOD Start
log_action('Recycle', $topic_id_sql, $userdata['user_id'], $userdata['username']);
// Log actions MOD End
after

Code: Select all

$message = $lang['Topics_Moved_bin'];
in the modcp.php file .. :)



I'm REALLY new to this phpBB stuff but from what I've learned I figured out you also need to edit bin.php so that if a Moderator clicks the recycle in the view topic, it is logged

Code: Select all

// Log actions MOD Start
include($phpbb_root_path . 'includes/functions_log.'.$phpEx);
// Log actions MOD End
After

Code: Select all

include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);

AND

Code: Select all

// Log actions MOD Start
log_action('Recycle', $topic_id_sql, $userdata['user_id'], $userdata['username']);
// Log actions MOD End
After

Code: Select all

			$message = $lang['Topics_Moved_bin'];
It's basically the same but in the bin.php
EDIT: Help plaese! This works but the topic ID is 0 so you can't see what topic was moved (just noticed) Can anyone tell me how to correct this??


Anyone got an answer to this as i am also needing to know.

Cheers
Darren

Posted: Tue Mar 29, 2005 11:42 pm
by Daku
Thanks for all your help. Maybe I posed the question unintelligbly, but in any case I have found out the following and am putting them here in case anyone else is searching for the answer(s)

1) Individual postings can be deleted or modified by Administrators by using the "Edit" button at the top right of the posting itself

2) Delete a topic: Entire topics can be deleted using the [X] button at the bottom left of the page of that topic (duh! Know how long it took me to find that ?!? :oops: )

3) Pruning: In the Forum Admin panel, second section down, click on "Pruning". In the right hand window you can now either select "All Forums" (click on "Look Up Forums" to select them all) or select a specific forum. Enter the number of days and click "Prune".