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)
-   -   vBpad - Your personal notepad! (v1.0) (https://vborg.vbsupport.ru/showthread.php?t=29760)

SirFaraz Khan 10-08-2001 09:07 PM

when i run install_vbpad.php, it gives me this message:

Fatal error: Call to undefined function: cpheader() in /home/411hype/public_html/forums/install_vbpad.php on line 15

MarkB 10-08-2001 09:28 PM

Just installed it! Thanks, it went flawlessly :)

- although, in the installer, it's a little confusing when it comes to editing the usercp template, as you actually need to edit usercp_nav to add in

Code:

<td bgcolor="$cpnav[8]">
<smallfont><b><a href="member2.php?s=$session[sessionhash]&action=notepad">My vBpad</a></b></smallfont>
</td>

not usercp itself...

Mind you, I'm easily confused :p

SirFaraz Khan 10-08-2001 11:43 PM

nobody can solve my problem?!
When i run the install file, the following error comes up!...

Fatal error: Call to undefined function: cpheader() in /home/411hype/public_html/forums/install_vbpad.php on line 15

tubedogg 10-09-2001 12:40 AM

You need to put that file in your /admin directory to run it.

Also, please enter your license information in your profile. See the link in my sig for more info. Thanks!

Admin 10-09-2001 08:12 AM

Yup, sorry I didn't write it in my post.

MarkB, thanks for that, I'll fix it right away. :)

Steve, yeah it's very possible. Give me a couple of hours and I'll get to it. :)

Admin 10-09-2001 08:56 AM

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

Replace:
PHP Code:

eval("\$vbpad = \"".gettemplate("usercp_mininotepad")."\";"); 

with:
PHP Code:

eval("\$vbpad = \"".gettemplate("usercp_mininotepad")."\";");
} else {
$vbpad="";



certify 10-09-2001 09:59 AM

Excellent hack, well done! :)

magistr 10-09-2001 10:51 AM

very easy install
cool thanx

Admin 10-09-2001 02:14 PM

magistr, glad you liked it! :)
Can you please enter your license information in your profile. See the link in my sig for more info. Thanks!

Admin 10-09-2001 02:33 PM

Found a little (big) bug:
In member2.php, this code
Code:

    if ($maxpadnum!=0 and $counter<=$maxpadnum) {
should be like this:
Code:

    if ($maxpadnum==0 or $counter<=$maxpadnum) {
Updated the installer, but if you already installed this then you should do this change yourself. :)


All times are GMT. The time now is 07:43 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.01895 seconds
  • Memory Usage 1,795KB
  • 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
  • (4)bbcode_code_printable
  • (14)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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