Topic: Extended Forum Access Mod 1.1 by Cactuz

##
##
##        Mod title:  Extended Forum Access Mod (EFAM)
##
##      Mod version:  1.1
##   Works on PunBB:  1.1.1
##     Release date:  2004-02-04
##           Author:  Kristoffer "Cactuz" Jansson (jansson@cactuz.nu)
##                    (updated by Rickard Andersson).
##
##      Description:  This mod extends the forum access down to the user
##                    level. This is how it works: First, "lock" a forum with
##                    the forum admin. Then you just have to add access to all
##                    users you want to give access to the forum in their
##                    profile.php.
## 
##   Affected files:  admin_forums.php
##                    post.php
##                    viewforum.php
##                    viewtopic.php
##                    profile.php
##
##       Affects DB:  Yes
##
##            Notes:  This mod has been updated to work with PunBB 1.1.1 by
##                    Rickard Andersson.
##
##                    Generated with ModGenerator (http://modgen.cactuz.nu/)
##                    on: 2004-02-04 22:22:27
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

I went through it and made some changes so that it will work with PunBB 1.1.1. The line numbers should be correct, but don't get your panties in a bunch if they are one row off in a place or two :)

Download it at Punres as usual: http://punres.cactuz.nu/?p=projects/desc&id=4

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

2

Re: Extended Forum Access Mod 1.1 by Cactuz

When the Guest user tries to access a restricted forum, I get this message:

Warning: Wrong datatype for first argument in call to array_key_exists in /web/foros/viewforum.php on line 69

That happens only with the guest account. Unauthorised accounts display the proper message, and authorized display the forum :-).

Marc

Re: Extended Forum Access Mod 1.1 by Cactuz

Ah, of course. Try this. Replace:

if($locked == '1' && $cur_user['status'] < 2 && !array_key_exists($cur_user['id'], $locked_users))

with

if($locked == '1' && $cur_user['status'] < 2 && !array_key_exists(intval($cur_user['id']), $locked_users))

Does that help?

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

4 (edited by MarcB 2004-02-13 17:48)

Re: Extended Forum Access Mod 1.1 by Cactuz

Hehe, you knew it would solve it ;-)

Thanks!

Marc
Addendum: now you can re-release it with v1.1.1, just like the very version of punBB that is suposed to work with wink

Re: Extended Forum Access Mod 1.1 by Cactuz

i can't download it sad
the link http://punres.cactuz.nu/download.php?id=35 is not working for me sad

6

Re: Extended Forum Access Mod 1.1 by Cactuz

Yep, since yesterday I can't DL anything from there. And just today was the forum available. I think they are moving and links might be broken temporarily...

Marc

Re: Extended Forum Access Mod 1.1 by Cactuz

unfortunately...
my forums will open tomorrow, would have been nice if i could implement that mod before i open the forums.
oh well.

Re: Extended Forum Access Mod 1.1 by Cactuz

Same here. I can download the picture, but the mod is missing smile Maybe someone can send it to me please? smile

9

Re: Extended Forum Access Mod 1.1 by Cactuz

Unfortunately this website doesn't support attachments ;-)
Send me your email and I'll send it to you, it's really a small file, and you'll have to correct what's already stated here.

Marc

Re: Extended Forum Access Mod 1.1 by Cactuz

Okay. taht works to smile starfish_aka@hotmail.com. but just be sure I will get it starfish@vipmail.hu. Thank you Marc

11

Re: Extended Forum Access Mod 1.1 by Cactuz

@Starfish: you've got email

@Jochem: who are the twin beauties? If you can spare a clone... I could do with her wink

Re: Extended Forum Access Mod 1.1 by Cactuz

Thank you. It was wise to give you both e-mails. Hotmail is on the edge again smile I didn't received the mail there. smile

13

Re: Extended Forum Access Mod 1.1 by Cactuz

Hehehe, next thing I'll search on google will be "open source webmail php mysql" ;-)

Marc

Re: Extended Forum Access Mod 1.1 by Cactuz

I was wondering if it is possible to write an e-mail server smile

15 (edited by jochem 2004-02-14 09:16)

Re: Extended Forum Access Mod 1.1 by Cactuz

MarcB: my email is jochem@dutcholsentwins.com , thank you smile

[offtopic]
oh and who those girls are? they are the Olsen Twins. Started acting when they were 9 months old in the sit-com Full House, and their new feature movie will soon be in theaters in the US smile it's called New York Minute.
poster:
http://www.dutcholsentwins.com/public_images/poster.jpg
[/offtopic]

16

Re: Extended Forum Access Mod 1.1 by Cactuz

Wow, they've certainly grown up... wouldn't have recognized them in a thousand years wink I remember the series, though... uncle Jesse was my favourite character, of course.

You have mail.

17

Re: Extended Forum Access Mod 1.1 by Cactuz

BTW, an email server per se, is not possible through php. You can however create a cgi script or something alike as your own email engine, but php has the sendmail function that allows you to send email provided the machine is running an smtp engine.
There are packages, though, and they need not be large files, some viruses incorporate their own smtp engine (on windows machines that allow raw sockets, AFAIK).

But there are indeed email frontends that allow you to check your email from an imap/pop server and to send emails. No need to reinvent the wheel wink

Marc

18

Re: Extended Forum Access Mod 1.1 by Cactuz

thanks for the email smile

Re: Extended Forum Access Mod 1.1 by Cactuz

Anyone who got this mod: Please contact me! I need it :p

Re: Extended Forum Access Mod 1.1 by Cactuz

^
|
|

He lost it!

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

Re: Extended Forum Access Mod 1.1 by Cactuz

Don't blame me... :p

Re: Extended Forum Access Mod 1.1 by Cactuz

Meilad wrote:

I don't know why it wasn't implemented into punbb itself...

Because it's a hack, not a permanent solution.

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

Re: Extended Forum Access Mod 1.1 by Cactuz

I mean it's an fast and ugly solution to a big problem.

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

24

Re: Extended Forum Access Mod 1.1 by Cactuz

http://xds.sugen.org/temp/EFAM-1.1.zip

Re: Extended Forum Access Mod 1.1 by Cactuz

The link is working now :)