Hello,
I would like to be able to specify the the subject and the body message for a new post. Is there a way to mod or not so that I can pass the subject and message body in a link.
For example something like this:
http://www.gamepacks.org/forum/posting. ... 20a%20test.
Thanks in advanced.
Passing Subject and Message Body in new post
Forum rules
Temporary forum to obtain support while phpBB.com is offline.
Please use the support forum on phpBB.com
Temporary forum to obtain support while phpBB.com is offline.
Please use the support forum on phpBB.com
- darcie
- Community Team
- Posts: 189
- Joined: Mon Mar 12, 2007 7:32 pm
- Location: Davis, California
- Contact:
Re: Passing Subject and Message Body in new post
As noted in the source code of your forum, we cannot support your board if you have removed the copyright information:
Please PM me or another team member when this is replaced to have your topic reopened.
If you would like to continue to get support from this site or phpbb.com, when available, please replace the copyright information to the overall_footer.html of your site. The minimum required is:<!--
We request you retain the full copyright notice below including the link to http://www.phpbb.com.
This not only gives respect to the large amount of time given freely by the developers
but also helps build interest, traffic and use of phpBB3. If you (honestly) cannot retain
the full copyright we ask you at least leave in place the "Powered by phpBB" line, with
"phpBB" linked to http://www.phpbb.com. If you refuse to include even this then support on our
forums may be affected.
The phpBB Group : 2006
//-->
Code: Select all
Powered by <a href="http://www.phpbb.com/">phpBB</a>
- darcie
- Community Team
- Posts: 189
- Joined: Mon Mar 12, 2007 7:32 pm
- Location: Davis, California
- Contact:
Re: Passing Subject and Message Body in new post
Copyright restored; topic reopened.
Re: Passing Subject and Message Body in new post
SG, your link takes me to a login/register screen. Might want to make a test acccount so people can see your example without too much hassle.
- darcie
- Community Team
- Posts: 189
- Joined: Mon Mar 12, 2007 7:32 pm
- Location: Davis, California
- Contact:
Re: Passing Subject and Message Body in new post
He's giving the link as an example of how he would like to use the link to post the subject. It isn't the location of the link that is the example but the link itself. See here for the entire sample url:
Code: Select all
http://www.gamepacks.org/forum/posting.php?mode=post&f=5&subject=This%20Subject&body=This%20is%20a%20test
Re: Passing Subject and Message Body in new post
Thanks Darcie.
The link is just an example but if it can be done with a post I can do it that way also.
This is a link to start a new post and f is the forum to post.
The link is just an example but if it can be done with a post I can do it that way also.
This is a link to start a new post and f is the forum to post.
Code: Select all
http://www.gamepacks.org/forum/posting.php?mode=post&f=5
GamePacks.org - Products for the Arcade/Media Community
Video Script - The ultimate media site script
Youtube Sharing Script - Run your own youtube sharing site
Video Script - The ultimate media site script
Youtube Sharing Script - Run your own youtube sharing site
Re: Passing Subject and Message Body in new post
Ok, so in other words when I click New Topic you want to populate the Subject with "Jage Writes:" and the body with "Write your letter here"?
Is that right? Do the messages change? Is there a limited set of topics depending on criteria, or is it actually something you need to pass through the URL? (e.g. could you pass a subject=3&body=urgent)?
Essentially you need to pick up the variable (this is from ucp_register.php adding basic_math value):
But depending on where and how you want to then use what in this case is $data['basic_math'] you'll probably do something like:
(this is cut down and not a real example since I process the basic math in the file for other purposes)
In which case in the html template I can now use {BASIC_MATH} such as:
I can probably give you better specifics depending on, again, what exactly you're trying to accomplish.... I can't guarentee my solutions or code fits in with the established way to do phpbb changes.
Is that right? Do the messages change? Is there a limited set of topics depending on criteria, or is it actually something you need to pass through the URL? (e.g. could you pass a subject=3&body=urgent)?
Essentially you need to pick up the variable (this is from ucp_register.php adding basic_math value):
Code: Select all
$data = array(
'username' => utf8_normalize_nfc(request_var('username', '', true)),
'new_password' => request_var('new_password', '', true),
'password_confirm' => request_var('password_confirm', '', true),
'email' => strtolower(request_var('email', '')),
'email_confirm' => strtolower(request_var('email_confirm', '')),
'confirm_code' => request_var('confirm_code', ''),
'basic_math' => request_var('basic_math', ''),
'lang' => basename(request_var('lang', $user->lang_name)),
'tz' => request_var('tz', (float) $timezone),
);
(this is cut down and not a real example since I process the basic math in the file for other purposes)
Code: Select all
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'USERNAME' => $data['username'],
'PASSWORD' => $data['new_password'],
'PASSWORD_CONFIRM' => $data['password_confirm'],
'EMAIL' => $data['email'],
'EMAIL_CONFIRM' => $data['email_confirm'],
'CONFIRM_IMG' => $confirm_image,
'BASIC_MATH' => $data ['basic_math'],
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_TZ_OPTIONS' => tz_select($data['tz']),
)
);
Code: Select all
<input type="text" name="basic_math" value="{BASIC_MATH}">
Re: Passing Subject and Message Body in new post
Thanks Jage. I think that's exactly what I'm looking for.
GamePacks.org - Products for the Arcade/Media Community
Video Script - The ultimate media site script
Youtube Sharing Script - Run your own youtube sharing site
Video Script - The ultimate media site script
Youtube Sharing Script - Run your own youtube sharing site