vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Plugin causing issues with php 7.1 (https://vborg.vbsupport.ru/showthread.php?t=326686)

katie hunter 08-27-2018 01:14 AM

Plugin causing issues with php 7.1
 
Hi,

I've installed a new vb but i used php 7.1 however i am reciving errors from the plugin. I don't want to downgrade my php really to 5.6.

Php 7.1 runs faster than 5.6, correct ? What do i do to get my plugins to work ? this is the first plugin i tried to test and it is an important one.

MarkFL 08-27-2018 02:09 AM

What is the plugin code?

katie hunter 08-27-2018 02:15 AM

Hi Mark - there are several plugins.

The first one is recapcha new (i get a white page in registration page if i ever use it) Edit: The fix is on the last page of the plugin, this one is fixed.
https://vborg.vbsupport.ru/showthread.php?t=315960

The next one is sphynix search
https://marketplace.digitalpoint.com...tin-4.870/item

The third one is a custom made for my header , that is the one i first tried and give me the error i mentioned above:

MarkFL 08-27-2018 02:41 AM

Try this code in your custom plugin:

PHP Code:

if ($vbulletin->userinfo['userid'])
{
    require_once(
'./includes/functions_user.php');
    
$ava_url fetch_avatar_url($vbulletin->userinfo['userid']);
    
$avatar $ava_url[0];

    if (!
avatar)
    {
        
$ava_url[0] = "images/misc/unknown.gif";
    }

  
$ava_urlX $ava_url[0];
  
$nhn_avatar "<a href=\"profile.php?do=editavatar\"><img src=\"$ava_urlX\" width=\"50\" height=\"50\" border=\"0\" alt=\"Your Avatar\" style=\"vertical-align: middle; margin-right: 5px; margin-top: -4px; border-radius: 5px;-moz-border-radius: 5px;-ms-border-radius: 5px;-o-border-radius: 5px;-webkit-border-radius: 5px;\" /></a>";

  
$templater vB_Template::create('header');
  
$templater->register('nh_avatar'$nhn_avatar);
  
vB_Template::preRegister('header',array('nhn_avatar' => $nhn_avatar));
  
$templater->render();



katie hunter 08-27-2018 03:09 AM

Hi Mark - add this code where ? replace the entire file with your code ?

Edit: i applied your changes but still same issue:

MarkFL 08-27-2018 11:53 AM

Replace the actual plugin code. No need to edit the .XML file.

katie hunter 08-27-2018 02:29 PM

Hi Mark, i tried it but it gave me an error when i tried to import the xml file after i updated

XML Error: Not well-formed (invalid token) at Line 3

Edit: now it works !! <3 i went to edit in Installed Products and replaced your code in the install new code and saved. But trying to edit the xml file and upload it didn't work, it gave me that error above.

What did you do to fix it ? so i can apply it to other plugins that has similar issues like the sphynix right now has that same issue:

MarkFL 08-27-2018 04:19 PM

I'm surprised that was part of the installation code...it should have simply been in a plugin. As far as Sphinx, I would speak to its developers.

katie hunter 08-27-2018 11:08 PM

Quote:

Originally Posted by MarkFL (Post 2596155)
I'm surprised that was part of the installation code...it should have simply been in a plugin. As far as Sphinx, I would speak to its developers.

They ceased updating it, but i have many the same issues with the xml files, what do i need to replace to be compliant with php 7.x ?


All times are GMT. The time now is 02:31 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.01040 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete