Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Allow Group to Read Titles / Not Content Details »
Allow Group to Read Titles / Not Content
Mod Version: 1.05, by Princeton (Coder/Designer) Princeton is offline
Developer Last Online: Feb 2020 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.0.7 Rating: (3 votes - 5.00 average) Installs: 146
Released: 13 Jan 2004 Last Update: 25 May 2005 Downloads: 27
Not Supported  

Tested and working in 3.0.3 - 3.0.7

This hack will enable you to DISABLE SHOWTHREAD according to USERGROUP.This will allow all your members to view titles and topic counts found within a section. Think of it as "window shopping". Your members will be able to read all topics from the forumdisplay.php page but, will not be allowed to read it's content unless they have permission

The edits below will prevent anyone from viewing the contents of a post from within showthread, printthread, showpost, and archives.

This feature can be used on a per USERGROUP and /or per FORUM basis. You, as the admin, will have complete control.

You will need to modify:
  • includes/init.php
  • includes/adminfunctions_forums.php
  • admincp/resources.php
  • admincp/usergroup.php
  • showthread.php
  • archive/index.php
  • printthread.php
  • showpost.php
  • archive.css
Add 3 new phrases.
MOD VERSION 1.05
  • Fixed issues concerning the archives - eg. blank page was displayed ... now, thread links are viewable but not active (if not allowed).
MOD VERSION 1.01
  • now with personal NOT ALLOWED message
  • Easier to install
  • now add the ability to allow users to view their own posts/threads (view below code)
  • archive section changed to NOT display links to content that is not READABLE
  • added a message to archive section if user cannot read content
[hr=blue]4[/hr]
Allow User To View And Post Into Their Own Threads:
If you want to allow users to view and post their own threads and have access to them ... use this code in showthread, printhread, and showpost.php:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

NOTE: You may have to use "$threadinfo['postuserid]" on some of the pages.

[hr=blue]4[/hr]
Disable Thread Preview
To disable thread previews on forums that user cannot read content do the following edits:
FIND in functions/forumdisplay.php:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

REPLACE IT WITH:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

[hr=blue]4[/hr]
Example Of How Hack Works:
I have a forum with (sub-forums) ... however, one of the sub-forums is private (for PREMIUM members only). Here's how the settings would look like.

In USERGROUP MANAGER (this is a global setting) set "Group can read content?:
UNREGISTERED - YES
REGISTERED - YES
PREMIUM - YES

The global setting will be transferred to all forums; but, we have a sub-forum that is only for PREMIUM MEMBERS so...

In FORUM PERMISSIONS MANAGER set private forum to:
UNREGISTERED - NO
REGISTERED - NO
PREMIUM - YES

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	index.gif
Views:	973
Size:	7.6 KB
ID:	19639   Click image for larger version

Name:	forumdisplay.gif
Views:	932
Size:	7.6 KB
ID:	19640   Click image for larger version

Name:	showthread_granted.gif
Views:	996
Size:	9.5 KB
ID:	19641   Click image for larger version

Name:	showthread.gif
Views:	638
Size:	20.6 KB
ID:	23693  

Click image for larger version

Name:	noread_message.gif
Views:	410
Size:	10.4 KB
ID:	23694  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Allow users to self-censor thread titles and post content calorie vBulletin 3.5 Add-ons 45 10 May 2009 02:39

Comments
  #2  
Old 13 Jan 2004, 23:11
NTLDR's Avatar
NTLDR NTLDR is offline
 
Join Date: Apr 2002
Real name: Lee Botley, BSc (Hons)
Good to see proper use of bit fields

I'd just like to point out that quickly looking at this I can see three easy ways of getting around it: 1) Use print thread to view the entire thread without registering 2) use the archive to view the entire thread without registering 3) use threaded/hybrid mode if enabled. My apologies if any of the above 3 arn't true, but they all spring to mind after glancing at the code
__________________
Lee Botley, BSc (Hons) - vBulletin.org Moderator
http://www.thesistersthree.com/lee/sigs/signature.ts3
The Sisters Three Charmed Discussion Forums

WinterDir .:. vBindex v2.1 for vB2 .:. vBindex v3.0.0 RC5 for vB3
Reply With Quote
  #3  
Old 14 Jan 2004, 02:09
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
Originally Posted by NTLDR
Good to see proper use of bit fields

I'd just like to point out that quickly looking at this I can see three easy ways of getting around it: 1) Use print thread to view the entire thread without registering 2) use the archive to view the entire thread without registering 3) use threaded/hybrid mode if enabled. My apologies if any of the above 3 arn't true, but they all spring to mind after glancing at the code
thank you ... I completely forgot about the printthread and archives.
I have updated the file and instructions. The new version is v.1.2.

I do not use nor do I have access to thread/hybrid. (I completely removed the templates from my site.) This will have to be tested by someone who uses these features.

If anyone uses this hack can you confirm that it works?
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!

Last edited by Princeton; 15 Jan 2004 at 16:52.
Reply With Quote
  #4  
Old 14 Jan 2004, 03:34
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
What do we do if we have another hack installed already using that bit field? And can this be done on a per forum basis? There are a couple of forums I need left open for unregistered users to view the messages.
Reply With Quote
  #5  
Old 14 Jan 2004, 03:41
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
multiply the last bitfield value by 2 ... another way to look at it is add up all the previous numbers.

this is an inclusion to the existing permission system ... yes, you can use on a per forum basis. (that's the whole idea)

follow the direction on the file (last section)
Reply With Quote
  #6  
Old 14 Jan 2004, 03:58
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by princeton
multiply the last bitfield value by 2 ... another way to look at it is add up all the previous numbers.

this is an inclusion to the existing permission system ... yes, you can use on a per forum basis. (that's the whole idea)

follow the direction on the file (last section)
How high can the bit fields actually go then? Is there a limit?
Reply With Quote
  #7  
Old 14 Jan 2004, 11:32
NTLDR's Avatar
NTLDR NTLDR is offline
 
Join Date: Apr 2002
Real name: Lee Botley, BSc (Hons)
To prevent thread/hybrid and linear all with one edit just place the showthread.php block of code above:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That should work I think

@Boofo: I'd assume the limit is restricted by the upper limit that PHP can use on your platform (around 2147483647 for integers, no idea if it will work with floats as I haven't tested).
__________________
Lee Botley, BSc (Hons) - vBulletin.org Moderator
http://www.thesistersthree.com/lee/sigs/signature.ts3
The Sisters Three Charmed Discussion Forums

WinterDir .:. vBindex v2.1 for vB2 .:. vBindex v3.0.0 RC5 for vB3
Reply With Quote
  #8  
Old 14 Jan 2004, 13:27
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
Originally Posted by NTLDR
To prevent thread/hybrid and linear all with one edit just place the showthread.php block of code above:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

That should work I think

@Boofo: I'd assume the limit is restricted by the upper limit that PHP can use on your platform (around 2147483647 for integers, no idea if it will work with floats as I haven't tested).
duh! thank you. I don't know what I was thinking.

I just added the threaded/hybrid mode back onto my site and everything is working. I like how the hybrid mode looks like ... maybe I'll leave it as an option for my members.
Reply With Quote
  #9  
Old 14 Jan 2004, 14:09
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by NTLDR
@Boofo: I'd assume the limit is restricted by the upper limit that PHP can use on your platform (around 2147483647 for integers, no idea if it will work with floats as I haven't tested).
How would you use floats?
Reply With Quote
  #10  
Old 14 Jan 2004, 14:13
NTLDR's Avatar
NTLDR NTLDR is offline
 
Join Date: Apr 2002
Real name: Lee Botley, BSc (Hons)
If a int is to big to be an int then it automatically becomes a float
__________________
Lee Botley, BSc (Hons) - vBulletin.org Moderator
http://www.thesistersthree.com/lee/sigs/signature.ts3
The Sisters Three Charmed Discussion Forums

WinterDir .:. vBindex v2.1 for vB2 .:. vBindex v3.0.0 RC5 for vB3
Reply With Quote
  #11  
Old 14 Jan 2004, 15:34
Littlebit's Avatar
Littlebit Littlebit is offline
 
Join Date: Nov 2001
Bunny!

Thanks Princeton! I had just inquired about this very thing on vb.com! View Posts Usergroups Option

Installing now
__________________
"If you are squeamish/Don't prod the/beach rubble."-- Sappho, 7th Century BCE
Reply With Quote
  #12  
Old 14 Jan 2004, 20:35
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Real name: Marco
Jesus - it's too much hacking - is there any quicker way?
Reply With Quote
  #13  
Old 15 Jan 2004, 15:40
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
Originally Posted by gmarik
Jesus - it's too much hacking - is there any quicker way?
Yep, it's mostly one line edits. The archive, printthread, and showthread have to be modified for this to work as intended.

You can always take a short cut - do the first few steps and add a conditional into your postbit to allow GROUP. However, this defeats the purpose as the system will still query the database.

My goal is usability and optimization nothing less.
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!

Last edited by Princeton; 15 Jan 2004 at 16:52.
Reply With Quote
  #14  
Old 15 Jan 2004, 17:34
HiDeo's Avatar
HiDeo HiDeo is offline
 
Join Date: Oct 2003
Very good hack, I'll install soon
Reply With Quote
  #15  
Old 16 Jan 2004, 01:03
lange's Avatar
lange lange is offline
 
Join Date: Apr 2003
The Custom Permissions is not working for registred members.


By example, I can't get:

Can View Forum Yes

Can View Others' Threads Yes

Can See Deletion Notices Yes

Can Search Forum Yes

Can Use Email to Friend Yes

Can Download Attachments Yes

Post Permissions:
Can Post Threads No

Can Reply to Own Threads No

Can Reply to Others' Threads No

Always Moderate This Group's Posts No

Can Upload Attachments No

Can Rate Threads Yes

Group can read content? No (but I want 'Yes'. It is always enable to No)

Last edited by lange; 16 Jan 2004 at 02:13.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 11:21.

Layout Options | Width: Wide Color: