Needing help w/ changing guest default post /reply requirements.

Started by Damion, August 04, 2011, 11:33:35 PM

Previous topic - Next topic

Damion

Ok, I need help w/ 2 items. I have it set up for people to post and reply w/o registering. The problem is, when you go to reply, it requires a name and email. Here are my preferences on changing this.

1)Name: Can I make this field auto populate w/ "Anonymous Nutjob" if it is not a logged in member? If not, can I delete this field completely?

2)Email: On this one, my first preference would be to delete this field. If not, can I make it auto populate w/ N/A?

I am willing to pay someone to help me w/ this.

My site is hxxp:thatsplaincrazy.com [nonactive]

Thanks

Sir Osis of Liver


Ok, in /Themes/default/Post.template.php find this:



// Guests have to put in their name and email...
if (isset($context['name']) && isset($context['email']))
{
echo '
<dt>
<span', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '', ' id="caption_guestname">', $txt['name'], ':</span>
</dt>
<dd>
<input type="text" name="guestname" size="25" value="', $context['name'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
</dd>';

if (empty($modSettings['guest_post_no_email']))
echo '
<dt>
<span', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</span>
</dt>
<dd>
<input type="text" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" class="input_text" />
</dd>';
}




Change to this:



/// Guests have to put in their name and email...
if (isset($context['name']) && isset($context['email']))
{
echo '
<dt>
<span', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '', ' id="caption_guestname">', $txt['name'], ':</span>
</dt>
<dd>
<input type="text" name="guestname" size="25" value="Anonymous Nutjob" tabindex="', $context['tabindex']++, '" class="input_text" />
</dd>';

if (empty($modSettings['guest_post_no_email']))
echo '
<dt>
<!--span', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '', ' id="caption_email">', $txt['email'], ':</span-->
</dt>
<dd>
<input type="hidden" name="email" size="25" value="[email protected]" tabindex="', $context['tabindex']++, '" class="input_text" />
</dd>';
}




Backup your Post.template.php before you try this.

When in Emor, do as the Snamors.
                              - D. Lister



Sir Osis of Liver

When in Emor, do as the Snamors.
                              - D. Lister

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: