Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 10-06-2001
Last Update: Never
Installs: 125
No support by the author.
This will add a speical section to the User CP, called "My vBpad".
Started a reply but don't have time to finish it?
Need to save a certain sentence you use a lot? (*cough*)
Just put it there, and hit save!
Each pad can store multiple notes. Maximum number of notes can be set in the Admin CP.
You can also allow/disallow use of IMG code, vB code, smilies and HTML in notes.
Also storing the last time the pad was changed.
I was hoping that I could get fedback from you guys, and maybe turn this into something a lot better
So if you got any ideas, how this can be used to make life easier on a forum, please do not hesitate.
Alright Steve, Justice, here it is.
Works great as far as I tested it.
(by default, all usergroups have this DISABLED!)
ADDON: Make vBpad available only to certain usergroups, based on settings in Admin CP
Run query:
Code:
ALTER TABLE usergroup ADD cannotepad SMALLINT(6) DEFAULT '0' not null AFTER canwhosonlineip
Changes to file usergroup.php (admin folder):
Add:
PHP Code:
maketableheader("My vBpad Permissions");
makeyesnocode("Can Use vBpad","cannotepad",1);
right after:
PHP Code:
makeyesnocode("Can View IP Addresses on Who's Online","canwhosonlineip",0);
Replace:
PHP Code:
$DB_site->query("INSERT INTO usergroup (usergroupid,title,usertitle,cancontrolpanel,canmodifyprofile,canviewmembers,canview,cansearch,canemail,canpostnew,canmove,canopenclose,candeletethread,canreplyown,canreplyothers,canviewothers,caneditpost,candeletepost,canusepm,canpostpoll,canvote,canpostattachment,ismoderator,canpublicevent,canpublicedit,canthreadrate,cantrackpm,candenypmreceipts,maxbuddypm,maxforwardpm,canwhosonline,canwhosonlineip)
VALUES (NULL,'".addslashes($title)."','".addslashes($usertitle)."',$cancontrolpanel,$canmodifyprofile,$canviewmembers,$canview,$cansearch,$canemail,$canpostnew,$canmove,$canopenclose,$candeletethread,$canreplyown,$canreplyothers,$canviewothers,$caneditpost,$candeletepost,$canusepm,$canpostpoll,$canvote,$canpostattachment,$ismoderator,$canpublicevent,$canpublicedit,$canthreadrate,$cantrackpm,$candenypmreceipts,$maxbuddypm,$maxforwardpm,$canwhosonline,$canwhosonlineip)");
with:
PHP Code:
$DB_site->query("INSERT INTO usergroup (usergroupid,title,usertitle,cancontrolpanel,canmodifyprofile,canviewmembers,canview,cansearch,canemail,canpostnew,canmove,canopenclose,candeletethread,canreplyown,canreplyothers,canviewothers,caneditpost,candeletepost,canusepm,canpostpoll,canvote,canpostattachment,ismoderator,canpublicevent,canpublicedit,canthreadrate,cantrackpm,candenypmreceipts,maxbuddypm,maxforwardpm,canwhosonline,canwhosonlineip,cannotepad)
VALUES (NULL,'".addslashes($title)."','".addslashes($usertitle)."',$cancontrolpanel,$canmodifyprofile,$canviewmembers,$canview,$cansearch,$canemail,$canpostnew,$canmove,$canopenclose,$candeletethread,$canreplyown,$canreplyothers,$canviewothers,$caneditpost,$candeletepost,$canusepm,$canpostpoll,$canvote,$canpostattachment,$ismoderator,$canpublicevent,$canpublicedit,$canthreadrate,$cantrackpm,$candenypmreceipts,$maxbuddypm,$maxforwardpm,$canwhosonline,$canwhosonlineip,$cannotepad)");
Add:
PHP Code:
maketableheader("My vBpad Permissions");
makeyesnocode("Can Use vBpad","cannotepad",$usergroup[cannotepad]);
right after:
PHP Code:
makeyesnocode("Can View IP Addresses on Who's Online","canwhosonlineip",$usergroup[canwhosonlineip]);
Replace:
PHP Code:
$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."',usertitle='".addslashes($usertitle)."',cancontrolpanel=$cancontrolpanel,canmodifyprofile=$canmodifyprofile,canviewmembers=$canviewmembers,canview=$canview,cansearch=$cansearch,canemail=$canemail,canpostnew=$canpostnew,canmove=$canmove,canopenclose=$canopenclose,candeletethread=$candeletethread,canreplyown=$canreplyown,canreplyothers=$canreplyothers,canviewothers=$canviewothers,caneditpost=$caneditpost,candeletepost=$candeletepost,canusepm=$canusepm,canpostpoll=$canpostpoll,canvote=$canvote,canpostattachment=$canpostattachment,ismoderator=$ismoderator,canpublicedit=$canpublicedit,canpublicevent=$canpublicevent,canthreadrate=$canthreadrate,cantrackpm=$cantrackpm,candenypmreceipts=$candenypmreceipts,maxbuddypm=$maxbuddypm,maxforwardpm=$maxforwardpm,canwhosonline=$canwhosonline,canwhosonlineip=$canwhosonlineip WHERE usergroupid=$usergroupid");
with:
PHP Code:
$DB_site->query("UPDATE usergroup SET title='".addslashes($title)."',usertitle='".addslashes($usertitle)."',cancontrolpanel=$cancontrolpanel,canmodifyprofile=$canmodifyprofile,canviewmembers=$canviewmembers,canview=$canview,cansearch=$cansearch,canemail=$canemail,canpostnew=$canpostnew,canmove=$canmove,canopenclose=$canopenclose,candeletethread=$candeletethread,canreplyown=$canreplyown,canreplyothers=$canreplyothers,canviewothers=$canviewothers,caneditpost=$caneditpost,candeletepost=$candeletepost,canusepm=$canusepm,canpostpoll=$canpostpoll,canvote=$canvote,canpostattachment=$canpostattachment,ismoderator=$ismoderator,canpublicedit=$canpublicedit,canpublicevent=$canpublicevent,canthreadrate=$canthreadrate,cantrackpm=$cantrackpm,candenypmreceipts=$candenypmreceipts,maxbuddypm=$maxbuddypm,maxforwardpm=$maxforwardpm,canwhosonline=$canwhosonline,canwhosonlineip=$canwhosonlineip,cannotepad=$cannotepad WHERE usergroupid=$usergroupid");
Changes to file member2.php (admin folder):
Add:
PHP Code:
$usergroupdef = getpermissions(0,-1,$bbuserinfo['usergroupid']);
if (!$usergroupdef['cannotepad']) {
show_nopermission();
}
right before:
PHP Code:
$allnotes="";
(two times)
Changes to file usercp.php (admin folder):
Replace:
PHP Code:
$padbits="";
$counter=1;
with:
PHP Code:
$usergroupdef = getpermissions(0,-1,$bbuserinfo['usergroupid']);
if ($usergroupdef['cannotepad']) {
$padbits="";
$counter=1;