The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Allow Group to Read Titles / Not Content Details »» | |||||||||||||||||||||||||||
Allow Group to Read Titles / Not Content
Developer Last Online: Nov 2022
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:
MOD VERSION 1.05
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 ] // ================================================= \\ [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'])); } 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 ] // ================================================= \\ 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
|
Comments |
#222
|
|||
|
|||
great hack, though I would suggest making "Yes" the default setting instead of "No." This locked everyone out of my forums while I found all the other permissions.
|
#223
|
|||
|
|||
Well this is what Ive been looking for and have a couple quick questions...
The main reason I have wanted this is Ive noticed Google has crwaled the thread titles within our forums and obiviosly cannot see the ones that are closed to guests. Ive wanted to not only allow guests to see the tiltles but also for Google to crawl them as does with the other forums currently open to guests although I cannot have/allow guests to read them so this seems the perfect sloution and great in addition for the window shopping also. So then the question is simple will it allow Google to crawl the titles as it does now with the other forum that are open to guests then. Also any difference to this http://www.vbulletin.com/forum/showthread.php?t=110119 |
#224
|
||||
|
||||
This hack will not allow google to crawl the thread content ... you will need to modify it.
The reason why I have not done so nor will I support it is because you can be banned by Google for such practice. Also, if Google can view it everyone else can view it--if they know what they are doing. Allowing Google to crawl the contents of thread is as easy as adding an if/else statement. Yes, this feature will be available on vb 3.5 as far as I can tell. |
#225
|
|||
|
|||
Actually I dont want Google to crawl the thread content.
I only want Google to crawl the titles/forum not content. |
#226
|
||||
|
||||
LOL, sorry -- yes, this is exactly what you need
|
#227
|
|||
|
|||
Notes about installing in vb 3.0.7. I'm pretty sure none of these were changed by any previous mods.
In includes/init.php 'canseedelnotice' => 262144 has an extra comma. 'canseedelnotice' => 262144, In archive/index.php if (!($forumperms & CANVIEW) OR !($forumperms & CANVIEWOTHERS) OR in_coventry($threadinfo['postuserid']) OR $threadinfo['isdeleted']) has become if (!($forumperms & CANVIEW) OR !($forumperms & CANVIEWOTHERS) OR in_coventry($threadinfo['postuserid']) OR $threadinfo['isdeleted'] OR !$threadinfo['visible']) echo "\t<li><a href=\"" . (!slash_method ? 'index.php?' : '') . "t-$thread[threadid].html\">$thread[title]</a>" . iif($pda, " <i>(" . construct_phrase($vbphrase['x_replies'], $thread['replycount']) . ")</i>") . "</li>\n"; has become echo "\t<li><a href=\"" . (!SLASH_METHOD ? 'index.php?' : '') . "t-$thread[threadid].html\">$thread[title]</a>" . iif($pda, " <i>(" . construct_phrase($vbphrase['x_replies'], $thread['replycount']) . ")</i>") . "</li>\n"; |
#228
|
||||
|
||||
Quote:
I will add your changes as soon as possible. thank you |
#229
|
|||
|
|||
Quote:
Incidently, the instructions in the zip file lists archive/global.php as one of the files to modify, but there are no detailed instructions to do that. Thanks for putting all that work on this mod. |
#230
|
||||
|
||||
you have made an error ... go back and make sure you have not copied/pasted over code that you shouldn't have--this is where everyone has problems
I will upload the new instructions for 3.0.7 by tomorrow night -- the changes are small but sometimes the small things can drive you crazy |
#231
|
||||
|
||||
you mean ... like this: https://vborg.vbsupport.ru/archive/index.php/f-33.html
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|