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 - [5/9/2011] MARCO1 Hide All with Usergroups permission - Messages Manager (https://vborg.vbsupport.ru/showthread.php?t=228228)

djvd-sammobile 01-12-2021 08:05 AM

Quote:

Originally Posted by yin9 (Post 2603065)
Thanks, the error of "eregi_replace" is solved but don't work properly, printpage don't show messages and this is seeing empty.

We're having the same issue here, error resolved but empty messages in archive/printpage...

djvd-sammobile 08-07-2021 11:46 AM

Quote:

Originally Posted by shka (Post 2601920)
I didn't install it so it is only a quick reading of source code, not tested

(1) in file admincp/MARCO1_hide_all_version_checker.php, on line 42/44 - there is ereg_replace (without i), should be replaced with preg_replace without /i-flag
PHP Code:

$latestVersion preg_replace("[^A-Za-z0-9.]"""$latestVersion );
...
$latestVersion preg_replace("[^0-9.]"""$latestVersion ); 

(2) in file Product - MARCO1 Hide All Final.xml
line 25
PHP Code:

$post['pagetext'] = preg_replace('(http|www)([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*)/i'$vbphrase[MARCO1_nomemberar], $post['pagetext_simp']); 

line 39
PHP Code:

$post['pagetext'] = preg_replace('(http|www)([[:alnum:]/\n+-=%&:_.~?]+[#[:alnum:]+]*)/i'$vbphrase[MARCO1_arc], $post['pagetext_simp']); 

After installation you should find both (2) in admincp/addons & plugins/plugin manager in plugin "MARCO1 A R M" and "MARCO1 Hide Arc"

Thank you for your effort! The regexes are almost working. However, they should actually be:

(2) in file Product - MARCO1 Hide All Final.xml
line 25
PHP Code:

$post['pagetext'] = preg_replace('/(http|www)([[:alnum:]\/\n+-=%&:_.~?]+[#[:alnum:]+]*)/i'$vbphrase[MARCO1_nomemberar], $post['pagetext_simp']); 

line 39
PHP Code:

$post['pagetext'] = preg_replace('/(http|www)([[:alnum:]\/\n+-=%&:_.~?]+[#[:alnum:]+]*)/i'$vbphrase[MARCO1_arc], $post['pagetext_simp']); 

Notable differences:
  • now starts with a '/'
  • now properly escapes the '/\n' ( it becomes '\/\n' )


Other PHP7 improvements:
  • in the XML, all 11 occurrences of $vbphrase[MARCO1_*] should actually be quoted to eg. $vbphrase['MARCO1_*'] to prevent PHP notices/warnings


All times are GMT. The time now is 10:15 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.01441 seconds
  • Memory Usage 1,735KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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