MyBB.de Forum
MyReactions - Druckversion

+- MyBB.de Forum (https://www.mybb.de/forum)
+-- Forum: Anpassungen (https://www.mybb.de/forum/forum-47.html)
+--- Forum: Plugin-Veröffentlichungen und -Support (https://www.mybb.de/forum/forum-82.html)
+--- Thema: MyReactions (/thread-33762.html)

Seiten: Seiten: 1 2 3 4 5


RE: MyReactions - bv64 - 26.02.2023

vielleicht hat jemand eine Idee

unter PHP 8.1 bekomme ich beim Themenaufruf zahlreiche identische Warnings

Warning [2] Undefined array key "myreactions" - Line: 36 - File: inc/functions_post.php(946) : eval()'d code PHP 8.1.16 (Linux)

die inc/functions_post.php ist sicherlich nicht das Problem, da wird das postbit bzw. postbit_classic Template aufgerufen aber in dem ist der Eintrag vom Plugin
{$post['myreactions']}

im Plugin finde ich die Variable drei mal:
Zeile 484-487
PHP-Code:
    if($post_reactions)
    {
        eval(
"\$post['myreactions'] = \"".$templates->get('myreactions_container')."\";");
    } 

Zeile 576-579
PHP-Code:
        $db->insert_query('post_reactions', array('post_reaction_pid' => $post['pid'], 'post_reaction_rid' => $mybb->input['rid'], 'post_reaction_uid' => $mybb->user['uid'], 'post_reaction_date' => TIME_NOW));

        
myreactions_postbit($post);
        echo 
$post['myreactions'];
        exit; 

Zeile 587-594
PHP-Code:
if($post_reaction)
        {
            
$db->delete_query('post_reactions''post_reaction_id = \''.$post_reaction['post_reaction_id'].'\'');
            
$post get_post($post_reaction['post_reaction_pid']);
            
myreactions_postbit($post);
            echo 
$post['myreactions'];
            exit;
        } 

wie bekommt man diese Warnings weg?


RE: MyReactions - SvePu - 26.02.2023

Ändere bitte in der Plugin Datei:
PHP-Code:
if($post_reactions)
{
     eval(
"\$post['myreactions'] = \"".$templates->get('myreactions_container')."\";");


in:
PHP-Code:
$post['myreactions'] = '';
if (!empty(
$post_reactions))
{
    eval(
"\$post['myreactions'] = \"" $templates->get('myreactions_container') . "\";");




RE: MyReactions - bv64 - 26.02.2023

danke Sven, es funktioniert (natürlich!)


RE: MyReactions - KarinB - 26.02.2023

Schliesse mich da bitte auch an. Ich würde das Plugin gern behalten, bekomme aber viele Fehlermeldungen:

inc/plugin/myreactions.php Zeile 747 und 748
PHP-Code:
$lang->myreactions_received $lang->sprintf($lang->myreactions_received_profile$memprofile['username'], $memprofile['reactions_received'], $reactions_received_posts_count);
    
$lang->myreactions_given $lang->sprintf($lang->myreactions_given_profile$memprofile['username'], $memprofile['reactions_given'], $reactions_given_posts_count); 

inc/plugin/myreactions.php Zeile 777
PHP-Code:
eval("\$myreactions = \"".$templates->get('myreactions_profile')."\";"); 

inc/plugin/myreactions.php Zeile 723
PHP-Code:
eval("\$reaction_image = \"".$templates->get('myreactions_reaction_image')."\";"); 


inc/plugin/myreactions.php Zeile 725
PHP-Code:
eval("\$reactions_given .= \"".$templates->get('myreactions_reaction')."\";"); 


inc/plugin/myreactions.php Zeile 184
PHP-Code:
if($mybb->input['myreactions_debug']) 


inc/plugin/myreactions.php Zeile 284
PHP-Code:
$post['user_details'] = str_replace('{myreactions}''<br />'.$lang->sprintf($lang->myreactions_received_postbit'<a href="javascript:void(0)" onclick="MyReactions.reactedUser('.$post['uid'].', \'received\');"><strong>'.$post['reactions_received'].'</strong></a>').'<br />'.$lang->sprintf($lang->myreactions_given_postbit'<a href="javascript:void(0)" onclick="MyReactions.reactedUser('.$post['uid'].', \'given\');"><strong>'.$post['reactions_given'].'</strong></a>'), $post['user_details']); 


Dankeschön und lg
Karin


RE: MyReactions - bv64 - 26.02.2023

probier mal meine


RE: MyReactions - KarinB - 26.02.2023

(26.02.2023, 18:08)bv64 schrieb: probier mal meine

DANKE vielmals *freu* - funktioniert !

Ihr seid alle so super - langsam wird mein Forum wieder!


RE: MyReactions - bv64 - 26.02.2023

noch nicht ganz, da fehlen noch einige, sehe ich gerade beim Profilaufruf

ich setz mich mal ran

edit: ersetz sie noch mal mit dieser


RE: MyReactions - KarinB - 26.02.2023

Post hat sich überschnitten, editiere meins auch.

Ja genau, im Profil war noch was - aber ein riesiges Dankeschön, jetzt funktionierts perfekt !
Schönen Abend und ... danke!

LG
Karin


RE: MyReactions - bv64 - 26.02.2023

hab gerade noch editiert und neue Version dran gepappt Wink


RE: MyReactions - KarinB - 26.02.2023

habs gesehen  Smile - hab meins auch editiert