PunBB Resource

Your ultimate PunBB resource!

Keywords:

    (Extended)

You are not logged in.

#1 2007-08-22 00:52:44

fantasy007
New member
Registered: 2007-08-11
Posts: 3

Show forums but can't come in

Hi all !

I would like to do this with my forum.....

- You can see all the forums, But you can't come in...


example: (the unregisted user) he can see the topics, BUT HE CAN'T READ or OPEN them...


Please help me out with this....
should be easy, i think

Offline

 

#2 2007-09-05 21:26:41

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

up

Offline

 

#3 2007-09-07 15:06:53

PhaxeNor
Member
From: Askim, Norway
Registered: 2007-05-21
Posts: 103
Website

Re: Show forums but can't come in

Just put your settings on guests to

Then open viewtopic.php

and add this line

Code:

if ($pun_user['is_guest'])
    message($lang_common['No view']);

after

Code:

if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);

You can also change the message that the person gets when browsing the topics..
Just change ($lang_common['No view']) with ('Your message here')


Dont know if this is what you want, but it works for me


http://punlancer.com/punlancer.png

Offline

 

#4 2007-09-12 11:36:32

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

and if you want that normal members can see all forums but not read or enter to any? change is_guest to? is_member not is in viewtopic, (i want that normal members can see all forums but no read any, special members group yes) thanks

Last edited by selce (2007-09-12 12:29:11)

Offline

 

#5 2007-09-30 14:02:21

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

any idea?

Offline

 

#6 2007-09-30 15:18:36

utchin
Member
Registered: 2007-08-07
Posts: 161

Re: Show forums but can't come in

selce wrote:

any idea?

i guess you could do a thing if they are guest edit the forum and show them, but have no links else the normal thing.

Offline

 

#7 2007-10-22 10:42:49

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

Hi utchin, i tryed this but not work.

example, punnresource forums have

- mod disussion (1)
- mod request (2)
- mod released (3)

How I can make for guest and members can SEE FORUM LIST but ONLY ENTER in (1),(2) and NOT ENTER in (3) --> not see post in 3

Last edited by selce (2008-06-03 17:34:04)

Offline

 

#8 2007-10-22 11:01:07

utchin
Member
Registered: 2007-08-07
Posts: 161

Re: Show forums but can't come in

you could add a new table to the database catagorys and have it to set if guests can enter. then do

Code:

<?php if ($curcat['guestview'] == '0') {echo 'no access';} ;?>

???

Offline

 

#9 2007-11-13 13:27:49

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

umm and where i put this code? and how add new table to the database categorys? sorry

Offline

 

#10 2008-01-16 16:53:57

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

up, how to configure #7?

Last edited by selce (2008-01-16 16:54:17)

Offline

 

#11 2008-01-16 19:03:43

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Show forums but can't come in

So you want to show all the forums in the listing but you don't want anyone to read them?

Try this:

Open up index.php and find:

Code:

$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

REPLACE WITH

Code:

$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

Not tested though.


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#12 2008-01-17 12:37:53

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

i tryed this and work but... i want this function as in phpbb forum permission

View - The user (or user group) may see the forum on the forum index page but no read the post

image edited example http://xs.to/xs.php?h=xs123&d=08034 … gen672.jpg

Last edited by selce (2008-01-17 12:40:53)

Offline

 

#13 2008-01-17 19:52:53

elbekko
Moderator
From: Leuven, Belgium
Registered: 2006-01-31
Posts: 1353

Re: Show forums but can't come in

That'd need a somewhat more extensive modification.


FluxBB
dictionary.com on programming: The most fun you can have with your clothes on (although clothes are not mandatory).

Offline

 

#14 2008-06-03 17:31:35

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

any new idea for post #7?

Last edited by selce (2008-06-03 17:32:10)

Offline

 

#15 2008-12-01 16:38:10

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

anyone can make it?

Offline

 

#16 2008-12-01 18:05:28

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

I found a solution to show all forums in index and not see topics if user group don't have permission (similar to phpbb view forum option), i dont know how secure is it

open index.php and search

Code:

$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

change to

Code:

$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 OR fp.read_forum=0 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

Now it say 'Bad request' when user group don't have permission to see private forum, I need to change message to 'No permission' in this case...

Offline

 

#17 2008-12-06 11:32:04

twohawks
Member
From: Nevada, USA
Registered: 2006-09-21
Posts: 237

Re: Show forums but can't come in

I didn't look close at this, but be sure to test by typing some topic and forum links directly in the url to see if you can bypass it.  I am not an expert, but I think it is good to mention this.


TwoHawks
Love is the Function
No Form is the Tool

Offline

 

#18 2008-12-14 16:43:30

selce
Member
Registered: 2007-09-05
Posts: 13

Re: Show forums but can't come in

hi, I checked it and not bypass

Offline

 

Board footer

Based on PunBB
© Copyright 2002–2005 Rickard Andersson

© Copyright 2004–2006 Kristoffer Jansson

User contributed files are property of their respective owners.