Just an idea (I don't know anything about coding so it could be irrelevant)..

You gave me a fix to overcome the problem with guests access to attachments

I don't suppose this could in any way affect admin rights to post attachments in edits?

I've emailed the actual dwf file we had problems with (although the file itself is fine).
btw: just incase you don't know a .dwf file is an autocad drawing saved in a format for the web.

Frank H wrote:

was it you that I sent the 'clean attachment mod' to (zipped)?

I haven't received anything.. unless you mean the stuff you sent me a month ago when I pointed out the problem with guests posting..

The file certainly wasn't too big. I ended up quoting the original poster and attaching to that. It worked OK doing it that way but wouldn't let me attach when editing a post (I tried 6 or 7 times).
Anyway, it's done now.

I've just tried editing several user's postings and it won't let me attach to any of them.
You said you edited a 'guest' posting but my forum is set to deny guests access to attachments for security reasons - don't want unregistered users attaching all sorts of crap!

Second Edit:
Just so as I know I'm not doing things wrong, if anyone else has the attachment mod set up would you please try something for me?
Log in as administrator, edit a topic posted by a registered user and, while doing so, attach a file.
Please let me know your results.


I had the files empty because I wanted to allow all except those banned. It would not allow .dwf files to be attached (we had to zip it and then attach it).
I prefer to leave files empty because I would probably forget to include a type that someone was trying to upload.
What do you mean by mime? How do I find out what mime type?

BTW: I just tried to edit a posting while logged in as administrator. I wanted to add an attachment but it wouldn't let me. Is this intentional (cannot add attachment to someone elses post even if administrator) or is it a glitch?

Frank H

The site I run requires that AutoCAD file types .dwg, .dxf and .dwf can be uploaded. How do I add these (I assume it means adding them to attach.php)?


(3 replies, posted in PunBB 1.2 troubleshooting)

Ah well, can't win them all...
Next question:
How can I include a link in one topic to another that opens in the same window and not as a blank page?


(3 replies, posted in PunBB 1.2 troubleshooting)

I understand how to move a topic but is there a way that I can move a single posting from one topic to another if I feel it's in the wrong place?

Thanks Frank
I've modified files and everything works fine now.
Guests cannot now see attachments.

Well done. Imagine how the guys at Microsoft feel with all their problems !!

Frank H wrote:

do the guests see the attachment in viewtopic.php?
can they download the attachment through attachment.php?
even though they aren't allowed to?

... check the boxes you've set and these values so they are correct, then we probably can rule out some stuff ...  smile

Guests can see attachments in viewtopic and they can download.

In table 'punbb_attach_rules' all values are set to 238 which is correct (allow upload/download by all except guests)

What next?

a link to YOUR site would be nice so we could view it..
unless, of course, the aim is to promote the link shown?   wink

Thanks Frank.

I think the problem in viewtopic may have been because I have attachment mod and punpoll mod installed. Both require viewtopic.php amending and it gets confusing because line numbers change when the first mod is installed. Anyway, I've now got attachments to display and download.

My next problem is when attachment rules are set to 'deny guest' it still allows a guest to download. Which file do I need to check to resolve this?

Frank H wrote:

ok, then there's probably something that's missed in the installation or upload of scripts ... it's 50 steps, so the possibility for errors is not that small wink

in viewtopic.php
or that the securitycheck isn't functional as it should (include\attach.php)

if you want to I can zip the testforum I made for when I remade the script for PunBB 1.1.1, so you can compare (if you have modded the forum)

Please. Send to:

Frank H wrote:

strange, and for you as admin you can up and download files without trouble?

Yes - but only by going into Admin/Attachments

Even when logged in as admin I can't see any files when I view the topics

Forum was set to allow Admins,Moderators and registered users to upload/download.
Allowed files was left empty (i.e. All but always denied). I've changed this and added the file extensions which were submitted (bmp & dvb) and even tried entering them as bmp and .bmp, etc but they still dont show up.

I have attachment mod installed and it allows users to place attachments without a problem. Only thing is, when someone else logs in to forum they can't see anything to allow them to download the attachment.

This link demonstrates what I mean. If I log in as admin I can download file but other users can't see it. Login as PunBB password PunBB to see what I mean.


(18 replies, posted in PunBB 1.2 troubleshooting)

Oh, My God!
I've more chance of learning Russian, Chinese, etc. etc. ...

So. What do I do? Keep using @include?


(18 replies, posted in PunBB 1.2 troubleshooting)

Rickard wrote:

JohnS: If it can't find the file at all, you would get a different error message, so the path is most likely correct.

What PHP versions are you using?

Zend Engine V.1.3.0
Zend Optimizer V.2.1.0
PHP V.4.3.2

BTW: I've used @include with the full url (as Paul suggested) and it now works fine but it does seem strange why I can't just use a relative path...

I've more chance of understanding Swedish than coding :x


(18 replies, posted in PunBB 1.2 troubleshooting)

Copied from the topic I started in Show Offs...

I've tried full url, absolute path and relative path but all with errors.

The include I use for right margin is in a directory htdocs/includes/
and my forum is in a directory htdocs/forum/

Because right margin is included into root files the relative path I specify is forum/extern.php

So confusing!


(35 replies, posted in PunBB 1.2 show off)

Paul wrote:

I think I will start a new topic "Need help with extern.php" because I am interested in getting some answers as well.

Good idea - this topic is getting rather long now and deviating from its original!

BTW: I've tried full url, absolute path and relative path but all with errors.

Come on Rickard - it works on your site - give us a clue  wink


(35 replies, posted in PunBB 1.2 show off)

Paul wrote:

I always use the full url which invariably puts things right.

I've tried the full url but still get same error  sad


(35 replies, posted in PunBB 1.2 show off)

Thanx. Did not realise there was an explanation within the file!

Slight problem though...
The right hand column on my site is an include (xtc_right_bar.php). Within this I've placed another include calling forum/extern.php

I get a list of topics displayed but with the following error message above them...

Warning: main(): stream does not support seeking in /includes/xtc_right_bar.php on line 44

Should I be calling the full url of extern.php or just its relative path or is the problem with having an include within an include?


(20 replies, posted in PunBB 1.2 discussion)

Rickard wrote:

Yes, I will.



(35 replies, posted in PunBB 1.2 show off)

Paul wrote:

it provides the relevant data depending on the paramenter that was used to call it.

Elaborate please, Paul.
How would you call extern.php to get the display shown on PunBB?


(35 replies, posted in PunBB 1.2 show off)

Hey Rickard
I like the feature on PunBB site which shows recent discussions. I'd like to place something like that on my site's main index page.
How do you do it?