vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Restrict Guest Viewing Threads in a Forum (https://vborg.vbsupport.ru/showthread.php?t=32132)

Scott MacVicar 11-03-2001 10:00 PM

I'm actually suprised that you can't stop guests from viewing threads themselves in forum and the only solution is to stop them Viewing others and that includes the thread titles on forumdisplay.

This lets guests see threads made by someone else on the forumdisplay page but not the thread itself, they'll get a nice error telling them to register.

Can be enabled on a forum by forum basis within the forum options.

I use this for a member forum on my board and I would rather show a guest what the thread title is, instead of showing no title at all :)

amykhar 11-05-2001 02:26 AM

Firefly wrote one up that is a bit simpler. He posted it in the requests forum.

Amy

bokhalifa 11-05-2001 04:06 AM

good hack :)

Scott MacVicar 11-05-2001 06:07 AM

yeah i noticed but you need to edit the file to add more forums and i don't play to give out the ftp password to every admin :D

Lesane 11-05-2001 07:02 PM

Does this hack works in 2.0.3?

Scott MacVicar 11-05-2001 08:29 PM

yes should do

Lesane 11-06-2001 11:50 AM

I love this hack :), thanks for this great neat hack

supernut 11-06-2001 01:20 PM

when i go to change a forum to not allow guest view and save it, when i look back in admin its still turned on and all the posts they can still read ?

any advise what i may have done wrong ?

Lesane 11-06-2001 02:02 PM

Quote:

Originally posted by supernut
when i go to change a forum to not allow guest view and save it, when i look back in admin its still turned on and all the posts they can still read ?

any advise what i may have done wrong ?

Not 100% sure but i guess this in the /admin/forum.php file:
PHP Code:

a couple of lines below that look for
  
$DB_site->query("INSERT INTO forum
                      (forumid,styleid,title,description,active,displayorder,parentid,
                       parentlist,allowposting,cancontainthreads,daysprune,newpostemail,newthreademail,
                       moderatenew,allowhtml,allowbbcode,allowimages,allowsmilies,allowicons,
                       styleoverride,allowratings,countposts,moderateattach)
                   VALUES
                      (NULL,'
$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder','$parentid',
                       '','
$allowposting','$cancontainthreads','$daysprune','".addslashes($newpostemail)."','".addslashes($newthreademail)."',
                       '
$moderatenew','$aallowhtmlcode','$aallowbbcode','$aallowimgcode','$aallowsmilies','$aallowicons',
                       '
$styleoverride','$allowratings','$countposts','$moderateattach')");

change to
  $DB_site
->query("INSERT INTO forum
                      (forumid,styleid,title,description,active,displayorder,parentid,
                       parentlist,allowposting,cancontainthreads,daysprune,newpostemail,newthreademail,
                       moderatenew,allowhtml,allowbbcode,allowimages,allowsmilies,allowicons,
                       styleoverride,allowratings,countposts,moderateattach,allowguestpostview)
                   VALUES
                      (NULL,'
$styleset','".addslashes($title)."','".addslashes($description)."','$isactive','$displayorder','$parentid',
                       '','
$allowposting','$cancontainthreads','$daysprune','".addslashes($newpostemail)."','".addslashes($newthreademail)."',
                       '
$moderatenew','$aallowhtmlcode','$aallowbbcode','$aallowimgcode','$aallowsmilies','$aallowicons',
                       '
$styleoverride','$allowratings','$countposts','$moderateattach', '$allowguestpostview')"); 


supernut 11-06-2001 03:38 PM

re-installed and its still not working, i just cannot change the option in admin to stop guests viewing the posts

Lesane 11-06-2001 04:15 PM

Are you sure that you executed the SQL Query?

supernut 11-06-2001 04:32 PM

yes, that is all done, i have had it checked and its 100%

i found that problem

moderateattach='$moderateattach'

i did not put the correct part after and added the same thing 2 time, so now its saving ok, but guests can still read the posts ?

supernut 11-06-2001 04:49 PM

got it working... thanks for the help

Nam 11-11-2001 10:25 PM

am I doing this right? I got this hack worked, but everytime I change the forum description, it creates a duplicate forum, force me to mass move topic from the old one to the new one just for description change. Is that suppose to happen if you use this hack?

SgtSling 11-12-2001 05:30 AM

I got it working

Will this drain my server at all?

Scott MacVicar 11-12-2001 06:18 AM

Nam i belive you have an INSERT query where it should be an update query make sure you followed the instructions correctly.

Nam 11-13-2001 09:39 PM

I did what the instruction says:

ALTER TABLE `forum` ADD `allowguestpostview` SMALLINT(6) DEFAULT '1' NOT NULL

May be I did something wrong, I'm very dumb in PHP stuff, only know "copy and paste" command when install hacks. So please tell me how to change (remove) that query out using PHPMyAdmin?

Everytime when I change the forum description, it automatically create a duplicated one, I had to do mass topic moving alot, it's really tired. Please help, thanks a lot.

And btw, I love this hack, it's a great hack for a new forum, the traffic and member joining are increasing fast. Thanks.

Scott MacVicar 11-14-2001 06:31 AM

make sure on line 1498 of /admin/forum.php looks like

PHP Code:

  $DB_site->query("UPDATE forum SET replycount='$numberposts',threadcount='$numberthreads',lastpost='$lastpost',lastposter='".addslashes(htmlspecialchars($lastposter))."',lasttitle='".addslashes(htmlspecialchars($lasttitle))."' WHERE forumid='$forumid'"); 

I'm sure at this point you have an INSERT query where it should be the update one above.

Nam 11-14-2001 07:12 AM

Sorry, my file has only 550 lines, were you talking about double lines? I did try to search it carefully but couldn't find the line you told me.

Here is my admin/forum.php file, please check it for me too see if anything wrong, there was nothing like what you've told me. Thanks a lot.

Scott MacVicar 11-14-2001 03:04 PM

ok em sorted you had added the insert query into the doupdate part of the file.

Just reload this to the admin directory.

Scott

Nam 11-14-2001 07:35 PM

You're great PPN, thank you so so much.

I compared 2 files and saw that you've changed much of it, without you changing it, no way I could modify it myself.

Thanks again,

kanima 11-30-2001 08:15 PM

here is what i get when trying ot make a new forum after adding hack, so what is wrong ???


Database error in vBulletin Control Panel 2.2.1:

Invalid SQL: INSERT INTO forum
(forumid,styleid,title,description,active,displayo rder,parentid,
parentlist,allowposting,cancontainthreads,daysprun e,newpostemail,newthreademail,
moderatenew,allowhtml,allowbbcode,allowimages,allo wsmilies,allowicons,
styleoverride,allowratings,countposts,moderateatta ch,allowguestpostview)
VALUES
(NULL,'1','Request to join-|TKP|-','All your joining request go here.','1','1','-1',
'','1','1','30','dstinson@troycable.net','',
'1','0','1','0','1','1',
'0','1','1','0','1')
mysql error: Unknown column 'allowguestpostview' in 'field list'

mysql error number: 1054

Date: Friday 30th of November 2001 04:31:00 PM
Script: http://www.ip-subspace.com/forum/forum/admin/forum.php
Referer: http://www.ip-subspace.com/forum/adm...php?action=add

kanima 11-30-2001 09:32 PM

NeverMind

Too used to Perl and all teh #### at top
that i don't read lol

Marc T Smith 12-01-2001 06:54 PM

Quote:

Originally posted by PPN

ok em sorted you had added the insert query into the doupdate part of the file.

Just reload this to the admin directory.

Scott
So - if I run the SQL query via phpmyadmin as prep:

ALTER TABLE `forum` ADD `allowguestpostview` SMALLINT(6) DEFAULT '1' NOT NULL

And then upload the file you posted for Nam (which is essentially forum.php already hacked), it will work.

Is this correct?

Scott MacVicar 12-02-2001 08:59 AM

won't advise it, i'm sure that was for version 2.2.0 and the latest is 2.2.1, the hack isn't hard to install so it would be simplier for you just to copy and paste.

kanima 12-03-2001 08:01 PM

Got the No view working, but it is not putting up the resigter page for guest to view ideas ?

frozt 03-25-2002 06:54 PM

Great hack!

xug 03-27-2002 06:33 PM

I have this hack installed and had no problems with it, see no errors etc.

But if I go to my Who's Online page I still see people browsing threads!

How is this possible?

Scott MacVicar 03-27-2002 10:50 PM

This has been addressed on vBulletin.com, I can't remember specific details but if they try to view the thread, it puts the page their at still into the session table which will give you the opinion that their viewing the thread.
Though all their viewing is the no permission page.

xug 03-27-2002 11:09 PM

Ok, than it must be all ok, because when I logged off and entered my site as guest I didn't see anything and thought maybe they have still some tricks to get in!

Wow, i'm happy now!

Thanks PPN for the fast reply.

Keep up the great work.

Okiewan 03-28-2002 03:06 PM

Yet another great -useful- hack! Thanks for sharing it.
Got it installed without a hitch, nice work.

Question...

I have a couple levels of members. There are private forums for "level 2" members... I'd like to allow guests to see the forum/threads, and get the error template, but a different one.

Regular forums: "sorry you'll need to be a member, join here"
Level 2 forums:" sorry, you need to be a level 2 member, join here"

Would this be difficult? My "level 2 " members pay a subscription for access to additional forums, would entice regular members to subscribe if they see the threads but not be able to read them :)

Thanks again for the hack!

Okiewan 03-28-2002 04:37 PM

One more Q.
Does this effect only "guests" or everyone that is not registered?
Meaning, can users awaiting email conf. read the threads?

Scott MacVicar 04-09-2002 06:18 AM

Anyone that is not logged in will be unable to see the threads.

There is nothing within the code which requires you to adjust that line which is giving you the error sammy, did you apply any other hacks while doing this one?

sammy22 04-13-2002 02:35 AM

ok, i changes the two php files, uploaded them, then i ran the query from my server control panel, and guests can still read threads? do i have to turn it off in the cpanel some where?

is there a radio botton i have to click? please help

thank you.

Scott MacVicar 04-13-2002 09:56 AM

You'll find a new option if you go to modify forums and click edit you will have a new radio button to let you select if guests can view threads.

Twig Deez 04-13-2002 12:26 PM

i'm unsure how i ever missed this; but now that i've seen it, installed it,
and noticed it's working perfectly, i would just like to say thanks.

thanks! :beard:

sammy22 04-13-2002 11:14 PM

ok, i re installed, it, no errors, but the guests can still see the board...... i have tried to install this 30 times.

i am on ver 2.2.5

what gives?

Scott MacVicar 04-13-2002 11:16 PM

this is designed to stop guests viewing a particular forum, not the board.

PM me your board url and i'll have a look at it.

sammy22 04-13-2002 11:20 PM

so in the query do i need to add a board "number"

like my main board is #3 for example, i need to add 3 in the query is this whats going on?

u have PM, thanks

sammy22 04-13-2002 11:27 PM

Quote:

Originally posted by PPN
You'll find a new option if you go to modify forums and click edit you will have a new radio button to let you select if guests can view threads.

Allow guests to view posts?
[ ]Yes[*]No

no is checked. yet they still see the forum... AHHH lol


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01314 seconds
  • Memory Usage 1,835KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete