Version: , by Lukman (Guest)
Developer Last Online: Jan 1970
Version: Unknown
Rating:
Released: 07-09-2001
Last Update: Never
Installs: 0
No support by the author.
One of the 9 forums on my board is very popular amongst all. In order to increase board registrations I have thought of an idea.. which is when non registered/not logged in users click it to see all the threads -they are faced with a 'not logged in enter user name and password screen' ( that defualt vbulletin one)
OK now heres the prob...
I went to cp > user groups and permissions > modify forums
and I saw all my forums listed and I clicked the 'unregistered/not logged in' link for this particular forum
I selected 'no' for the first one which was 'can view forum' - I logged out and refreshed only to find out my forum wasnt there no more! I assumed I would see the forum - when I click on it to view the threads , I wouldbe faced with a 'not logged in/sign upnow screen!
I then went back to cp - selected yes instead for 'can view forum' and selected 'no' for cant view threads' thinking this might do the trick- after refreshing I now see a forum but no threads.
Anyone got any ideas on how I can get round this? All I want is when nomn registered/not logged in members click this particular forum they are faced with a 'not logged in/sign up' screen!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I then went back to cp - selected yes instead for 'can view forum' and selected 'no' for cant view threads' thinking this might do the trick- after refreshing I now see a forum but no threads.
-that doesnt bring up 'login page' - by setting the option to 'no' for 'cant view threads' just makes the threads invisible for non registered/notlogged in users.
No, unfortunately this would take a hack. I helped VirtueTech (I believe) with something like this a while ago (it's just a matter of adding one line to forumdisplay.php IIRC), but I'm not at my home computer right now.
I'll move this down to hacking and try to answer it when I get home.
Here is the conversation Tubedogg and I had on AIM. I have censored Tubedogg's AIM handle for his privacy:
I also have the HTML file of this conversation attached that is color coded so that you can differentiate the conversation better. Just change the file name extension to .html and open it up in IE
Quote:
VirtueTek (12:31:34 AM): hey
VirtueTek (12:31:40 AM): How are you?
TUBEDOGG (12:31:42 AM): hi
TUBEDOGG (12:31:44 AM): ok
TUBEDOGG (12:31:49 AM): you?
VirtueTek (12:31:50 AM): I was hoping you could help me out for a second
VirtueTek (12:31:52 AM): good
VirtueTek (12:31:54 AM): http://www.vbulletin.com/forum/showt...c12b1d406bb8cc 786a&threadid=21696
TUBEDOGG (12:34:01 AM): so you want another permission for showthread?
VirtueTek (12:34:27 AM): I guess so....basically I want them to see the forumdisplay...but not be able to read the posts
VirtueTek (12:35:17 AM): it would then go to the non-permissions page
TUBEDOGG (12:35:18 AM): couldn't you set "can view others threads" to no?
VirtueTek (12:35:25 AM): I did
VirtueTek (12:35:30 AM): and it shuts down the forum display
TUBEDOGG (12:35:45 AM): weird
VirtueTek (12:35:48 AM): it doesn't let the user who has no permission to see the thread title and such
VirtueTek (12:35:52 AM): I thought so too
TUBEDOGG (12:36:54 AM): ok here we go. in showthread.php, find
TUBEDOGG (12:36:55 AM): if (!$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
show_nopermission();
}
TUBEDOGG (12:36:58 AM): and add right under it
TUBEDOGG (12:37:07 AM): if (!$getperms['canviewposts']) {
show_nopermission();
}
TUBEDOGG (12:37:08 AM): then
TUBEDOGG (12:37:29 AM): add a field to the usergroup table called
TUBEDOGG (12:37:31 AM): canviewposts
TUBEDOGG (12:38:13 AM): then in admin/usergroup.php
TUBEDOGG (12:38:24 AM): find
makeyesnocode("Can view others' threads","canviewothers",1);
and add right below it
makeyesnocode("Can view thread pages","canviewposts",1);
TUBEDOGG (12:39:19 AM): then find
if ($HTTP_POST_VARS['action']=="insert") {
TUBEDOGG (12:39:58 AM): and replace the query right below it (the $DB_site->query part) with this:
$DB_site->query("INSERT INTO usergroup (usergroupid,title,usertitle,cancontrolpanel,canmo difyprofile,canviewmembers,canview,cansearch,c anemail,canpostnew,canmove,canopenclose,candeletet hread,canreplyown,canreplyothers,canviewo thers,caneditpost,candeletepost,canusepm,canpostpo ll,canvote,canpostattachment,ismoderator,can publicevent,canpublicedit,canthreadrate,cantrackpm ,candenypmreceipts,maxbuddypm,maxforward pm,canviewposts)
VALUES (NULL,'".addslashes($title)."','".addslashes($user title)."',$cancontrolpanel,$canmodifyprofile,$canv ie wmembers,$canview,$cansearch,$canemail,$canpostnew ,$canmove,$canopenclose,$candeletethre ad,$canreplyown,$canreplyothers,$canviewothers,$ca neditpost,$candeletepost,$canusepm,$canpo stpoll,$canvote,$canpostattachment,$ismoderator,$c anpublicevent,$canpublicedit,$canthreadrate,$ cantrackpm,$candenypmreceipts,$maxbuddypm,$maxforw ardpm,$canviewposts)");
VirtueTek (12:40:42 AM): ok
VirtueTek (12:40:47 AM): that's everything?
TUBEDOGG (12:40:50 AM): Then find
makeyesnocode("Can view thread pages","canviewposts",$usergroup[canviewposts]);
VirtueTek (12:40:52 AM): k
VirtueTek (12:40:53 AM): :-)
TUBEDOGG (12:41:08 AM): :-) then find
TUBEDOGG (12:41:13 AM): if ($HTTP_POST_VARS['action']=="doupdate") {
TUBEDOGG (12:41:45 AM): and find right below that the query ($DB_site->query part) and replace it with
$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."',usertitle='".addsla shes($usertitle)."',cancontrolpanel=$cancontrolpan el, canmodifyprofile=$canmodifyprofile,canviewmembers= $canviewmembers,canview=$canview,cans earch=$cansearch,canemail=$canemail,canpostnew=$ca npostnew,canmove=$canmove,canopencl ose=$canopenclose,candeletethread=$candeletethread ,canreplyown=$canreplyown,canreplyothers =$canreplyothers,canviewothers=$canviewothers,cane ditpost=$caneditpost,candeletepost=$candel etepost,canusepm=$canusepm,canpostpoll=$canpostpol l,canvote=$canvote,canpostattachment=$c anpostattachment,ismoderator=$ismoderator,canpubli cedit=$canpublicedit,canpublicevent=$canpu blicevent,canthreadrate=$canthreadrate,cantrackpm= $cantrackpm,candenypmreceipts=$candenyp mreceipts,maxbuddypm=$maxbuddypm,maxforwardpm=$max forwardpm,canviewposts=$canview posts WHERE usergroupid=$usergroupid");
VirtueTek (12:42:31 AM): k
TUBEDOGG (12:42:32 AM): then
TUBEDOGG (12:42:39 AM): in admin/forumpermisson.php
TUBEDOGG (12:42:43 AM): permission rather
TUBEDOGG (12:43:09 AM): find
makeyesnocode("Can view others' threads","canviewothers",$forumpermission[canviewothers]);
and add right below it
makeyesnocode("Can view thread pages","canviewposts",$forumpermission[canviewposts]);
TUBEDOGG (12:43:23 AM): then find
TUBEDOGG (12:43:24 AM): if ($HTTP_POST_VARS['action']=="doupdate") {
TUBEDOGG (12:43:48 AM): and replace the query that starts
$DB_site->query("INSERT INTO forumpermission
TUBEDOGG (12:43:49 AM): with
TUBEDOGG (12:44:02 AM): $DB_site->query("INSERT INTO forumpermission
(forumpermissionid,usergroupid,forumid,canview,can search,canemail,canpostnew,canmove,canope nclose,candeletethread,canreplyown,canreplyothers, canviewothers,caneditpost,candeletepost,canp ostpoll,canvote,canpostattachment,canviewposts)
VALUES
(NULL,$usergroupid,$forumid,$canview,$cansearch,$c anemail,$canpostnew,$canmove,$canopenclo se,$candeletethread,$canreplyown,$canreplyothers,$ canviewothers,$caneditpost,$candeletepost,$c anpostpoll,$canvote,$canpostattachment,$canviewpos ts)");
TUBEDOGG (12:44:30 AM): and replace the query that starts
$DB_site->query("UPDATE forumpermission SET
TUBEDOGG (12:44:31 AM): with
TUBEDOGG (12:44:36 AM): $DB_site->query("UPDATE forumpermission SET usergroupid=$usergroupid,canview=$canview,cansearc h=$cansearch,canemail=$canemail,canpost new=$canpostnew,canmove=$canmove,canopenclose=$can openclose,candeletethread=$candelete thread,canreplyown=$canreplyown,canreplyothers=$ca nreplyothers,canviewothers=$canviewother s,caneditpost=$caneditpost,candeletepost=$candelet epost,canpostpoll=$canpostpoll,canvote=$can vote,canpostattachment=$canpostattachment,canviewp osts=$canviewposts WHERE forumpermissionid=$forumpermissionid");
TUBEDOGG (12:45:07 AM): and you'll need to add a column to forumpermission
TUBEDOGG (12:45:10 AM): called canviewposts
TUBEDOGG (12:45:31 AM): that should do it
VirtueTek (12:46:15 AM): a column?
TUBEDOGG (12:46:20 AM): a field
TUBEDOGG (12:46:27 AM): in the database
VirtueTek (12:46:34 AM): a table
VirtueTek (12:46:36 AM): ok
VirtueTek (12:47:01 AM): done
VirtueTek (12:47:03 AM): ok
VirtueTek (12:47:15 AM): testing now....by the way...did I say I love you yet
VirtueTek (12:47:16 AM): :-)
VirtueTek (12:47:18 AM): thanks
TUBEDOGG (12:47:27 AM): hehe
TUBEDOGG (12:47:27 AM): npo
TUBEDOGG (12:47:28 AM): np
VirtueTek (12:48:37 AM): where in the admin will I be able to set this
VirtueTek (12:48:46 AM): did we make that change?
TUBEDOGG (12:49:10 AM): yeah you can do it under Usergroups & Permissions > Modify OR Usergroups & Permissions > Modify Forums
VirtueTek (12:50:27 AM): nevermind
VirtueTek (12:53:30 AM): fresh
VirtueTek (12:53:33 AM): it works
VirtueTek (12:53:35 AM): you rock
VirtueTek (12:53:37 AM): thanks so much
TUBEDOGG (12:53:42 AM): :-) np dude