[2.0.10] Thanks for Posting

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

Rating:

Excellent!
1
11%
Very Good
5
56%
Good
1
11%
Fair
1
11%
Poor
1
11%
 
Total votes: 9

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

[2.0.10] Thanks for Posting

Post by Extensions Robot » Sat Nov 20, 2004 12:45 am

MOD Name: Thanks for Posting
Author: markus_petrux
MOD Description: This MOD changes the message issued after posting on a forum without read access. The user is sent to the forum index instead of to the login form.

MOD Version: 1.0.0

Download File: thanks_for_posting_mod_v1_0_0.zip
mods overview page: View
File Size: 1497 Bytes

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

ycl6
Translator
Posts: 5696
Joined: Sat Feb 15, 2003 10:35 am
Location: Taiwan
Contact:

Post by ycl6 » Sat Nov 20, 2004 3:56 pm

MOD Validated/Released

Notes:
As the description says, this MOD change on how the forum message says when user posted in a forum that he is not allowed to read.

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Sat Nov 20, 2004 4:18 pm

FYI:
A new and enhanced version of this MOD is being developed by ewelin. You can find it here:
http://www.phpbb.com/phpBB/viewtopic.php?t=328411

Said MOD, when finished and validated by the MOD Team, will replace this one in the MODs Database.

I'm very happy to see, the simple idea behind this MOD encouraged someone to make it better and more useful. 8)

Wish you all good luck ;)



Original post follows:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wow! Approved in no time. Thanks a lot, ycl6 :)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comments about this MOD:

ok, I spent some time looking for a Contact Us MOD, finally I thought about this simple idea...


How to Create an Easy Contact Us Form?

1) Create a new forum, name it, for instance "Contact Us".

2) Set all permissions to MOD, but allow Post to Guests.

At this point, annonymous users can post to this forum, but can't view/read it (it's hidden).

3) Finally, create a new link to allow them to post easilly:

Code: Select all

<a href="http://www.example.com/forum/posting.php?mode=newtopic&f=xx">Contact Us</a>
A guest can't see the forum, but will be able to post! :)

When a guest uses this form to send a message to the hidden forum, it will be redirected to the login form as (s)he is not allowed to view/read this hidden forum.

However, with this MOD, it will be redirected to the forum index instead.

Got it? :-)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Last edited by markus_petrux on Thu Oct 06, 2005 11:23 am, edited 2 times in total.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

BittenApple
Registered User
Posts: 297
Joined: Sun Dec 12, 2004 10:23 pm
Contact:

Post by BittenApple » Thu Dec 23, 2004 11:20 pm

Sorry for bumping but this is one good mod!! Thanks!! :)
My forums:

http://bittenapple.bi.funpic.org/forum/

Sorry, but youll have to copy and paste!

User avatar
obiku
Registered User
Posts: 67
Joined: Sun Oct 10, 2004 6:54 pm
Location: The Netherlands

Post by obiku » Sun Jan 09, 2005 7:11 pm

For somehow this mod only works if you're logged in. Then you can hit the link "contact us" and write a post. If you're not logged in You get an SQL error????
See my forum http://www.familie-smit.nl

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Mon Jan 17, 2005 12:38 am

obiku wrote: For somehow this mod only works if you're logged in. Then you can hit the link "contact us" and write a post. If you're not logged in You get an SQL error????
See my forum http://www.familie-smit.nl

It seems it's working... glad to see. ;)
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

Bachsau
Registered User
Posts: 61
Joined: Tue Dec 21, 2004 12:00 pm
Location: Germany, Hessen

Post by Bachsau » Mon Jul 25, 2005 6:02 am

Useless. Why should someone want to post in a forum s/he can't see? :roll:

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Mon Jul 25, 2005 7:41 am

I use it as a "Contact Us" form, people having troubles registering or something is allowed to use.

Since it is a hidden forum, no one but admin (or any other auth user/group) will see the contents. So it probably discourages spammers from posting.

Simple: Yes.
Useless: Not, IMHO. ;)
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

eq4bits
Registered User
Posts: 49
Joined: Fri Jan 21, 2005 3:01 pm

Post by eq4bits » Tue Aug 23, 2005 12:38 am

I installed this mod, using the contact target from our web page 'contact us' link. I've tested it by not being logged into the forum. I click the contact us link and it takes me to posting page, i'm able to put in a fake name, write the post and submit the post. BUT instead of redirecting and getting the 'thanks for posting, etal" message I'm redirected to Log In.

I've gone over the coding in the mod and my language/lang_english/lang_main.php AND the posting.php several times. Are there any particular MOD's that I may have already installed that conflict with this MOD? I've got quite a few.....
The posting part works great but the redirect doesn't.
Any suggestions would be greatly appreciated :D

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Tue Aug 23, 2005 1:11 am

Well, yes another MOD could have made changes leading this one to malfunction...

If that helps, the part that this MOD is meant to change in posting.php, should (after applying the changes) look more or less like this:

Code: Select all

	if ( $error_msg == '' )
	{
		if ( $mode != 'editpost' )
		{
			$user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id'];
			update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
		}

		if ($error_msg == '' && $mode != 'poll_delete')
		{
			user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);
		}

		if ( $mode == 'newtopic' || $mode == 'reply' )
		{
//+MOD: Thanks for Posting MOD
			if ( !$is_auth['auth_read'] )
			{
				$return_meta = '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">';
				$return_message = $lang['Thanks_for_posting'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');
			}
//-MOD: Thanks for Posting MOD

			$tracking_topics = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
			$tracking_forums = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();

			if ( count($tracking_topics) + count($tracking_forums) == 100 && empty($tracking_topics[$topic_id]) )
			{
				asort($tracking_topics);
				unset($tracking_topics[key($tracking_topics)]);
			}

			$tracking_topics[$topic_id] = time();

			setcookie($board_config['cookie_name'] . '_t', serialize($tracking_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
		}

		$template->assign_vars(array(
			'META' => $return_meta)
		);
		message_die(GENERAL_MESSAGE, $return_message);
	}
This code is executed as soon as the posting data has been stored into database, if no errors occurred. This is where the modified confirmation message is built.

HTH+
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

eq4bits
Registered User
Posts: 49
Joined: Fri Jan 21, 2005 3:01 pm

Post by eq4bits » Tue Aug 23, 2005 3:00 am

thanks will compare and see if i maybe put it in the wrong place :p these things happen....heh

User avatar
ewelin
Registered User
Posts: 262
Joined: Fri May 21, 2004 2:13 pm
Location: MA, USA
Contact:

Post by ewelin » Thu Sep 15, 2005 4:25 pm

any chance you could make it include an email field when posting. Might require a mod to the posting_body.tpl file but it would be handy to include an email address so one could just email the reply to the person.

also i was curious what happens when someone that is logged in goes to the forums and enters in a post and select to have Notify me when a reply is posted selected. Do they still get the email notifcation? what happens when they click on the link?

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Thu Sep 15, 2005 6:26 pm

ewelin wrote: any chance you could make it include an email field when posting. Might require a mod to the posting_body.tpl file but it would be handy to include an email address so one could just email the reply to the person.

If they expect to get some feedback, they will probably include their contact information in the post itself. I agree, it would more handy to have a field in the form, though.
ewelin wrote: also i was curious what happens when someone that is logged in goes to the forums and enters in a post and select to have Notify me when a reply is posted selected. Do they still get the email notifcation? what happens when they click on the link?

You can set the forum so registered users can only post. They don't even need permission to view/read the forum.
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

User avatar
ewelin
Registered User
Posts: 262
Joined: Fri May 21, 2004 2:13 pm
Location: MA, USA
Contact:

Post by ewelin » Fri Sep 16, 2005 3:28 pm

markus_petrux wrote: I agree, it would more handy to have a field in the form, though


well i sucked it up.... and modded the posting.php file and posting_body.tpl file to accomplish the task i set forth in my post above. I haven't made it into a Mod file yet but it's working. You can check out the form at http://slednewengland.com/posting.php?mode=contact&f=30 You will notice that the email field is now an input and is only displayed in this posting mode. The title has also been changed from Submit a post to Contact Form. The other freature added was I had it remove the notify of replies option so even if you were a member and used the form you wouldn't get notified if someone were to reply to the oringal message. Please note that the page above is on a live. site.

I dunno if this should be considered another MOD, an addon to yours, or combine it with yours to be the next version. Let me know your thoughts and we can progress from here. My thoughts are it's your mod that inspired mine... without this mod and your how-to for a simple contact form i wouldn't have had the idea for this.

markus_petrux
Former Team Member
Posts: 1887
Joined: Wed Apr 23, 2003 7:11 am
Location: Girona, Catalunya (Spain)
Contact:

Post by markus_petrux » Fri Sep 16, 2005 3:53 pm

This is a great thing with open source. ;)

I'm fine if a) you take over this MOD to release a more advanced version ...or b) send me your code and I'll release the new version for you, of course, giving full credits (ie. two MOD Author lines). I fine with option a) really.

I would open a topic in the MOD Development forum...
EasyMOD Standards | MOD Template Actions | MODs in Development Rules
Useful information for MOD Authors | MOD Queue Stats | Search MODs
Write SQL/DDL portable to all SQL servers supported by phpBB!
Get EasyMOD 0.3.0! | Suport al phpBB en Català!
8)

Post Reply

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