1

Topic: Opinions: Download modification

Just wanting opinions on the general layout, appearance and usability of this:

http://forums.bauchan.org/testforum/downloads.php

Good, bad, could be better?


Cheers,

Matt

Re: Opinions: Download modification

looks good.

~James
FluxBB - Less is more

Re: Opinions: Download modification

Nice error.

4 (edited by MattF 2007-10-15 15:16)

Re: Opinions: Download modification

elbekko wrote:

Nice error.

big_smile big_smile Sods law that someone would try it at the moment I made a cockup of one of the files. big_smile big_smile I was copying a paginating category index across, (which is now fixed, btw). big_smile big_smile

Re: Opinions: Download modification

Looks great. But isn't there already a downloads mod?

6

Re: Opinions: Download modification

Yup. That installer is written for MySQL only, and I couldn't be arsed converting it and then having to check all the mods queries for pgsql compatibility. Plus, it wasn't quite what/how I wanted, from what I could gather.

Wanted something pretty much like the php-fusion download setup, but integrated into and looking like the forum. Hence, it was easier to create/mod my own than have to get used to the coding style of someone else before modding their mod. big_smile The actual PunBB coding style I know quite well by now, so used that as the base. Modified the category/forum admin scripts for the categories/downloads creation, and the index.php and viewforums.php scripts for the categories/downloads viewing scripts.

7

Re: Opinions: Download modification

Dr.Jeckyl wrote:

looks good.

Cheers. smile

8

Re: Opinions: Download modification

Okey dokey. Attempt two. big_smile One of the mods had taken quite a liking to the layout of the existing php-fusion site, big_smile so have re-modelled it somewhat, to try and get a nice inbetween between php-fusion type layout whilst retaining the forum look. (It wasn't easy). big_smile Opinions greatly appreciated once more. smile

Original version: http://forums.bauchan.org/testforum/downloads.php

Latest incarnation: http://forums.bauchan.org/testforum1/downloads.php



Matt

Re: Opinions: Download modification

mattf, when will you release this mod? i think that my new site could use this very well.

http://punlancer.com in the forum for people to share there templates and style they create.

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

10 (edited by MattF 2007-10-18 15:33)

Re: Opinions: Download modification

It probably wouldn't be much use for a standard'ish PunBB install. It's tied in to a highly adapted setup. Plus, the uploads are through an addition to the admin section, not user accessible. Also, the installer is only written for PostgreSQL. big_smile I may post the code later on, when it's finished, if someone else wants to do all the standardising and adaptation for a standard PunBB. I personally wouldn't have the time to backport it though.

Btw, how's that new contact form? Have you tested it yet?

11

Re: Opinions: Download modification

works like a champ! thanks.... did u look at the spamhaus mod trying to integrate it with the contact.php?
i understand about the uploader mod... that would be a kewl thingy bob... maybe if u post or email me the codes i can get someone to do it.

hince http://punlancer.com hehehe...

thanks for all ur help!

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

12

Re: Opinions: Download modification

quaker wrote:

did u look at the spamhaus mod trying to integrate it with the contact.php?

I posted that rbl updated version several days ago for you to try out. That's the one I was asking about. big_smile

http://punbb.org/forums/viewtopic.php?id=17037

13

Re: Opinions: Download modification

mattf

here the link!
http://punlancer.com/forum/contact1.php

i get a white screen!

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

14 (edited by MattF 2007-10-18 17:13)

Re: Opinions: Download modification

My cockup. big_smile Redownload that file. Should be working fine now. Have made the captcha on/off configurable too. The two options are near the top of the file. Set to '1' to enable the rbl check and captcha respectively.

$checkrbl = '0';
$usecaptcha = '0';

15 (edited by quaker 2007-10-18 17:44)

Re: Opinions: Download modification

can they both work together?

$checkrbl = '0';

if ($checkrbl == '0')

if i change 1 to 0 or all to 1 or 0 still white screen!

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

16

Re: Opinions: Download modification

here the code

<?php
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).'contact form';
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'include/email.php';
require PUN_ROOT.'include/parser.php';

$checkrbl = '1';

if ($checkrbl == '0')
{
    $rblserver = array();
    $rblserver[] = 'sbl-xbl.spamhaus.org';

    $fip = get_remote_address();
    $rip = implode('.', array_reverse(explode('.', $fip)));

    foreach ($rblserver as $xrbl)
    {
        $rblcheck = $rip.'.'.$xrbl;

        if ($rblcheck != gethostbyname($rblcheck))
        {
            require_once PUN_ROOT.'header.php';
            message("Your I.P address: ($fip) is blocked due to it being listed
                in the following database: <br/><br/>[ $xrbl ]<br/><br/>");
            require PUN_ROOT.'footer.php';
        }
    }
}
else if ($_POST['form_sent'] == 1)
{

    if (trim($_POST['name']) == '')
    {
        require_once PUN_ROOT.'header.php';
        message("You must enter your name.");
    }

    $email = strtolower(trim($_POST['email']));
    $cemail = strtolower(trim($_POST['cemail']));

    if ($email == '')
    {
        require_once PUN_ROOT.'header.php';
        message("You must enter your e-mail address.");
    }
    else if (!is_valid_email($email))
    {
        require_once PUN_ROOT.'header.php';
        message("The e-mail address syntax entered is invalid.");
    }
    else if ($email != $cemail)
    {
        require_once PUN_ROOT.'header.php';
        message("The e-mail addresses you entered do not match.");
    }

    if (trim($_POST['subject']) == '')
    {
        require_once PUN_ROOT.'header.php';
        message("You must enter a subject.");
    }

    if (trim($_POST['message']) == '')
    {
        require_once PUN_ROOT.'header.php';
        message("You must enter a message.");
    }

    session_start();
    if (isset($_POST['req_image']) && trim(strtolower($_POST['req_image'])) != '' && trim(strtolower($_POST['req_image'])) == $_SESSION['text'])
    {
        session_unset();
        session_destroy();
    }
    else
    {
        session_unset();
        session_destroy();
        require_once PUN_ROOT.'header.php';
        message("Image and text mismatch.");
    }

    $sender = trim(preg_replace('#[\n\r:]+#s', '', $_POST['name'].' <'.$email.'>'));
    $recipient = 'Forum Admin <'.$pun_config['o_admin_email'].'>';
    $subject = '[ Admin Contact Form ] '.trim(preg_replace('#[\n\r]+#s', '', $_POST['subject']));
    $message = str_replace(array("\n", "\0"), array("\r\n", ''), pun_linebreaks($_POST['message']));
    $headers = 'From: '.$sender."\r\n".'Date: '.date('r')."\r\n".'MIME-Version: 1.0'."\r\n".'Content-transfer-encoding: 8bit'."\r\n".'Content-type: text/plain; charset='.$lang_common['lang_encoding']."\r\n";

    if ($pun_config['o_smtp_host'] != '')
    {
        smtp_mail($recipient, $subject, $message, $headers);
    }
    else
    {
        mail($recipient, $subject, $message, $headers);
    }

    require PUN_ROOT.'header.php';
?>
<div class="block">
    <h2><span>Contact <?php echo $pun_config['o_board_title']; ?></span></h2>
    <div class="box">
        <div class="inbox">
            <b>The following information has been submitted to the forum admin:<br/><br/>
            <label>Your name: <?php echo $_POST['name']; ?><br/></label>
            <label>Your e-mail address: <?php echo $email; ?><br/></label>
            <label>Subject: <?php echo $_POST['subject']; ?><br/></label>
            <label>Message:<br/> <?php echo $_POST['message']; ?><br/></label>
        </div>
    </div>
    <p><a href="<?php echo $pun_config['o_base_url'].'/index.php' ?>">Return to forums index</a></p>
</div>
<?php

}
else
{ 

?>
<div class="blockform">
    <h2><span>Contact <?php echo $pun_config['o_board_title']; ?></span></h2>
    <div class="box">
        <form id="contact" method="post" action="<?php echo $pun_config['o_base_url'] ?>/contact.php">
            <div class="inform">
            <fieldset>
                <legend>Enter your contact details</legend>
                <div class="infldset">
                    Please enter your information and message.<br/>
                    [ Please note: All of the following fields are required. ]<br/>
                    <input type="hidden" name="form_sent" value="1"/><br/>
                    <label>Your name:<br/><input type="text" name="name" value="" size="40" maxlength="40"/><br/></label>
                    <label>Your e-mail address:<br/><input type="text" name="email" value="" size="40" maxlength="50"/><br/></label>
                    <label>Confirm your e-mail address:<br/><input type="text" name="cemail" value="" size="40" maxlength="50"/><br/></label>
                    <label>Subject:<br/><input type="text" name="subject" value="" size="40" maxlength="50"/><br/></label>
                    <label>Message:<br/><textarea name="message" rows="5" cols="38"></textarea><br/></label>
                </div>
            </fieldset>
            </div>
            <div class="inform">
            <fieldset>
                <legend>Image Verification Text</legend>
                <div class="infldset">
                    <img src="./ran.php" alt="verification text image"/><br/>
                    <label><strong>Text Image</strong>
                    <br/><input type="text" name="req_image" size="16" maxlength="16"/><br/></label>
                    <p class="clearb">Enter the text from the image into the box above</p>
                </div>
            </fieldset>
            </div>
            <p><input type="submit" name="update" value="Submit"/></p>
            </div>
        </form>
    </div>
</div>
<?php
}
require PUN_ROOT.'footer.php';
?>
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

17

Re: Opinions: Download modification

i dont see $usecaptcha = '0'; in the script!

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

18

Re: Opinions: Download modification

http://outgoing.bauchan.org/unix/contactcr.txt

19

Re: Opinions: Download modification

still nothing...
blank screen
http://punlancer.com/forum/contact1.php

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

20

Re: Opinions: Download modification

You sure you've copied it across correctly? That last script I linked works spot bollock. I double checked that one before copying it across. What are your logs saying?

21 (edited by quaker 2007-10-18 20:03)

Re: Opinions: Download modification

does it have anything to do with the admin mod for the verification mod?



ok i went into maintenance mod came out and now it works... hummmmmm....
it might be a mod that i have added that effecting stuff..



thanks again!

Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

22

Re: Opinions: Download modification

quaker wrote:

does it have anything to do with the admin mod for the verification mod?

??


This is that same script on the test server. Just catted it from the download server file to make sure it's an exact copy:

http://forums.bauchan.org/testforum1/contact.php

23 (edited by MattF 2007-10-18 20:48)

Re: Opinions: Download modification

Try adding this just below the include/common line at the top of the script:

require PUN_ROOT.'include/functions.php';

Edit: It doesn't need that line adding. Just checked that script with a virgin install of a standard PunBB and it works fine. The problem is at your end somewhere. Check your logs to see what they say.

24

Re: Opinions: Download modification

i got it working...

ill have to see what up with my codes...


thanks for all the help!!
Q

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

25

Re: Opinions: Download modification

What was causing it?