PDA

View Full Version : Question about PHPBB feature



Magic2K2
July 19th, 2001, 20:24
Is it possible in PHPBB to allow users to only post replies in a forum, but to not be able to start new topics. I have tried to figure out a way and I haven't been able to. I think I may have to modify the actual code which wouldn't be pretty. If anybody has any suggestions, let me know.

I am trying to do this because I have a news script that automatically creates a topic in this forum for each news story and I want users to comment on it. Obviously, I don't want them making up news stories though as new topics. Thanks.

lucifer
July 20th, 2001, 05:27
can't you just remove the button/link to add a new topic - people could get round it but only if they really wanted to which most people wouldn't

meow
July 20th, 2001, 05:38
:p*

lucifer
July 20th, 2001, 05:49
:cool: *

Magic2K2
July 20th, 2001, 07:40
I could do that, but I also have other forums that I do want to allow people to start topics in.

lucifer
July 20th, 2001, 08:34
just don't include the button when it's the news forum. It'll be really easy. I don't know phpbb so I'm not sure the file(s) to change. if the "template" file allows php it'd be soooo easy :)

Magic2K2
July 20th, 2001, 08:48
I haven't looked at the code, but I don't think it'll be as easy as it seems. The thing tracks forums by their ID. Right now the News forum is #5, but that will change when I add other forums. I'll look at the code tonight though.

lucifer
July 20th, 2001, 09:08
just had a quick look

look for


<a href="<?php echo $url_phpbb?>/newtopic.<?php echo $phpEx ?>?forum=<?php echo $forum?>">
<IMG SRC="<?php echo $newtopic_image?>" BORDER="0"></a>

and change to


<?php if($forum!=5){?><a href="<?php echo $url_phpbb?>/newtopic.<?php echo $phpEx ?>?forum=<?php echo $forum?>">
<IMG SRC="<?php echo $newtopic_image?>" BORDER="0"></a><?php } ?>

it's in page_header.php and proberbly some other places

Magic2K2
July 20th, 2001, 09:47
Actually, for added functionality, I think I'll add a field to the forums table called "allow_topics" and have a 1 or 0 value. Then, right before the code you are talking about, I'll run a query. That way it won't matter if that forum is not always #5. Thanks for your help.

niv
July 20th, 2001, 11:47
users as in registered or anonymous? :confused:

there's a check for that.

Magic2K2
July 20th, 2001, 12:46
Only registered users will be able to post replies. I can set that in the Admin section.

niv
July 20th, 2001, 13:06
so only have special users make new threads? use an if else structure :p

roblev
July 20th, 2001, 13:10
did you know this thread would never of been posted if vBulletin was used??:D

Magic2K2
July 20th, 2001, 13:19
Originally posted by roblev
did you know this thread would never of been posted if vBulletin was used??:D

Care to send me $160??

gyrbo
July 22nd, 2001, 11:27
OMG, you are all wrong, I used that a while ago, should install it again. It's in the reply and newtopic code. I don't know the exact code, but just look oon the phpBB forums.

Magic2K2
July 22nd, 2001, 17:26
It's done. If somebody really wants to, they can add a new topic, but that shouldn't be a problem. I can just ban them if they do.