Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Thread Passwords (Updated to VB4 by BOP5) Details »»
Thread Passwords (Updated to VB4 by BOP5)
Version: 0.91, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 04-15-2012 Last Update: 04-27-2012 Installs: 26
DB Changes Uses Plugins Template Edits
Re-useable Code Additional Files Translations Is in Beta Stage  
No support by the author.

Updated by BirdOPrey5

This is a quick update of the vBulletin 3.6 mod by netwind: Thread Passwords (VB 3.6)

It is marked Re-Usable Code.

NOTE: Confirmed bug affecting all attachments. See post #20.

By request I have updated this to work on the latest vBulletin, VB 4.1.12. It should work on all 4.x versions.

There are NO new features, it is a simple update so it works with 4.x

I will not be providing official support for this mod- truth be told I'm not sure how it works, only that it does in my quick tests.

This is the original description:

Quote:
This hack allow protect thread by password same way as forums.
Administrator and moderators can change password, can appoint thread masters.
Thread masters can only change password.

All thread content are protected by password : attachments,printable version, archive,
search results. Instant subscription letters will not contain message.
Please "Mark as Installed" if you use it.

Download Now

File Type: zip Thread Passwords for VB4 Updated by BOP5 v91.zip (9.6 KB, 183 views)

Screenshots

File Type: jpg thread_pw_vb4_set.jpg (90.2 KB, 0 views)
File Type: jpg thread_pw_vb4_submit.jpg (63.2 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
bing11, drchinh

Comments
  #32  
Old 01-19-2018, 01:26 PM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i like the idea of this....one other basic thing you would sort of think would already be there but isnt....didnt work for us on 4.2.5 tho....installed ok, template edit no problem...but when clicking to setup the pw its this mess

Quote:
userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']) OR can_moderate($threadinfo['forumid']) OR isset($masters[$vbulletin->userinfo['userid']]) ) { return true; } if ($temp = fetch_bbarray_cookie('threadpwd', $threadid) AND $temp === md5($vbulletin->userinfo['userid'] . $password)) { return true; } if ($showerror) { require_once(DIR . '/includes/functions_misc.php'); // thread password is bad - show error eval(standard_error(fetch_error('threadpasswordmis sing', $vbulletin->session->vars['sessionhash'], $vbulletin->scriptpath, $threadid, construct_post_vars_html(), $stylevar['cellpadding'], $stylevar['cellspacing'], $vbulletin->userinfo['securitytoken'] ))); } else { // forum password is bad - return false return false; } } function threadpassword_atos($idarray){ global $vbulletin; if (!is_array($idarray)) { return array('','');}; if (count($idarray)==0) { return array('','');}; $idstr=join(',',array_keys($idarray)); $nameq = $vbulletin->db->query_read(" SELECT userid,username FROM " . TABLE_PREFIX . "user WHERE userid in ($idstr) order by username"); $userstr='';$userstrh=''; $delim=''; while ($usr= $vbulletin->db->fetch_array($nameq)) { $userstr .= $delim . $usr['username']; $userstrh .= "$delim$usr[username]"; $delim = ','; } return array($userstr,$userstrh); } function threadpassword_stoa($nickstring){ global $vbulletin; $a=explode(',',$nickstring); $namesa=array(); foreach ($a as $key) { $namesa[] = "'" . $vbulletin->db->escape_string(trim($key)) . "'"; } $sqlfetch=join(',',$namesa); $useridsq=$vbulletin->db->query_read("select userid from " . TABLE_PREFIX . "user where username in ($sqlfetch) order by userid"); if ( $vbulletin->db->num_rows($useridsq) < 0 ) { return array(); } $result=array(); while ($row=$vbulletin->db->fetch_array($useridsq)) { $result[$row[userid]]=1; } return $result; } ?>

that make sense to anyone? that attachment workaround worked too, thought it was home free till that last bit..

thanks
Reply With Quote
  #33  
Old 01-20-2018, 03:02 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like you uploaded a PHP file to your site in binary mode which didn't preserve the line endings. PHP (as well as HTML, TXT and other text based files) need to be uploaded in ASCII mode by your FTP client. By default Filezilla will usually do this for you but if for some reason something went wrong or you're using a different app you may need to set it manually,

Images would need to upload in binary or they break, so you can't always stay in ASCII mode.
Reply With Quote
  #34  
Old 01-21-2018, 01:44 AM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm i havent had any issues with that before...i have it set to auto in filezilla...

you think something in this product is making it transfer the incorrect way?

i guess i will compare the php files just sounds like an odd issue i never saw before, got me curious some..

thank you
Reply With Quote
  #35  
Old 01-21-2018, 02:19 AM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tried again just now, with a default vb4.2.5 install...the domain was setup with php 7.1 but the first part of the result was similar..

Quote:
userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator']) OR can_moderate($threadinfo['forumid']) OR isset($masters[$vbulletin->userinfo['userid']]) ) { return true; } if ($temp = fetch_bbarray_cookie('threadpwd', $threadid) AND $temp === md5($vbulletin->userinfo['userid'] . $password)) { return true; } if ($showerror) { require_once(DIR . '/includes/functions_misc.php'); // thread password is bad - show error eval(standard_error(fetch_error('threadpasswordmis sing', $vbulletin->session->vars['sessionhash'], $vbulletin->scriptpath, $threadid, construct_post_vars_html(), $stylevar['cellpadding'], $stylevar['cellspacing'], $vbulletin->userinfo['securitytoken'] ))); } else { // forum password is bad - return false return false; } } function threadpassword_atos($idarray){ global $vbulletin; if (!is_array($idarray)) { return array('','');}; if (count($idarray)==0) { return array('','');}; $idstr=join(',',array_keys($idarray)); $nameq = $vbulletin->db->query_read(" SELECT userid,username FROM " . TABLE_PREFIX . "user WHERE userid in ($idstr) order by username"); $userstr='';$userstrh=''; $delim=''; while ($usr= $vbulletin->db->fetch_array($nameq)) { $userstr .= $delim . $usr['username']; $userstrh .= "$delim$usr[username]"; $delim = ','; } return array($userstr,$userstrh); } function threadpassword_stoa($nickstring){ global $vbulletin; $a=explode(',',$nickstring); $namesa=array(); foreach ($a as $key) { $namesa[] = "'" . $vbulletin->db->escape_string(trim($key)) . "'"; } $sqlfetch=join(',',$namesa); $useridsq=$vbulletin->db->query_read("select userid from " . TABLE_PREFIX . "user where username in ($sqlfetch) order by userid"); if ( $vbulletin->db->num_rows($useridsq) < 0 ) { return array(); } $result=array(); while ($row=$vbulletin->db->fetch_array($useridsq)) { $result[$row[userid]]=1; } return $result; } ?> Call to undefined function threadpassword_atos() on line 74 in /public_html/threadpassword.php
#0 {main}
that call to undefined function at the end help at all?

the rest of the errors follow..

Quote:
Fatal User Error: Call to undefined function threadpassword_atos() on line 74 in ..../threadpassword.php in ..../vb/vb.php on line 286
Trace Data:

#1 : vbstop() called in ..../includes/class_core.php on line 6089
#2 : vbulletin_error_handler() called in on line
#3 : trigger_error() called in ..../vb/vb.php on line 286
#4 : vB::handleException() called in on line
i dont know really how to even try troubleshooting farther....i know its marked unsupported but could be a good thing to see working...

thanks joe
Reply With Quote
  #36  
Old 09-06-2019, 09:10 AM
chudvs chudvs is offline
 
Join Date: Jul 2018
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

pity i could really do with this right now
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05454 seconds
  • Memory Usage 2,300KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (2)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (3)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete