[2.0.6] Under construction posts [KMR-Award]

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
6
35%
Very Good
4
24%
Good
3
18%
Fair
1
6%
Poor
3
18%
 
Total votes: 17

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 27484
Joined: Sat Aug 16, 2003 7:36 am

[2.0.6] Under construction posts [KMR-Award]

Post by Extensions Robot » Sun Nov 16, 2003 6:41 pm

MOD Name: Under construction posts [KMR]
Author: Dr DLP
MOD Description: Allows users to make their post under construction , so others cannot read it until they decide to . Admin can activate/deactivate this option using the ACP .
Under construction posts are protected against reviews and quote .
Users can see at the bottom of their profile page their posts under construction .
If a user see his own post ( or a moderator ) , the post appears in red with an advertisement .


MOD Version: 1.0.3


Download File: Under_construction_posts_103.zip
mods overview page: View
File Size: 6407 Bytes

KMR-Award
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

User avatar
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric » Tue Dec 09, 2003 11:45 pm

MOD Validated/Released
Eric

quentin
Registered User
Posts: 197
Joined: Tue May 20, 2003 7:30 am
Location: Geneva, Switzerland
Contact:

Post by quentin » Wed Dec 10, 2003 10:26 am

sounds interesting, but im not too sure what kind of uses can be made of that. Anyone has an example where this under constrution makes sense ?
Sounds like a "save as draft" feature for unfinished posts, but that other users may see you started this draft (although they may not see its contents).
Am i right ?

Quentin
The largest message boards on the web !
Web Design Library (coming soon)
Friends sites: Heroes of might and magic - Biometric security

User avatar
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP » Wed Dec 10, 2003 6:56 pm

This can be useful if you are making an huge post - such as the board rules - and that you have to stop , for reason or other .
I think users can play a little with that , their post "under construction" is only seen by admins and mods .
But maybe you should have a look to the topic request : http://www.phpbb.com/phpBB/viewtopic.ph ... 409#834409 :)

To the mods team : thanks to having validated this one and for the advices :)

seteo-bloke
I've Been Banned!
Posts: 281
Joined: Tue Jan 28, 2003 1:41 pm

Post by seteo-bloke » Tue Dec 16, 2003 5:23 pm

Is this compatible with PCP 2?.

User avatar
diekee
Registered User
Posts: 14
Joined: Sun Jun 01, 2003 2:23 pm
Location: belgium

Post by diekee » Tue Dec 16, 2003 6:19 pm

nice mod... i only have one remark: is it possible to mark a "draft topic"? i mean: when someone starts a topic, but decides to post it as a draft, would it be possible to put a "draft:" before the topic title? or put the title in red? or whatever... thx!

User avatar
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP » Tue Dec 16, 2003 7:55 pm

seteo-bloke : I haven't tested , but I don't see what he wont be compliant with PCP 2 :)

diekee : I'll have a look , this a great idea . Maybe this warning could only be seen by the author .

seteo-bloke
I've Been Banned!
Posts: 281
Joined: Tue Jan 28, 2003 1:41 pm

Post by seteo-bloke » Tue Dec 16, 2003 9:08 pm

Erk, I get this error from functions_post...been through it three times but can't see what is wrong...

Code: Select all

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1

INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, post_draft) VALUES (1483, 2, 3, '', 1071608041, '51813a2f', 1, 1, 1, 1, )

Line : 306
File : /home/thegamin/public_html/forum/includes/functions_post.php

User avatar
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP » Tue Dec 16, 2003 9:31 pm

Let me see the part of this file , please .
It seems you have forgotten some code :)

seteo-bloke
I've Been Banned!
Posts: 281
Joined: Tue Jan 28, 2003 1:41 pm

Post by seteo-bloke » Tue Dec 16, 2003 9:45 pm

Dr DLP wrote: Let me see the part of this file , please .
It seems you have forgotten some code :)


Probably, I'm such a muppet sometimes. :? :lol:

I guess this is the part...

Code: Select all

	$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";

	$sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";


User avatar
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP » Tue Dec 16, 2003 9:53 pm

I don't see any code of the mod in this part .
This should be like this :

Code: Select all

   $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; 

   $sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, post_draft) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig, $draft_on)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig, post_draft = $draft_on" . $edited_sql . " WHERE post_id = $post_id"; 
If it still doesn't work properly , please make a zip with the files posting.php and includes/functions_post.php please , it will be easier for me to find the bug :)

seteo-bloke
I've Been Banned!
Posts: 281
Joined: Tue Jan 28, 2003 1:41 pm

Post by seteo-bloke » Tue Dec 16, 2003 10:05 pm

Dr DLP wrote: I don't see any code of the mod in this part .
This should be like this :

Code: Select all

   $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; 

   $sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, post_draft) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig, $draft_on)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig, post_draft = $draft_on" . $edited_sql . " WHERE post_id = $post_id"; 
If it still doesn't work properly , please make a zip with the files posting.php and includes/functions_post.php please , it will be easier for me to find the bug :)


Oh oops!. I posted my previous working functions_post.php!. D'oh!...I'll try what you said above, although it looks like what I tried when it failed.

I'll give it a go and, if need be, I'll zip those two files for you.

Thanks Dr. :)

seteo-bloke
I've Been Banned!
Posts: 281
Joined: Tue Jan 28, 2003 1:41 pm

Post by seteo-bloke » Wed Dec 17, 2003 12:09 am

I've been through the installation for post and functions_post again, but still cannot see where the error lays. Although I did notice there are two instances of this in posting:

Code: Select all

#
#-----[ FIND ]------------------------------------------------
#
# this is a partial search : the full line is longer
#
submit_post($mode, $post_data,

#
#-----[ IN-LINE FIND ]---------------------------------------- 
#
$poll_length
Here's the zip. :)

Thanks Dr and sorry for being a hassle as per usual.

User avatar
Dr DLP
Registered User
Posts: 527
Joined: Sat Mar 29, 2003 5:34 pm
Location: France
Contact:

Post by Dr DLP » Wed Dec 17, 2003 4:33 pm

I think I have found the problem .
Please try with these files .

Tel
Registered User
Posts: 158
Joined: Mon Apr 28, 2003 5:33 pm
Location: UK

Post by Tel » Wed Dec 17, 2003 8:51 pm

Hi

I'm getting an error identical to seteo-bloke. What needed to be changed?

Thanks
Last edited by Tel on Tue May 24, 2005 8:07 pm, edited 3 times in total.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”

Who is online

Users browsing this forum: No registered users and 11 guests