vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Thread Passwords (Updated to VB4 by BOP5) (https://vborg.vbsupport.ru/showthread.php?t=281649)

IggyP 01-19-2018 01:26 PM

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

BirdOPrey5 01-20-2018 03:02 PM

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.

IggyP 01-21-2018 01:44 AM

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

IggyP 01-21-2018 02:19 AM

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

chudvs 09-06-2019 09:10 AM

pity i could really do with this right now


All times are GMT. The time now is 01:48 PM.

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.01219 seconds
  • Memory Usage 1,738KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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