26

Re: attach image

cuteseal wrote:

Hi all,

If you're using this script, I found a beautiful little script which you can drop into the image directory, and it'll let you browse the images.  Just change the title in the script.

I've modified it slightly so that (1) it has paging (2) displays images in descending date order.

http://www.shuttertalk.com/fotopholder.zip

Demo here: http://www.shuttertalk.com/forums/image … /index.php

and can you modify it to be "included" in punbb database members ?!

27

Re: attach image

Hi can someone tell me how to upload a picture to an img tag?

28 (edited by boneheade 2005-01-12 05:12)

Re: attach image

How do I check for a cookie in upload.php to make sure guests can't upload?

29

Re: attach image

i don't know in 1.2, but in 1.15 it was like this:

require 'config.php';
require 'include/common.php';
...
if ($cookie['is_guest']) message($lang_common['No permission']);

(as posted earlier)
this is assuming, that your upload.php is in your punbb-directory.

30 (edited by boneheade 2005-01-12 20:09)

Re: attach image

I've tried it many ways what I have is

<?php $pun_root = '../forum/';
require $pun_root.'config.php';
require $pun_root.'include/common.php';
$URL = "http://ravingatheist.com/forum/img/uploads/";
$maxsize = 153600; ?>
<html dir="ltr">
        <head>
            <title>Upload an Image</title>
            <link rel="stylesheet" type="text/css" href="../../style/Oxygen.css">
        </head>
        
        <body>
<table cellpadding="10" bgcolor="#ffffff" width="100%" height="100%" style="font-size: 12px; ">
<td valign="top">

<?php
    if ($cookie['is_guest']) message($lang_common['No permission']);
     if (isset($_POST['upload'])) 
    {

It doesn't work it says

Warning: main(../forum/config.php): failed to open stream: No such file or directory in /home/-------/public_html/forum/img/uploads/upload.php on line 2

I'm using punbb 1.2 btw.

31 (edited by bradl 2005-02-05 05:32)

Re: attach image

Neat. This almost works for me (using the cuteseal code). Files upload just fine, script reports out the IMG tag just fine. But ...  the post Preview and Submit buttons stop working. I'm using PunBB v 1.2.0. I'm very very new to PunBB. It's probably to do with where I pasted the script/form in post.php. I just try various places until it shows up. Where should it be, really? The line number mentioned above seemed to be in the middle of things so I suspect that line number was for a previous version of PunBB?

Update: Ok, well I found that I had to put the javascript bit outside the posting form. Seems out of place _below_ the Preview and Submit buttons, but hey, it works. Cheers

Re: attach image

Hooray!  Glad you like it...

I'm still running 1.14 on my boards, believe it or not big_smile

Digital photography news, reviews, discussions and more!
http://www.shuttertalk.com

The online bible for all
http://www.publicbible.com

33

Re: attach image

bradl: 

You can put the Upload button anywhere you want, but when you modify post.php just take out the <form> tags around your Upload button.  You can't have nested forms.

Now I'm trying to get the upload script to upload to a different directory based on the category of the post.  Does anyone know which variable will give me the category of the current post in post.php?

Re: attach image

Hrm I can't seem to get it to work .. I keep getting "no file selected" .. does the directory i specified not have the proper rights? Im an IIS User and i granted access for iwam and iusr.. and i change the variable for the url to the target directory that im going to.. anything else I need to do?

35

Re: attach image

It works great for me.. I like the lightness of it smile

Re: attach image

could I see your upload.php widell?

37

Re: attach image

Its in swedish, do u still wanna c?

38

Re: attach image

cuteseal wrote:

Hi all,

If you're using this script, I found a beautiful little script which you can drop into the image directory, and it'll let you browse the images.  Just change the title in the script.

I've modified it slightly so that (1) it has paging (2) displays images in descending date order.

http://www.shuttertalk.com/fotopholder.zip

Demo here: http://www.shuttertalk.com/forums/image … /index.php

I rather like that script so I've modified your script some smile If I can figure out how, I'm hoping to eventually build a more complete mod of it (that is, after i've studied some more PHP tongue).

What I've done with it so far (only worked on it for a day):
- XHTML 1.0 Strict valid code.
- Uses your currently selected PunBB CSS Stylesheet.
- PunBB header + nav bar.

Yeah I know it's not much, but I'm hoping to add more things as I've learnt a little more about PHP wink

[Download] [Demo]

*Note: For everything to work, there are 2 things that's important:
1. The folder you're using needs to be a subdirectory of your forum folder (e.g: <forum_directory>/gallery/)
2. The nav bar needs to use relative paths, else some of the links won't work while browsing the gallery.

39

Re: attach image

Catherine Bell is hot !

Nice script, we're taking PunBB where no man has gone before smile

40

Re: attach image

hcgtv wrote:

Catherine Bell is hot !

Nice script, we're taking PunBB where no man has gone before smile

That she is big_smile Happy that you like it...although, I've just changed a small part of it smile I'm just hoping that I'll manage to get everything I want implemented in the script.

41 (edited by Smartmonkey 2005-02-23 20:37)

Re: attach image

Nice.. that is a cool script..

for some reason I don't get any thumbnails.. everything else works fine..

Edit
Oh Wait.. I haven't installed gd library yet .. I assume that would be the problem since it resizes them

42

Re: attach image

Smartmonkey wrote:

Nice.. that is a cool script..

for some reason I don't get any thumbnails.. everything else works fine..

Edit
Oh Wait.. I haven't installed gd library yet .. I assume that would be the problem since it resizes them

Yeah, it requires GD to work smile

43

Re: attach image

It would be top to have less requests / clics ... I know I know ... you're fed up with my dhtml and dom vision sad ...