[Rejected] Language variables with spritf keeps first value and all language vars.
#1
I am currently developing a new plugin and found this error into mybb.

In postbit where values are changes into every post or any new pages you can see this error.

Sample 1:

$lang->sample1 = "Sample 1";
---------
other lang vars.
------------
$lang->sample1 = "This is a new value for sample 1";



The right value must be the latest one, but unfortunatelly allways takes the first value.

And the real problem is when i use lang->sprintf

I mean if i woul like to use this:

$lang->sample2 = "User id for this post {1}";

$lang->sample2 = $lang->spritf($lang->sample2,$post['newvalue']);

And if i use this:

$lang->sample2 = "User id for this post ".$post['newvalue'];

Then the right value appears like if i use the sprintf ...

And use it into a hook in postbit template then allways takes the first post uid and the same text

This way i can not do any language vars like sprintf any more and i have to use directly into post vars, or how can we use this ?
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply


Messages In This Thread
Language variables with spritf keeps first value and all language vars. - by Whiteneo - 2017-12-29, 06:03 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)