Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
Allow Group to Read Titles / Not Content Details »»
Allow Group to Read Titles / Not Content
Version: 1.05, by Princeton Princeton is offline
Developer Last Online: Nov 2022 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 01-12-2004 Last Update: 05-24-2005 Installs: 146
 
No support by the author.

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:
Code:
// ================================================= \\
// == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ]
                 if (!($forumperms & GTPCANREADCONTENT)AND ($thread['postuserid'] != $bbuserinfo['userid']))
                 {
                     eval(print_standard_error('gtp_cannot_read'));
                 }
// == [ 00-00-2004 - GTP END ]
// ================================================= \\
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:
Code:
    // format thread preview if there is one
    if ($ignore["$thread[postuserid]"])
    {
        $thread['preview'] = '';
    }
    else if (isset($thread['preview']) AND $vboptions['threadpreview'] > 0)
    {
        $thread['preview'] = strip_quotes($thread['preview']);
        $thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($thread['preview'], false, true), $vboptions['threadpreview']));
    }
REPLACE IT WITH:
Code:
// ================================================= \\
// == [ ALLOW GROUP TO READ TITLE / NOT CONTENT - GTP BEGIN ]
    $forumperms = fetch_permissions($foruminfo['forumid']);
    // format thread preview if there is one
    if ($ignore["$thread[postuserid]"] OR !($forumperms & GTPCANREADCONTENT))
    {
        $thread['preview'] = '';
    }
    else if (isset($thread['preview']) AND $vboptions['threadpreview'] > 0)
    {
        $thread['preview'] = strip_quotes($thread['preview']);
        $thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($thread['preview'], false, true), $vboptions['threadpreview']));
    }
// == [ 00-00-2004 - GTP END ]
// ================================================= \\
[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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #162  
Old 12-30-2004, 01:33 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TLSNetwork
What am i missing here , if i try and set a usergrioup i get a mysql error: Unknown column 'gtpcanreadcontent' in 'field list'

Was i ment to run a query to create this ???

Duh never mind might help if i transfer init over
Undo what you just did and install the hack over again ... this time make sure you read the instructions carefully

Copy / Paste completely
REPLACE WITH / ADD BELOW
Reply With Quote
  #163  
Old 12-30-2004, 07:35 PM
mojo8850's Avatar
mojo8850 mojo8850 is offline
 
Join Date: Dec 2004
Location: UK, Yorkshire
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Friend's.. Im New Here.. :nervous:

Can Someone Tell Me Clearly On Where I Put This Code: -
I Know It's In /forum/forumdisplay.php

What I Dont Know Is Where I Place It Exactly ?

Quote:
<if condition="!($forumperms & GTPCANREADCONTENT)">
<h1>No, you can't read!</h1></if>
Also Is This Code Requied I Mean Do I Really Need This Code:..

I Also Want To Know I Have Been Reading These Posts On This Hack.. I've Donwloaded This Hack About 2 Days Ago, IS IT UP TO DATE WITH ALL THE BUGS HEALED..!

Another Problem I Have Is This, I Have Followed Instructions Clearly..
One Thing Is Wrong CHECK THE ATTACHMENT:

The Test Is'nt Showing..

Help Please..! :tired: :tired: :tired:
Reply With Quote
  #164  
Old 12-30-2004, 08:06 PM
amcd amcd is offline
 
Join Date: Oct 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your blank text problem in adminCP is bcos u have probably not added the phrase

I dont exactly understand your first problem, so cant help u there

IMHO, this is one of the best hacks i have come accross, and the instructions are very clear. Are u using 3.0.3 or some older version of vBulletin?
Reply With Quote
  #165  
Old 12-30-2004, 08:17 PM
mojo8850's Avatar
mojo8850 mojo8850 is offline
 
Join Date: Dec 2004
Location: UK, Yorkshire
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amcd
Your blank text problem in adminCP is bcos u have probably not added the phrase

I dont exactly understand your first problem, so cant help u there

IMHO, this is one of the best hacks i have come accross, and the instructions are very clear. Are u using 3.0.3 or some older version of vBulletin?
Ok..

I Want To Know Where I Exactly Place That CODE (IN QUTOES). In That File..
I Am Using 3.0.3..

Also Like You Just Said I NEED TO ADD THE PHRASE.
Exactly Where Do I Place It..
Reply With Quote
  #166  
Old 12-30-2004, 08:19 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mojo8850
Hi Friend's.. Im New Here.. :nervous:

Can Someone Tell Me Clearly On Where I Put This Code: -
I Know It's In /forum/forumdisplay.php

What I Dont Know Is Where I Place It Exactly ?



Also Is This Code Requied I Mean Do I Really Need This Code:..

I Also Want To Know I Have Been Reading These Posts On This Hack.. I've Donwloaded This Hack About 2 Days Ago, IS IT UP TO DATE WITH ALL THE BUGS HEALED..!

Another Problem I Have Is This, I Have Followed Instructions Clearly..
One Thing Is Wrong CHECK THE ATTACHMENT:

The Test Is'nt Showing..

Help Please..! :tired: :tired: :tired:
No, you do not need to use that piece of code ... it's only used for testing.

Yes, the instructions are up to date and this hack works flawlessly. Any problems are due because of errors done on installers end. For example, you have not installed the phrases for this hack.

Do not use any code found on previous posts.

Please follow instructions ...
If you need "personal" help I will gladly install the hack for a $20 donation (paypal link found in instructions)
Reply With Quote
  #167  
Old 12-30-2004, 08:20 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

to add phrases you need to go into your admincp / Languages & Phrases / Phrase Manager

click ADD NEW PHRASE
Reply With Quote
  #168  
Old 12-30-2004, 08:28 PM
mojo8850's Avatar
mojo8850 mojo8850 is offline
 
Join Date: Dec 2004
Location: UK, Yorkshire
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by princeton
to add phrases you need to go into your admincp / Languages & Phrases / Phrase Manager

click ADD NEW PHRASE
Ok..

What Do I Put In The Following Text Box's..

Phrase Type

Varname

Text

I'll Appreciate It..
Reply With Quote
  #169  
Old 12-30-2004, 08:32 PM
mojo8850's Avatar
mojo8850 mojo8850 is offline
 
Join Date: Dec 2004
Location: UK, Yorkshire
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I Think I've Sorted It...

Thankyou I Will Donate..
Reply With Quote
  #170  
Old 01-02-2005, 02:56 PM
lange's Avatar
lange lange is offline
 
Join Date: Apr 2003
Location: Montreal (Canada)
Posts: 282
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

This hack seems no more working with 3.0.3 + init.php patch (3.0.4).

I can't read the messages. I got the following merror message:

xxxxxxxx, you do not have permission to access this page. This could be due to one of several reasons:
Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.


Am I alone ?
Reply With Quote
  #171  
Old 01-02-2005, 03:50 PM
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Location: Vineland, NJ
Posts: 6,693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't yet upgraded to 3.0.4; but, I do not see anything in the new init.php file that will prevent this hack from working.

Do you have any other hacks installed? ie. any other modifications to init.php??
Please recheck and make sure you have not missed or deleted code that you should not have.


I noticed that you are an early installer of this hack ... make sure the BITFIELD is GTPCANREADCONTENT and not GTCANREADCONTENT (p missing). I recommend reinstalling this hack completely.

Place close attention to the REPLACE WITH or ADD BELOW ... many people are overwriting code when instructions say ADD BELOW.
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 05:56 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14927 seconds
  • Memory Usage 2,317KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete