Page 2 of 23

Re: Soft Delete

Posted: Sat Feb 16, 2008 10:06 pm
by Pseudonym
primehalo wrote:Prime Post Revisions should do that.
Oooh! I'd looked through the mod list, but somehow I missed that one.
*bookmarks page*

Cheers. :)

Re: Soft Delete

Posted: Sat Feb 16, 2008 10:57 pm
by EXreaction
That post revisions thing sounds great. I will have to take a look at it. :)

I took a very quick look at the Prime Trash Bin mod...
The edit in includes/mcp/mcp_logs.php can be removed. If you create a file named info_mcp_prime_trash.php (or something like that, as long as it is info_mcp_*.php) and put it in the mods/ folder it will be automatically loaded with the mcp (though this should only be used for module names and log titles).

I didn't see anything else in my quick browse that could be changed without me looking further though. :P

It does appear that we did a lot of similar things in the edits. :mrgreen:

Re: Soft Delete

Posted: Sun Feb 17, 2008 6:32 am
by primehalo
EXreaction wrote:That post revisions thing sounds great. I will have to take a look at it. :)

I took a very quick look at the Prime Trash Bin mod...
The edit in includes/mcp/mcp_logs.php can be removed. If you create a file named info_mcp_prime_trash.php (or something like that, as long as it is info_mcp_*.php) and put it in the mods/ folder it will be automatically loaded with the mcp (though this should only be used for module names and log titles).

I didn't see anything else in my quick browse that could be changed without me looking further though. :P

It does appear that we did a lot of similar things in the edits. :mrgreen:
Ah, that's good to know. Will have to change that in the next revision. I'm mainly trying to think up was to reduce the number of template edits, since the more of those you have the harder it is to install using custom or multiple styles. This will all have to wait until I get some free time back, though.

Re: Soft Delete

Posted: Mon Feb 18, 2008 1:25 am
by jmjm003
Exreaction,
First, thanks for the mod.
Is it possible to make so that the deleted post/topics are not collapsed when viewing? I would prefer just to see it rather than have to click to open it.

Also, I seem to have an issue when it comes to "copy" a topic.
I can merge, split and delete + other options without any issues. It's only when I use copy that I get the below error.

Code: Select all

General Error
SQL ERROR [ mysql4 ]

Unknown column 'parent_id' in 'field list' [1054]

SQL

INSERT INTO phpbb_topics (forum_id, icon_id, topic_attachment, topic_approved, topic_reported, topic_title, topic_poster, topic_time, topic_time_limit, topic_views, topic_replies, topic_replies_real, topic_status, topic_type, topic_first_post_id, topic_first_poster_name, topic_first_poster_colour, topic_last_post_id, topic_last_poster_id, topic_last_poster_name, topic_last_poster_colour, topic_last_post_subject, topic_last_post_time, topic_last_view_time, topic_moved_id, topic_bumped, topic_bumper, poll_title, poll_start, poll_length, poll_max_options, poll_last_vote, poll_vote_change, topic_deleted, topic_deleted_time, topic_deleted_reply_count, parent_id, left_id, right_id, forum_parents, forum_name, forum_desc, forum_desc_bitfield, forum_desc_options, forum_desc_uid, forum_link, forum_password, forum_style, forum_image, forum_rules, forum_rules_link, forum_rules_bitfield, forum_rules_options, forum_rules_uid, forum_topics_per_page, forum_type, forum_status, forum_posts, forum_topics, forum_topics_real, forum_last_post_id, forum_last_poster_id, forum_last_post_subject, forum_last_post_time, forum_last_poster_name, forum_last_poster_colour, forum_flags, display_on_index, enable_indexing, enable_icons, enable_prune, prune_next, prune_days, prune_viewed, prune_freq, forum_deleted_topic_count, forum_deleted_reply_count) VALUES (19, '0', '0', 1, 0, 'test', '2', '1203297197', '0', '1', '0', '0', '0', '0', '1186', 'tommymc', '000033', '1186', '2', 'tommymc', '000033', '', '1203297197', '1203297198', '0', '0', '0', '', '0', '0', '1', '0', '0', '0', '0', '0', '1', '26', '27', 'a:1:{i:1;a:2:{i:0;s:7:\"General\";i:1;i:0;}}', 'Testing Grounds', 'Do all of your testing here. Just the place for learning how the board functions.\nGot a signature?', '', '7', '', '', '', '0', '', '', '', '', '7', '', '0', '1', '0', '65', '14', '14', '1186', '2', 'test', '1203297197', 'tommymc', '000033', '48', '0', '1', '0', '0', '0', '7', '7', '1', '0', '0')

BACKTRACE


FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: includes/mods/soft_delete.php
LINE: 986
CALL: dbal_mysql->sql_query()

FILE: includes/mcp/mcp_main.php
LINE: 953
CALL: mcp_fork_topics()

FILE: includes/mcp/mcp_main.php
LINE: 106
CALL: mcp_fork_topic()

FILE: includes/functions_module.php
LINE: 471
CALL: mcp_main->main()

FILE: includes/functions_module.php
LINE: 766
CALL: p_master->load_active()

FILE: mcp.php
LINE: 168
CALL: p_master->load()

My test forum runs on my home PC. Given I have other mods installed. I know that on my live forum without the soft delete mod, the copy function works.
Just wondering if this is something specific to me. If so, maybe you have an idea as to what causes it.

Again, thanks for the mod.

Re: Soft Delete

Posted: Mon Feb 18, 2008 5:26 am
by EXreaction
I will take a look at it when I have some time and I'll let you know when it is fixed.

Re: Soft Delete

Posted: Tue Feb 19, 2008 2:49 am
by Silverdown
When i try to delete a soft delete topic it send a message saying I cant because I don't have the permissions, I am on the admin account that was created when phpbb 3 was installed
Soft Delete Mod wrote:You do not have the necessary permissions to complete this operation.
I also have the 1.0.6 version if that helps

Re: Soft Delete

Posted: Tue Feb 19, 2008 2:56 am
by jmjm003
ACP>Permisions>Global Moderators
I found the permissions there that allowed me to hard delete. I too am the forum admin and had to do this.
The install instruction say you have to set permissions to allow hard delete.

Re: Soft Delete

Posted: Tue Feb 19, 2008 3:01 am
by jmjm003
EXreaction wrote:I will take a look at it when I have some time and I'll let you know when it is fixed.


Thanks Exreaction
Is it possible to make so that the deleted post/topics are not collapsed when viewing? I would prefer just to see it rather than have to click to open it.
When time permits. Is the above possible with some simple edits?

Re: Soft Delete

Posted: Tue Feb 19, 2008 3:26 am
by EXreaction
Silverdown wrote:When i try to delete a soft delete topic it send a message saying I cant because I don't have the permissions, I am on the admin account that was created when phpbb 3 was installed
Soft Delete Mod wrote:You do not have the necessary permissions to complete this operation.
I also have the 1.0.6 version if that helps
Are you trying to delete it from the MCP or by deleting the only post from viewtopic?
jmjm003 wrote:
Is it possible to make so that the deleted post/topics are not collapsed when viewing? I would prefer just to see it rather than have to click to open it.
When time permits. Is the above posible with some simple edits?
Oh, sorry about that.

Open viewtopic_body.html

Find:

Code: Select all

	<!-- IF postrow.S_POST_DELETED-->
		<script type="text/javascript" src="{T_TEMPLATE_PATH}/mods/soft_delete.js"></script>
		<div id="d{postrow.POST_ID}" class="post" style="background-color: #33FF00;">
			<div class="inner"><span class="corners-top"><span></span></span>
				<div class="postbody" style="width: 100%;">
					<div style="text-align: center;">
						<a href="#none" onClick="toggleDiv('p{postrow.POST_ID}'); toggleDiv('d{postrow.POST_ID}');">{L_DELETED_POST_SHOW}</a>
						<noscript><br/>{L_POST_SHOW_NO_JS}</noscript>
					</div>
				</div>
			<div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
			<span class="corners-bottom"><span></span></span></div>
		</div>
	<!-- ENDIF -->
Delete it.

Find:

Code: Select all

<!-- IF postrow.S_POST_DELETED --> style="background-color: #33FF00; display: none;"<!-- ENDIF -->
Inline find:

Code: Select all

 display: none;
Delete it.

Re: Soft Delete

Posted: Tue Feb 19, 2008 3:36 am
by Silverdown
jmjm003 wrote: ACP>Permisions>Global Moderators
I found the permissions there that allowed me to hard delete. I too am the forum admin and had to do this.
The install instruction say you have to set permissions to allow hard delete.
Thanks this worked!

Re: Soft Delete

Posted: Wed Feb 20, 2008 12:58 am
by jmjm003
Thank you EXreaction for the edits. That did just what I was looking for.

Re: Soft Delete

Posted: Wed Feb 20, 2008 12:35 pm
by demon327
why is there no subsilver2 based theme support? :cry: , can somebody give me the edits for subsilver2 bases styles please??

Re: Soft Delete

Posted: Thu Feb 21, 2008 2:34 pm
by demon327
mm after much trial and error i have it working for 98%, but i have some extra suggestions:

when in the MCP:
make a option to soft delete posts and hard delete posts..,when i delete posts in the MCP they only have bin soft deleted and thats not nice when you have to delete all the posts by clicking the delete button in the post itself

styles:
Make a working version for Subsilver 2 based styles.., i had to search for houres to find some things that are almost the same as prosilver...

Re: Soft Delete

Posted: Thu Feb 21, 2008 5:35 pm
by EXreaction
It should hard delete the posts if they have been soft deleted and are selected within the MCP. Are you sure that you have permission to hard delete the posts?

Re: Soft Delete

Posted: Thu Feb 21, 2008 5:52 pm
by demon327
EXreaction wrote:It should hard delete the posts if they have been soft deleted and are selected within the MCP. Are you sure that you have permission to hard delete the posts?
yes i'm sure, cause if i deleted them in the topic for the first time there soft deleted when i delete again they ar hard deleted..

ow before i forget: when i see the soft deleted posts in the MCP and i press "delete" its does nothing they will not be deleted again and i have to delete them one by one.. in the topic

and when i'm in the MCP i did like to choose "hard delete selected posts","soft deleted selected posts" cause now you only have "delete selected posts" when you do that they only will be soft deleted...