Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic View Topic/Subject title, but not post? (Read 3288 times)
MycoMan
New Member
*
Offline


I Love YaBB 2!

Posts: 3
Joined: Oct 5th, 2010
View Topic/Subject title, but not post?
Oct 5th, 2010 at 9:54pm
Print Post  
[I originally posted the following in the "Programming & Coding Board," but, upon further review, this looks like it might be a better place. Sorry about the cross post. Thanks.]


Hello,

Capt. John (at yabbforum.com) sent me here, from this thread:

yabbforum.com/community/YaBB.pl?num=1286217933

(it won't me link... too new... "bloody novice")

Where I write:

- - -
I would like unregistered guests to see the titles of a "Subject" or "Topic" but not be able to see the post when they click on the title.

So, for example, in this case, an unregistered would be able to see the title of this post:

"View Topic/Subject title, but not post"

But not the content here.
- - -

He said that Yabb currently doesn't allow that, then, when I asked if I could modify the code somehow so it would show just the title, but not the post, he sent me here.

So, I'm kind of a fish out of water here.

I looked around a bit, but I'm not quite sure what I'm looking for (or if this is even the correct board to post this question)

Does anyone know how/IF I can make that happen?

Maybe this issue's been addressed before?

Is there a quick cut-and-paste piece of code, or something?

Much thanks!
  
Back to top
 
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: View Topic/Subject title, but not post?
Reply #1 - Oct 7th, 2010 at 9:57am
Print Post  
Hi MycoMan,

yes you can alter alter the code to allow guests to see the message index but not the actual posts. First, change the settings for the board you'd like to restrict access to: set all the member groups which should be allowed to view in the "Allowed to view topics" setting.

By default, you will now no longer be able to see neither the message index nor topics in that board as a guest. You will see an error message like "You are not allowed to access this section.". Now to suppress this error message for the message index view, you can completely disable the access check for the message index:

open Sources\MessageIndex.pl and remove this line:
Code
Select All
if (&AccessCheck($currentboard, '', $boardperms) ne "granted") { &fatal_error("no_access"); } 



That should do the trick. Keep in mind though that this will lift restrictions for ANY board you have.
  

The Administrator.
Back to top
WWW  
IP Logged
 
MycoMan
New Member
*
Offline


I Love YaBB 2!

Posts: 3
Joined: Oct 5th, 2010
Re: View Topic/Subject title, but not post?
Reply #2 - Oct 8th, 2010 at 12:36am
Print Post  
Michael,

You ARE a "Mod God!"

That worked beautifully.

If you're ever on the central coast of California, I owe you beer.

Awesome job!
  
Back to top
 
IP Logged
 
winwalk
New Member
*
Offline


I Love YaBB 2!

Posts: 1
Joined: Jun 21st, 2011
Re: View Topic/Subject title, but not post?
Reply #3 - Jun 21st, 2011 at 6:08pm
Print Post  
Hello everyone ^^"
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint