1

Topic: guest and post topic

when a guest wants to post a topic, he MUST insert his email...

is there a way to let him insert the post without inserting email???

Re: guest and post topic

i think someone asked for this before, not sure what happened to it though,  it should be possible with a little bit of code editing, i'll have a look tomorrow unless someone else has a solution

3

Re: guest and post topic

i use blog:cms 3.5 final with punbb 1.2

thanks if you'll be able to find something... smile

Re: guest and post topic

ok you should backup your files before doing this but with a couple of edits to post.php guests can post without entering an email

about like 133 -

replace:
        $email = strtolower(trim($_POST['req_email']));
with:
        $email = strtolower(trim($_POST['guest_email']));

about like 450 -
replace:
            <td class="puncon2"> <input type="text" name="req_email" size="50" maxlength="50" tabindex="<?php echo $cur_index++ ?>"></td>
with:
            <td class="puncon2"> <input type="text" name="guest_email" size="50" maxlength="50" tabindex="<?php echo $cur_index++ ?>"></td>

about line 150 -
find:
            if (!is_valid_email($email))
                message($lang_common['Invalid e-mail']);
above add:
        if ($email)

and that should do it i think although my files have alot of edits so make sure you backup and tell me if you get any errors

5

Re: guest and post topic

it works!!!

very nice... thank you very much!!!


the only difference from what you wrote was this... about line 450...

<div class="fconl">
<label for="guest_email"><strong><?php echo $lang_common['E-mail'] ?></strong><br/></label>
<input id="guest_email" type="text" name="guest_email" value="<?php if (isset($_POST['req_email'])) echo pun_htmlspecialchars($email); ?>" size="50" maxlength="50" tabindex="<?php echo $cur_index++ ?>" />
</div>



smile

Re: guest and post topic

It's on the todo list for 1.2. It involves a few more changes than the above though.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

7 (edited by Raff 2004-11-13 12:15)

Re: guest and post topic

i have already the 1.2dev

and with that changes it works... 

hmmm... maybe because i'm using the blog:cms mod version?

Re: guest and post topic

well what i did was just a quick hack it doesn't give the option in admin...