Yeah i put it back up on the forums. Check for link on first post.

Yeah figured that out, thanks.

But what did you actually change? Because the top if fixed but now if you view a topic, it overflows to the right.

Also instead of posting a new topic, you might know:

Im trying to install PunArcade 1.1 and when i run install_mod.php it gives me an error saying FORUM_ROOT needs to be defined... Any ideas.

Lol no I was being serious, you are very helpful thank you.

What exactly did you change, as I can't just copy and paste the sniplet, it has line numbers.

Thanks

I want to award you a star, for just being this helpful big_smile

Hi there,

Im just working on a punBB theme, which can be found here: http://www.uweteam.1sthoster.com/forum/

Its a project for my univercity and if you open up that page in IE 7, it goes all horribly wrong at the top.

CSS layout: http://uweteam.1sthoster.com/forum/styl … Orange.css
CSS colors: http://uweteam.1sthoster.com/forum/styl … nge_cs.css

I spent the last 2 hours trying to figure it out and can't find a solution.

If anyone give me any suggestions, I will be truely thankful.

Alex

Hey,

Just changed my forums to punBB from SMF(Don't like it) and made my own style, so tell me what you think.

URL: http://www.hosterhome.com

Give me ideas, on what I could improve on and so on, or just hate it smile

Thanks

7

(2 replies, posted in PunBB 1.2 discussion)

Thanks i figured it out

8

(2 replies, posted in PunBB 1.2 discussion)

Hey,

Ive just made a E-Book Download forum and I need a secure way of downloading a file, so the user cannot directly download it by using a link, instead they have to be logged and use a form which I have made to download the file.

I know this can be done because ive done it about 2 - 3 years ago now, but forgen how to do it.

Any ideas or links to help sites would be great.

Thanks in advance

9

(4 replies, posted in PunBB 1.2 discussion)

Thanks alot again elbekko, fixed

10

(1 replies, posted in Programming)

There isnt an actual css function that can give a background image to the selected size of the border, but if you have a look at your imported folder css file that you are trying to edit and find:

/* 2. POST BACKGROUNDS AND TEXT */

underneath it sets the colours of the table headers such as:

DIV.blockpost H2 {BACKGROUND-COLOR: #7EA34B}

so you could give that H2 a background colour by adding this:

DIV.blockpost H2 {background-image:url(../../img/yourimage.jpg)}

There the image im using is located in the img folder as you can see, but u can add it in anywhere

The only thing is that only adds a background image to the header H2, so maybe u can add a header at the bottom of the table too and do the same thing.
But im not sure if u are able to do the same with the left and right borders, u will have to make a template or something.

11

(4 replies, posted in PunBB 1.2 discussion)

The one that comes up if the query is not successful:

or error('Unable to add ebook to database', __FILE__, __LINE__, $db->error());

12

(4 replies, posted in PunBB 1.2 discussion)

Hey,

Ive made this query to add the uploaded file information into the database:

$db->query('INSERT INTO ebookbooks (link, desc, uploaded_by, date_uploaded) VALUES('.$f_name.','.$f_desc.','.$user['username'].','.date("Y-m-j").')') or error('Unable to add ebook to database', __FILE__, __LINE__, $db->error());

The variables are defined here:

$f_desc = $_POST['desc'];
$f_name = $_FILES['file']['name'];

and here are the table structures:

     id          tinyint(3)   auto_increment
    name     varchar(80)         
    link        varchar(90)         
    desc       blob     BINARY     No             
    category     varchar(30)         
    uploaded_by     varchar(50)         
    date_uploaded     date         No     0000-00-00

Just need a second eye to look at it because it keeps returning the error when query is run. Might be just some silly mistake that I cant see but maybe someone else can.

Thanks in advance

What are you actually trying to do?

Finally got it working big_smile, took about 16 hoursbut got it. Ok i need sleep

Thanks for all your help

I tryed making my own upload script from that description about the functions and this is what I got:

//Upload directory
    $upload_dir = PUN_ROOT.'ebooks/';
    //Uploaded file
    $uploadfile = $uploaddir . basename($_FILES['file']['name']);
    
    if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) 
    {
        message('File upload was unsuccessfull!');
    } 
    else 
    {
        message('File uploaded successfully!');
    }

Keeps showing me a message that file upload was unsuccessfull sad

Hmmm:

php.net wrote:

Note:  Be sure your file upload form has attribute enctype="multipart/form-data"  otherwise the file upload will not work.

Nope no use, but ill have a look at the link you gave me

Well there are a couple things you can do:

1. Disallow users from registering with the same email address. This can be done by going into your administration panel and in permissions, look at registration.

and

2. You can record that person's IP address and dont let anyone with that IP address in the website, can be easily done by adding something like this to your index.php or header.php:

/*********************************************************/
$banned_ip_address = '0.0.0.0'; //What ever the IP address is

if($_SERVER['REMOTE_ADDR'] == $banned_ip_address)
{
    message('You are banned from this website, please leave');
}

/*********************************************************/

and thats it

Here is the html code that shows the extra link in the profiles tab and what it shows if its selected:

else if ($section == 'ebooks')
    {
    
        $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_common['Profile'];
        require PUN_ROOT.'header.php';
        
        //Generates the profile menu
        generate_profile_menu('ebooks');
        
        //Creates the upload form
        ?>
        
        <div class="blockform">
        <h2><span><?php echo pun_htmlspecialchars($user['username']).' - '.$lang_profile['Section Ebooks'] ?></span></h2>
        <div class="box">
        
        <form id="profile8" method="post" action="profile.php?section=ebooks&id=<?php echo $id ?>&action=upload_ebook">
        <fieldset>
        <legend><?php echo $lang_profile['Upload Legend'] ?></legend>
                    
        <div class="inform">
        <br>
        <div><?php echo $lang_profile['Upload Info']; ?></div><br>
        <div><?php echo $lang_profile['File Info']; ?></div><br>
        <div><input type="file" name="file" size="70" maxlength="200" /></div><br>
        <div><?php echo $lang_profile['Desc']; ?></div><br>
        <div><textarea name="desc" rows="4" cols="65"></textarea></div><br>
        <div><input type="submit" name="upload_ebook" value="<?php echo $lang_profile['Upload File']; ?>" /></div>
        </div>
        </fieldset>
        </form>
        </div>
        </div>
        
        
        <?php
        
    }

and here is the php code that tryes to upload the file selected:

else if ($action == 'upload_ebook')
{
    
    $file_name = $_POST['file'];
    $file_desc = $_POST['desc'];
    
    if(is_uploaded_file($_FILES['file_name']['tmp_name']) && !file_exists(PUN_ROOT."uploads/".$_FILES['file_name']['name']))
    {
        move_uploaded_file($_FILES['file_name']['tmp_name'], PUN_ROOT."ebooks/".$_FILES['file_name']['name']);
        redirect($_SERVER['PHP_SELF'], "File uploaded");
    }
}

P.S: You can also look at the form from the website: http://www.niqqa.co.uk, register and look at your profile menu

Still doesnt work, its like it doesnt wait for the upload to complete, it redirects straight away. This is what I got so far:

$file_name = $_POST['file'];
    $file_desc = $_POST['desc'];
    
    if(is_uploaded_file($_FILES['file_name']['tmp_name']) && !file_exists(PUN_ROOT."uploads/".$_FILES['file_name']['name']))
    {
        move_uploaded_file($_FILES['file_name']['tmp_name'], PUN_ROOT."ebooks/".$_FILES['file_name']['name']);
        redirect($_SERVER['PHP_SELF'], "File uploaded");
    }

tryed that and it only worked once, but the file it uploaded was 0kb, when its an image file on my comp and its like 200kb.
The other times i tryed it didnt work at all

Hi,

Im trying to a upload form/script to the profiles menu, ive done everything, made the form, but the actual upload script is troubling me.
I was thinking of copying the upload methods that punbb use to upload avatars but i cant find the actual script, all i can see is when it checks for errors and stuff.
I tryed using normal copy methods for the script:

copy($file_name,PUN_ROOT.'/uploads/'.$file_name);

but that just returns an error that it cannot find the file specified. This is when I already browsed the file and clicked submit to proccess the form.

Any ideas on how I should go about on doing this.

I heard the use of headers, do I need to use them?

Thanks in advance

23

(4 replies, posted in PunBB 1.2 discussion)

Thanks it worked

24

(4 replies, posted in PunBB 1.2 discussion)

Hi,

I need some help on how to change the width of the whole forum so it doesnt spread accross the browser, i want it to macth my website header width.


Thanks in advance

Thanks helpd alot