<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[MyBB.de Forum - Programmierung]]></title>
		<link>https://forum.mybb.de/</link>
		<description><![CDATA[MyBB.de Forum - https://forum.mybb.de]]></description>
		<pubDate>Wed, 03 Jun 2026 22:21:16 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[MyBB 1.9 > Download / Extensions]]></title>
			<link>https://forum.mybb.de/thread-39577.html</link>
			<pubDate>Thu, 27 Nov 2025 03:33:14 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12059">Gerti</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-39577.html</guid>
			<description><![CDATA[Hallo,<br />
<br />
hat mir jemand einen Link wo man die MyBB-Version 1.9 herunterladen und dann installieren kann?<br />
<br />
Bei der von GitHub heruntergeladenen Version bekomme ich bei Seitenaufruf von <span style="color: #00369b;" class="mycode_color">./url/install/index.php</span> die Meldung:<br />
"<span style="color: #9a00b2;" class="mycode_color">MyBB Internal Error<br />
The software behind this site has experienced a problem and cannot continue. Please try again later.</span>"<br />
<br />
Vielleicht muss man aber anders vorgehen. Bin für jegliche Tipps dankbar, weil ich mich mit der Aktualisierung/Implementierung von Extensions <span style="font-style: italic;" class="mycode_i">(PlugIns)</span> in V1.9 beschäftigen möchte..]]></description>
			<content:encoded><![CDATA[Hallo,<br />
<br />
hat mir jemand einen Link wo man die MyBB-Version 1.9 herunterladen und dann installieren kann?<br />
<br />
Bei der von GitHub heruntergeladenen Version bekomme ich bei Seitenaufruf von <span style="color: #00369b;" class="mycode_color">./url/install/index.php</span> die Meldung:<br />
"<span style="color: #9a00b2;" class="mycode_color">MyBB Internal Error<br />
The software behind this site has experienced a problem and cannot continue. Please try again later.</span>"<br />
<br />
Vielleicht muss man aber anders vorgehen. Bin für jegliche Tipps dankbar, weil ich mich mit der Aktualisierung/Implementierung von Extensions <span style="font-style: italic;" class="mycode_i">(PlugIns)</span> in V1.9 beschäftigen möchte..]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[mybbuser Cookie lässt sich nicht lesen]]></title>
			<link>https://forum.mybb.de/thread-39338.html</link>
			<pubDate>Fri, 31 Jan 2025 15:52:08 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=14070">Horst_Ziegler</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-39338.html</guid>
			<description><![CDATA[Hallo Zusammen,<br />
ich bin neu hier im Forum und teste erstmals einige Funktionen des Forums.<br />
Das myBB Forum habe ich installiert und verwende es als IFrame auf meiner Seite.<br />
Ich möchte nun in meiner übergeordneten Anwendung testen, ob sich ein User im Forum angemeldet hat und aktiv ist. Dazu verwende ich das Cookie mybbuser,  welches auch mit dem richtigen Wert angezeigt wird, wenn ich mir alle Cookies bei den Web-Einszellungen ansehe.<br />
Ich versuche das Cookie nun zu lesen, allerdings ohne Ergebnis.  Die Connection zur DB ist korrekt, Was mache ich falsch? Meine eigenen Cookies funktionieren korrekt.<br />
Hier mein Test Coding:<br />
<br />
&lt;?php<br />
<br />
require_once('configforum.php');<br />
//----------------------------------<br />
//Connect to mysql server<br />
//----------------------------------<br />
  &#36;link3 = new mysqli(DB_HOST3, DB_USER3, DB_PASSWORD3, DB_DATABASE3);<br />
//----------------------------------<br />
// Check connection<br />
//----------------------------------<br />
  if (&#36;link3-&gt;connect_error) die("Connection failed: " . &#36;link3-&gt;connect_error);<br />
<br />
  if(isset(&#36;_COOKIE["mybbuser"])) { &#36;login = &#36;_COOKIE["mybbuser"]; }<br />
  echo (&#36;login);<br />
  exit();<br />
?&gt;<br />
<br />
Gruß Horst]]></description>
			<content:encoded><![CDATA[Hallo Zusammen,<br />
ich bin neu hier im Forum und teste erstmals einige Funktionen des Forums.<br />
Das myBB Forum habe ich installiert und verwende es als IFrame auf meiner Seite.<br />
Ich möchte nun in meiner übergeordneten Anwendung testen, ob sich ein User im Forum angemeldet hat und aktiv ist. Dazu verwende ich das Cookie mybbuser,  welches auch mit dem richtigen Wert angezeigt wird, wenn ich mir alle Cookies bei den Web-Einszellungen ansehe.<br />
Ich versuche das Cookie nun zu lesen, allerdings ohne Ergebnis.  Die Connection zur DB ist korrekt, Was mache ich falsch? Meine eigenen Cookies funktionieren korrekt.<br />
Hier mein Test Coding:<br />
<br />
&lt;?php<br />
<br />
require_once('configforum.php');<br />
//----------------------------------<br />
//Connect to mysql server<br />
//----------------------------------<br />
  &#36;link3 = new mysqli(DB_HOST3, DB_USER3, DB_PASSWORD3, DB_DATABASE3);<br />
//----------------------------------<br />
// Check connection<br />
//----------------------------------<br />
  if (&#36;link3-&gt;connect_error) die("Connection failed: " . &#36;link3-&gt;connect_error);<br />
<br />
  if(isset(&#36;_COOKIE["mybbuser"])) { &#36;login = &#36;_COOKIE["mybbuser"]; }<br />
  echo (&#36;login);<br />
  exit();<br />
?&gt;<br />
<br />
Gruß Horst]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Hilfe bei Code]]></title>
			<link>https://forum.mybb.de/thread-39259.html</link>
			<pubDate>Wed, 09 Oct 2024 10:57:31 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=13955">Josey</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-39259.html</guid>
			<description><![CDATA[Hallo! <img src="https://forum.mybb.de/images/smilies/biggrin.gif" alt="Big Grin" title="Big Grin" class="smilie smilie_5" /><br />
<br />
Ich weiß nicht, ob ich im richtigen Thread gelandet bin.<br />
Ich bin mit Programmierung immer noch höllisch überfordert, das nur am Rande XD°<br />
<br />
Also:<br />
Ich habe diese Anleitung befolgt und das ganze ein bisschen abgeändert, damit es keine Sidebar ist, sondern eine Box, die oben steht, wie hier im Forum:<br />
<a href="https://community.mybb.com/thread-204834-post-1248345.html#pid1248345" target="_blank" rel="noopener" class="mycode_url">https://community.mybb.com/thread-204834...pid1248345</a><br />
(das Pluggin "Overview" funktioniert in meinem Forum nicht, liegt vlt an den vielen Änderungen im Template; ich kann keinen Link zu meinem Forum geben, weil es sich um ein lokales Forum für unser Heimnetzwerk auf unserer NAS handelt)<br />
<br />
<br />
Jetzt habe ich diesen Code in die Index.php (die Datei im Ordner, nicht die CSS) geräumt und bin nicht ganz sicher, wie ich fortfahren kann:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>// start threadlist on index

// get forums user cannot view
&#36;unviewable = get_unviewable_forums(true);
if(&#36;unviewable)
{
        &#36;unviewwhere = " AND fid NOT IN (&#36;unviewable)";
}

        &#36;altbg = alt_trow();
        &#36;threadlist = '';
        &#36;query = &#36;db-&gt;query("
                SELECT t.*, u.username
                FROM ".TABLE_PREFIX."threads t
                LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
                WHERE 1=1 &#36;unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
                ORDER BY t.lastpost DESC
                LIMIT 0, 10"
        );
        while(&#36;thread = &#36;db-&gt;fetch_array(&#36;query))
        {
        		&#36;lastpostdate = my_date('relative', &#36;thread['lastpost']);
		        &#36;thread['replies'] = my_number_format(&#36;thread['replies']);
		        &#36;thread['views'] = my_number_format(&#36;thread['views']);

                //&#36;lastpostdate = my_date(&#36;mybb-&gt;settings['dateformat'], &#36;thread['lastpost']);
                //&#36;lastposttime = my_date(&#36;mybb-&gt;settings['timeformat'], &#36;thread['lastpost']);

                // Don't link to guest's profiles (they have no profile).
                if(&#36;thread['lastposteruid'] == 0)
                {
                        &#36;lastposterlink = &#36;thread['lastposter'];
                }
                else
                {
                        &#36;lastposterlink = build_profile_link(&#36;thread['lastposter'], &#36;thread['lastposteruid']);
                }
                if(my_strlen(&#36;thread['subject']) &gt; 25)
                {
                        &#36;thread['subject'] = my_substr(&#36;thread['subject'], 0, 25) . "...";
                }
                &#36;thread['subject'] = htmlspecialchars_uni(&#36;parser-&gt;parse_badwords(&#36;thread['subject']));
                &#36;thread['threadlink'] = get_thread_link(&#36;thread['tid']);
                &#36;thread['lastpostlink'] = get_thread_link(&#36;thread['tid'], 0, "lastpost");
                &#36;thread['forumname'] = &#36;forum_cache[&#36;thread['fid']]['name'];
                eval("&#92;&#36;threadlist .= &#92;"".&#36;templates-&gt;get("portal_latestthreads_thread")."&#92;";");
                &#36;altbg = alt_trow();
        }
        if(&#36;threadlist)
        {
                // Show the table only if there are threads
                eval("&#92;&#36;latestthreads = &#92;"".&#36;templates-&gt;get("portal_latestthreads")."&#92;";");
        } 

// end threadlist on index</code></div></div><br />
<br />
Was ich möchte:<br />
- Nur die Titel der Threads, wenn irgendwie möglich als "Last Post"-Link (alle anderen informationen blasen die Box nur sinnlos auf).<br />
- 3x3 Links neben/untereinander<br />
<br />
Also so:<br />
<br />
Thread 1  Thread 4  Thread 7<br />
Thread 2  Thread 5  Thread 8 <br />
Thread 3  Thread 6  Thread 9<br />
<br />
<br />
Wieso ich das möchte:<br />
Wir schreiben in dem Forum unsere Rollenspiele, ich möchte, dass man direkt auf der Indexseite sieht, in welchen der Threads einer von uns gepostet hat. <img src="https://forum.mybb.de/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
Dabei ist es für uns völlig egal, wer und wann usw. Es ist nur eine Hilfe, um das schneller sehen zu können.]]></description>
			<content:encoded><![CDATA[Hallo! <img src="https://forum.mybb.de/images/smilies/biggrin.gif" alt="Big Grin" title="Big Grin" class="smilie smilie_5" /><br />
<br />
Ich weiß nicht, ob ich im richtigen Thread gelandet bin.<br />
Ich bin mit Programmierung immer noch höllisch überfordert, das nur am Rande XD°<br />
<br />
Also:<br />
Ich habe diese Anleitung befolgt und das ganze ein bisschen abgeändert, damit es keine Sidebar ist, sondern eine Box, die oben steht, wie hier im Forum:<br />
<a href="https://community.mybb.com/thread-204834-post-1248345.html#pid1248345" target="_blank" rel="noopener" class="mycode_url">https://community.mybb.com/thread-204834...pid1248345</a><br />
(das Pluggin "Overview" funktioniert in meinem Forum nicht, liegt vlt an den vielen Änderungen im Template; ich kann keinen Link zu meinem Forum geben, weil es sich um ein lokales Forum für unser Heimnetzwerk auf unserer NAS handelt)<br />
<br />
<br />
Jetzt habe ich diesen Code in die Index.php (die Datei im Ordner, nicht die CSS) geräumt und bin nicht ganz sicher, wie ich fortfahren kann:<br />
<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>// start threadlist on index

// get forums user cannot view
&#36;unviewable = get_unviewable_forums(true);
if(&#36;unviewable)
{
        &#36;unviewwhere = " AND fid NOT IN (&#36;unviewable)";
}

        &#36;altbg = alt_trow();
        &#36;threadlist = '';
        &#36;query = &#36;db-&gt;query("
                SELECT t.*, u.username
                FROM ".TABLE_PREFIX."threads t
                LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)
                WHERE 1=1 &#36;unviewwhere AND t.visible='1' AND t.closed NOT LIKE 'moved|%'
                ORDER BY t.lastpost DESC
                LIMIT 0, 10"
        );
        while(&#36;thread = &#36;db-&gt;fetch_array(&#36;query))
        {
        		&#36;lastpostdate = my_date('relative', &#36;thread['lastpost']);
		        &#36;thread['replies'] = my_number_format(&#36;thread['replies']);
		        &#36;thread['views'] = my_number_format(&#36;thread['views']);

                //&#36;lastpostdate = my_date(&#36;mybb-&gt;settings['dateformat'], &#36;thread['lastpost']);
                //&#36;lastposttime = my_date(&#36;mybb-&gt;settings['timeformat'], &#36;thread['lastpost']);

                // Don't link to guest's profiles (they have no profile).
                if(&#36;thread['lastposteruid'] == 0)
                {
                        &#36;lastposterlink = &#36;thread['lastposter'];
                }
                else
                {
                        &#36;lastposterlink = build_profile_link(&#36;thread['lastposter'], &#36;thread['lastposteruid']);
                }
                if(my_strlen(&#36;thread['subject']) &gt; 25)
                {
                        &#36;thread['subject'] = my_substr(&#36;thread['subject'], 0, 25) . "...";
                }
                &#36;thread['subject'] = htmlspecialchars_uni(&#36;parser-&gt;parse_badwords(&#36;thread['subject']));
                &#36;thread['threadlink'] = get_thread_link(&#36;thread['tid']);
                &#36;thread['lastpostlink'] = get_thread_link(&#36;thread['tid'], 0, "lastpost");
                &#36;thread['forumname'] = &#36;forum_cache[&#36;thread['fid']]['name'];
                eval("&#92;&#36;threadlist .= &#92;"".&#36;templates-&gt;get("portal_latestthreads_thread")."&#92;";");
                &#36;altbg = alt_trow();
        }
        if(&#36;threadlist)
        {
                // Show the table only if there are threads
                eval("&#92;&#36;latestthreads = &#92;"".&#36;templates-&gt;get("portal_latestthreads")."&#92;";");
        } 

// end threadlist on index</code></div></div><br />
<br />
Was ich möchte:<br />
- Nur die Titel der Threads, wenn irgendwie möglich als "Last Post"-Link (alle anderen informationen blasen die Box nur sinnlos auf).<br />
- 3x3 Links neben/untereinander<br />
<br />
Also so:<br />
<br />
Thread 1  Thread 4  Thread 7<br />
Thread 2  Thread 5  Thread 8 <br />
Thread 3  Thread 6  Thread 9<br />
<br />
<br />
Wieso ich das möchte:<br />
Wir schreiben in dem Forum unsere Rollenspiele, ich möchte, dass man direkt auf der Indexseite sieht, in welchen der Threads einer von uns gepostet hat. <img src="https://forum.mybb.de/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
Dabei ist es für uns völlig egal, wer und wann usw. Es ist nur eine Hilfe, um das schneller sehen zu können.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[(Mobiles) Theme als Standard setzen, wenn Bedingung X erfüllt]]></title>
			<link>https://forum.mybb.de/thread-39177.html</link>
			<pubDate>Sat, 08 Jun 2024 10:30:32 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=13186">TheStoryteller</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-39177.html</guid>
			<description><![CDATA[Hallo zusammen, ich hoffe, ich bin hier richtig. Es geht um kein Plugin sondern eine eigene Modifikation. Da der Fokus hier mMn auf dem PHP-Bereich liegt, habe ich es auch nicht in den Theme-Bereich gepostet. Falls das falsch war, gerne verschieben.<br />
<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Meine Ausgangssituation:</span><br />
Ich habe ein mobiles Design erstellt. Wenn das Forum nun mit einem Gerät mit einer Bildschirmbreite X aufgerufen wird (in meinem Beispiel kleiner gleich 500px), möchte ich, dass dieses bevorzugt geladen wird. <br />
Dazu gibt es noch die Bedingung, ob Mitglieder ein bestimmtes Profilfeld angehakt haben, oder nicht und ob es sich um ein Mitglied oder einen Gast handelt.<br />
<br />
Folgenden Code habe ich nun fertig gestellt und möchte diesen via Patches einfügen. Ich nehme an, dass ich diesen in die global.php einfügen muss.<br />
<br />
Der Code ist vermutlich umständlicher als nötig, aber ich kenne mich noch nicht gut genug aus, daher bitte ich um Verständnis.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #FF8000">// Function to set mobile design cookie,  weil PHP den Viewport nicht selbst bestimmen kann
</span><span style="color: #007700">function </span><span style="color: #0000BB">setMobileDesignCookie</span><span style="color: #007700">() {
</span><span style="color: #0000BB">    </span><span style="color: #007700">echo </span><span style="color: #DD0000">'&lt;script&gt;var mobileDesign = (window.innerWidth &lt;= 500) ? 1 : 0;if (document.cookie.indexOf("mobile_design=" + mobileDesign) == -1) {document.cookie = "mobile_design=" + mobileDesign + "; path=/";location.reload();}&lt;/script&gt;'</span><span style="color: #007700">;}

</span><span style="color: #0000BB">setMobileDesignCookie</span><span style="color: #007700">(); </span><span style="color: #FF8000">// Set the cookie when the page loads, damit die Info gespeichert bleibt

</span><span style="color: #007700">if (isset(</span><span style="color: #0000BB">&#36;_COOKIE</span><span style="color: #007700">[</span><span style="color: #DD0000">'mobile_design'</span><span style="color: #007700">]) &amp;&amp; </span><span style="color: #0000BB">&#36;_COOKIE</span><span style="color: #007700">[</span><span style="color: #DD0000">'mobile_design'</span><span style="color: #007700">] == </span><span style="color: #0000BB">1</span><span style="color: #007700">) { </span><span style="color: #FF8000">// Check the set cookie and if the condition is true
</span><span style="color: #0000BB">    </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">] != </span><span style="color: #0000BB">0</span><span style="color: #007700">) { </span><span style="color: #FF8000">// User is logged in
</span><span style="color: #0000BB">        </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid25'</span><span style="color: #007700">]) { </span><span style="color: #FF8000">// Profile field is active
</span><span style="color: #0000BB">            &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">] = </span><span style="color: #0000BB">29</span><span style="color: #007700">; </span><span style="color: #FF8000">// Load Mobile Design
</span><span style="color: #0000BB">        </span><span style="color: #007700">} else { </span><span style="color: #FF8000">// Profile field is not active
</span><span style="color: #0000BB">            &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">] = (int)</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">]; </span><span style="color: #FF8000">// Load Custom Design
</span><span style="color: #0000BB">        </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">} else {
</span><span style="color: #0000BB">        </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">]) { </span><span style="color: #FF8000">// User is a guest
</span><span style="color: #0000BB">            &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">] = </span><span style="color: #0000BB">29</span><span style="color: #007700">; </span><span style="color: #FF8000">// Cookied Design = mobile Design
</span><span style="color: #0000BB">        </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
} else { </span><span style="color: #FF8000">// Viewport is larger
</span><span style="color: #0000BB">    </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">] != </span><span style="color: #0000BB">0</span><span style="color: #007700">) { </span><span style="color: #FF8000">// User is logged in
</span><span style="color: #0000BB">        &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">] = (int)</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">]; </span><span style="color: #FF8000">// Load Custom Design
</span><span style="color: #0000BB">    </span><span style="color: #007700">} else { </span><span style="color: #FF8000">// User is a guest
</span><span style="color: #0000BB">        &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">] = (int)</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">]; </span><span style="color: #FF8000">// Load Cookied Design
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
} 
</span></code></div></div></div><br />
<br />
Nun habe ich aber folgendes <span style="font-weight: bold;" class="mycode_b">Problem</span>:<br />
Egal ob ich mich ausloggen möchte, einen Beitrag posten möchte oder auch nur ein Thema ansehen möchte, bekomme ich eine <span style="font-weight: bold;" class="mycode_b">weiße Seite</span> und die Aktion wurde nicht durchgeführt. <br />
<br />
Ich habe den Code schon gefühlt an alle möglichen Stellen gesetzt, die zumindest für mich Anfänger als sinnvoll schienen (vor und nach "&#36;plugins-&gt;run_hooks('global_start');" vor und nach "// Fetch all necessary stylesheets" usw. Auch diverse KI-Tools habe ich bereits bedient, um den Code auf Richtigkeit zu prüfen, aber das Problem bleibt bestehen.<br />
<br />
Nun meine Frage: kann mir jemand helfen? <br />
<br />
Ist die global.php überhaupt die richtige Datei, oder muss ich den Code oben doch in die headerinclude packen? Oder muss er doch in eine komplett andere Datei? Oder muss ich ihn aufdröseln und kann ihn gar nicht als einen Block einfügen?<br />
<br />
An welche Stelle(n) muss ich den Code ansonsten packen?<br />
<br />
Ich hatte zwischenzeitlich auch die Vermutung, dass es evtl. an bereits bestehenden Codeänderungen liegt, die damit kollidieren, denn in meinem lokalen Testboard hat alles geklappt (allerdings hat dies eine ältere Version und nicht die gleichen Plugins installiert).<br />
<br />
Dazu habe ich euch auch mal meine global.php angehangen.<br />
<br />
Zusätzliche Infos:<br />
<br />
MyBB Version 1.8.37<br />
PHP Version 7..4.33<br />
<br />
Vorab noch zwei Dinge: <br />
<br />
1. Das Theme/Plugin GoMobile ist leider nicht kompatibel, daher musste ich eine eigene Lösung finden.<br />
2. Ich habe bereits 2 responsive Designs, es soll also hier nicht um das Thema "Mobiles Design oder doch lieber responsives Design" gehen, sondern darum, was technisch möglich ist.<br />
<br />
Ich würde mich über Feedback und Lösungsansätze freuen.<br />
<br />
<img src="https://forum.mybb.de/images/attachtypes/php.png" title="PHP File" border="0" alt=".php" />
&nbsp;&nbsp;<a href="attachment.php?aid=14076" target="_blank">global.php</a> (Größe: 39,61 KB / Downloads: 0)
]]></description>
			<content:encoded><![CDATA[Hallo zusammen, ich hoffe, ich bin hier richtig. Es geht um kein Plugin sondern eine eigene Modifikation. Da der Fokus hier mMn auf dem PHP-Bereich liegt, habe ich es auch nicht in den Theme-Bereich gepostet. Falls das falsch war, gerne verschieben.<br />
<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Meine Ausgangssituation:</span><br />
Ich habe ein mobiles Design erstellt. Wenn das Forum nun mit einem Gerät mit einer Bildschirmbreite X aufgerufen wird (in meinem Beispiel kleiner gleich 500px), möchte ich, dass dieses bevorzugt geladen wird. <br />
Dazu gibt es noch die Bedingung, ob Mitglieder ein bestimmtes Profilfeld angehakt haben, oder nicht und ob es sich um ein Mitglied oder einen Gast handelt.<br />
<br />
Folgenden Code habe ich nun fertig gestellt und möchte diesen via Patches einfügen. Ich nehme an, dass ich diesen in die global.php einfügen muss.<br />
<br />
Der Code ist vermutlich umständlicher als nötig, aber ich kenne mich noch nicht gut genug aus, daher bitte ich um Verständnis.<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #FF8000">// Function to set mobile design cookie,  weil PHP den Viewport nicht selbst bestimmen kann
</span><span style="color: #007700">function </span><span style="color: #0000BB">setMobileDesignCookie</span><span style="color: #007700">() {
</span><span style="color: #0000BB">    </span><span style="color: #007700">echo </span><span style="color: #DD0000">'&lt;script&gt;var mobileDesign = (window.innerWidth &lt;= 500) ? 1 : 0;if (document.cookie.indexOf("mobile_design=" + mobileDesign) == -1) {document.cookie = "mobile_design=" + mobileDesign + "; path=/";location.reload();}&lt;/script&gt;'</span><span style="color: #007700">;}

</span><span style="color: #0000BB">setMobileDesignCookie</span><span style="color: #007700">(); </span><span style="color: #FF8000">// Set the cookie when the page loads, damit die Info gespeichert bleibt

</span><span style="color: #007700">if (isset(</span><span style="color: #0000BB">&#36;_COOKIE</span><span style="color: #007700">[</span><span style="color: #DD0000">'mobile_design'</span><span style="color: #007700">]) &amp;&amp; </span><span style="color: #0000BB">&#36;_COOKIE</span><span style="color: #007700">[</span><span style="color: #DD0000">'mobile_design'</span><span style="color: #007700">] == </span><span style="color: #0000BB">1</span><span style="color: #007700">) { </span><span style="color: #FF8000">// Check the set cookie and if the condition is true
</span><span style="color: #0000BB">    </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">] != </span><span style="color: #0000BB">0</span><span style="color: #007700">) { </span><span style="color: #FF8000">// User is logged in
</span><span style="color: #0000BB">        </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid25'</span><span style="color: #007700">]) { </span><span style="color: #FF8000">// Profile field is active
</span><span style="color: #0000BB">            &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">] = </span><span style="color: #0000BB">29</span><span style="color: #007700">; </span><span style="color: #FF8000">// Load Mobile Design
</span><span style="color: #0000BB">        </span><span style="color: #007700">} else { </span><span style="color: #FF8000">// Profile field is not active
</span><span style="color: #0000BB">            &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">] = (int)</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">]; </span><span style="color: #FF8000">// Load Custom Design
</span><span style="color: #0000BB">        </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">} else {
</span><span style="color: #0000BB">        </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">]) { </span><span style="color: #FF8000">// User is a guest
</span><span style="color: #0000BB">            &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">] = </span><span style="color: #0000BB">29</span><span style="color: #007700">; </span><span style="color: #FF8000">// Cookied Design = mobile Design
</span><span style="color: #0000BB">        </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
} else { </span><span style="color: #FF8000">// Viewport is larger
</span><span style="color: #0000BB">    </span><span style="color: #007700">if (</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">] != </span><span style="color: #0000BB">0</span><span style="color: #007700">) { </span><span style="color: #FF8000">// User is logged in
</span><span style="color: #0000BB">        &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">] = (int)</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">user</span><span style="color: #007700">[</span><span style="color: #DD0000">'style'</span><span style="color: #007700">]; </span><span style="color: #FF8000">// Load Custom Design
</span><span style="color: #0000BB">    </span><span style="color: #007700">} else { </span><span style="color: #FF8000">// User is a guest
</span><span style="color: #0000BB">        &#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">] = (int)</span><span style="color: #0000BB">&#36;mybb</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">cookies</span><span style="color: #007700">[</span><span style="color: #DD0000">'mybbtheme'</span><span style="color: #007700">]; </span><span style="color: #FF8000">// Load Cookied Design
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
} 
</span></code></div></div></div><br />
<br />
Nun habe ich aber folgendes <span style="font-weight: bold;" class="mycode_b">Problem</span>:<br />
Egal ob ich mich ausloggen möchte, einen Beitrag posten möchte oder auch nur ein Thema ansehen möchte, bekomme ich eine <span style="font-weight: bold;" class="mycode_b">weiße Seite</span> und die Aktion wurde nicht durchgeführt. <br />
<br />
Ich habe den Code schon gefühlt an alle möglichen Stellen gesetzt, die zumindest für mich Anfänger als sinnvoll schienen (vor und nach "&#36;plugins-&gt;run_hooks('global_start');" vor und nach "// Fetch all necessary stylesheets" usw. Auch diverse KI-Tools habe ich bereits bedient, um den Code auf Richtigkeit zu prüfen, aber das Problem bleibt bestehen.<br />
<br />
Nun meine Frage: kann mir jemand helfen? <br />
<br />
Ist die global.php überhaupt die richtige Datei, oder muss ich den Code oben doch in die headerinclude packen? Oder muss er doch in eine komplett andere Datei? Oder muss ich ihn aufdröseln und kann ihn gar nicht als einen Block einfügen?<br />
<br />
An welche Stelle(n) muss ich den Code ansonsten packen?<br />
<br />
Ich hatte zwischenzeitlich auch die Vermutung, dass es evtl. an bereits bestehenden Codeänderungen liegt, die damit kollidieren, denn in meinem lokalen Testboard hat alles geklappt (allerdings hat dies eine ältere Version und nicht die gleichen Plugins installiert).<br />
<br />
Dazu habe ich euch auch mal meine global.php angehangen.<br />
<br />
Zusätzliche Infos:<br />
<br />
MyBB Version 1.8.37<br />
PHP Version 7..4.33<br />
<br />
Vorab noch zwei Dinge: <br />
<br />
1. Das Theme/Plugin GoMobile ist leider nicht kompatibel, daher musste ich eine eigene Lösung finden.<br />
2. Ich habe bereits 2 responsive Designs, es soll also hier nicht um das Thema "Mobiles Design oder doch lieber responsives Design" gehen, sondern darum, was technisch möglich ist.<br />
<br />
Ich würde mich über Feedback und Lösungsansätze freuen.<br />
<br />
<img src="https://forum.mybb.de/images/attachtypes/php.png" title="PHP File" border="0" alt=".php" />
&nbsp;&nbsp;<a href="attachment.php?aid=14076" target="_blank">global.php</a> (Größe: 39,61 KB / Downloads: 0)
]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Mehrfachauswahl bei Umfragen]]></title>
			<link>https://forum.mybb.de/thread-38403.html</link>
			<pubDate>Fri, 28 Oct 2022 10:11:54 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=2924">wWs</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-38403.html</guid>
			<description><![CDATA[Kann mir einer helfen. Ich wollte wissen ob es möglich ist hier eine Mehrfachauswahl für umfragen festzulegen. <br />
Zum Beispiel 3 Abstimmungen von 4 Antworten. <br />
<br />
Über Hilfe würde ich mich freuen. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">const </span><span style="color: #0000BB">options </span><span style="color: #007700">= </span><span style="color: #0000BB">document</span><span style="color: #007700">.</span><span style="color: #0000BB">querySelectorAll</span><span style="color: #007700">(</span><span style="color: #DD0000">"label"</span><span style="color: #007700">);
for (</span><span style="color: #0000BB">let i </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">i </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">i</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">  options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #DD0000">"click"</span><span style="color: #007700">, ()=&gt;{
</span><span style="color: #0000BB">    </span><span style="color: #007700">for (</span><span style="color: #0000BB">let j </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">j </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">j</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">      </span><span style="color: #007700">if(</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">j</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">contains</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">)){
</span><span style="color: #0000BB">        options</span><span style="color: #007700">[</span><span style="color: #0000BB">j</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">remove</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">);
</span><span style="color: #0000BB">      </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}

</span><span style="color: #0000BB">    options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">add</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">for (</span><span style="color: #0000BB">let k </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">k </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">k</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">      options</span><span style="color: #007700">[</span><span style="color: #0000BB">k</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">add</span><span style="color: #007700">(</span><span style="color: #DD0000">"selectall"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">}

</span><span style="color: #0000BB">    let forVal </span><span style="color: #007700">= </span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">getAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"for"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    let selectInput </span><span style="color: #007700">= </span><span style="color: #0000BB">document</span><span style="color: #007700">.</span><span style="color: #0000BB">querySelector</span><span style="color: #007700">(</span><span style="color: #DD0000">"#"</span><span style="color: #007700">+</span><span style="color: #0000BB">forVal</span><span style="color: #007700">);
</span><span style="color: #0000BB">    let getAtt </span><span style="color: #007700">= </span><span style="color: #0000BB">selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">getAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"type"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">if(</span><span style="color: #0000BB">getAtt </span><span style="color: #007700">== </span><span style="color: #DD0000">"checkbox"</span><span style="color: #007700">){
</span><span style="color: #0000BB">      selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">setAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"type"</span><span style="color: #007700">, </span><span style="color: #DD0000">"radio"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">}else if(</span><span style="color: #0000BB">selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">checked </span><span style="color: #007700">== </span><span style="color: #0000BB">true</span><span style="color: #007700">){
</span><span style="color: #0000BB">      options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">remove</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">);
</span><span style="color: #0000BB">      selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">setAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"type"</span><span style="color: #007700">, </span><span style="color: #DD0000">"checkbox"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">}

</span><span style="color: #0000BB">    let </span><span style="color: #007700">array = [];
</span><span style="color: #0000BB">    </span><span style="color: #007700">for (</span><span style="color: #0000BB">let l </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">l </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">l</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">      </span><span style="color: #007700">if(</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">l</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">contains</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">)){
</span><span style="color: #0000BB">        </span><span style="color: #007700">array.</span><span style="color: #0000BB">push</span><span style="color: #007700">(</span><span style="color: #0000BB">l</span><span style="color: #007700">);
</span><span style="color: #0000BB">      </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">if(array.</span><span style="color: #0000BB">length </span><span style="color: #007700">== </span><span style="color: #0000BB">0</span><span style="color: #007700">){
</span><span style="color: #0000BB">      </span><span style="color: #007700">for (</span><span style="color: #0000BB">let m </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">m </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">m</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">        options</span><span style="color: #007700">[</span><span style="color: #0000BB">m</span><span style="color: #007700">].</span><span style="color: #0000BB">removeAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"class"</span><span style="color: #007700">);
</span><span style="color: #0000BB">      </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
</span><span style="color: #0000BB">  </span><span style="color: #007700">});
} 
</span></code></div></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&amp;display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: FAFAFA;
}
.wrapper{
  padding: 30px;
  background: #fff;
  max-width: 500px;
  width: 100%;
  box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.1);
}

@media (max-width:675px){
    .wrapper{
        max-width: 300px;
}
}

.wrapper header{
  font-size: 22px;
  font-weight: 600;
}
.wrapper .poll-area{
  margin: 20px 0 15px 0;
}
.poll-area label{
  display: block;
  margin-bottom: 10px;
  padding: 8px 15px;
  border: 2px solid #e6e6e6;
  transition: all 0.2s ease;
}

label.opt-1.selected { 
    border: 2px solid #cf2d00;
}

label.opt-2.selected {
    border: 2px solid #4bcc00;
}

label.opt-3.selected {
    border: 2px solid #cfbd00;
}

label.opt-4.selected {
    border: 2px solid #01638c;
}

div#pstyle1::after {
    background: #cf2d00 !important;
}

div#pstyle2::after {
    background: #4bcc00 !important;
}

div#pstyle3::after {
    background:  #cfbd00 !important;
}

div#pstyle4::after {
    background: #01638c !important;
}

label.opt-1.selected .row .circle{
    border-color: #cf2d00 !important;
  }

  label.opt-2.selected .row .circle{
    border-color: #4bcc00 !important;
  }

  label.opt-3.selected .row .circle{
    border-color: #cfbd00 !important;
  }
  
  label.opt-4.selected .row .circle{
    border-color: #01638c !important;
  }


label.opt-1 .row .circle::after{
    background: #cf2d00 !important;
  }

  label.opt-2 .row .circle::after{
    background: #4bcc00 !important;
}

  label.opt-3 .row .circle::after{
    background: #cfbd00 !important;
  }

  label.opt-4 .row .circle::after{
    background: #01638c !important;
  }

label .row{
  display: flex;
  pointer-events: none;
  justify-content: space-between;
}
label .row .column{
  display: flex;
  align-items: center;
}
label .row .circle{
  height: 19px;
  width: 19px;
  display: block;
  border: 2px solid #ccc;
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
}
label .row .circle::after{
  content: "";
  height: 11px;
  width: 11px;
  border-radius: inherit;
  position: absolute;
  left: 2px;
  top: 2px;
  display: none;
}
.poll-area label:hover .row .circle::after{
  display: block;
  background: #e6e6e6;
}
label.selected .row .circle::after{
  display: block;
}
label .row span{
  font-size: 16px;
  font-weight: 500;
}
label .row .percent{
  display: none;
}
label .progress{
  height: 7px;
  width: 100%;
  position: relative;
  background: #f0f0f0;
  margin: 8px 0 3px 0;
  border-radius: 30px;
  display: none;
  pointer-events: none;
}
label .progress:after{
  position: absolute;
  content: "";
  height: 100%;
  background: #ccc;
  width: calc(1% * var(--w));
  border-radius: inherit;
  transition: all 0.2s ease;
}
label.selectall .progress,
label.selectall .row .percent{
  display: block;
}
input[type="radio"],
input[type="checkbox"]{
  display: none;
}</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;title&gt;RustFlash | Umfrage&lt;/title&gt;
  &lt;link rel="stylesheet" href="css/style.css"&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div class="wrapper"&gt;
    &lt;header&gt;What Design tool do you use the most? &lt;br&gt;&lt;/header&gt;
    &lt;div class="poll-area"&gt;
      &lt;input type="checkbox" name="poll" id="opt-1"&gt;
      &lt;input type="checkbox" name="poll" id="opt-2"&gt;
      &lt;input type="checkbox" name="poll" id="opt-3"&gt;
      &lt;input type="checkbox" name="poll" id="opt-4"&gt;
      &lt;label for="opt-1" class="opt-1"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Photoshop&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;55%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle1" style='--w:55;'&gt;&lt;/div&gt;
      &lt;/label&gt;
      &lt;label for="opt-2" class="opt-2"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Sketch&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;20%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle2" style='--w:80;'&gt;&lt;/div&gt;
      &lt;/label&gt;
      &lt;label for="opt-3" class="opt-3"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Adobe XD&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;20%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle3" style='--w:20;'&gt;&lt;/div&gt;
      &lt;/label&gt;
      &lt;label for="opt-4" class="opt-4"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Figma&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;96%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle4" style='--w:96;'&gt;&lt;/div&gt;
      &lt;/label&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;script src="javascript/script.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</code></div></div>]]></description>
			<content:encoded><![CDATA[Kann mir einer helfen. Ich wollte wissen ob es möglich ist hier eine Mehrfachauswahl für umfragen festzulegen. <br />
Zum Beispiel 3 Abstimmungen von 4 Antworten. <br />
<br />
Über Hilfe würde ich mich freuen. <br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #007700">const </span><span style="color: #0000BB">options </span><span style="color: #007700">= </span><span style="color: #0000BB">document</span><span style="color: #007700">.</span><span style="color: #0000BB">querySelectorAll</span><span style="color: #007700">(</span><span style="color: #DD0000">"label"</span><span style="color: #007700">);
for (</span><span style="color: #0000BB">let i </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">i </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">i</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">  options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">addEventListener</span><span style="color: #007700">(</span><span style="color: #DD0000">"click"</span><span style="color: #007700">, ()=&gt;{
</span><span style="color: #0000BB">    </span><span style="color: #007700">for (</span><span style="color: #0000BB">let j </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">j </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">j</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">      </span><span style="color: #007700">if(</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">j</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">contains</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">)){
</span><span style="color: #0000BB">        options</span><span style="color: #007700">[</span><span style="color: #0000BB">j</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">remove</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">);
</span><span style="color: #0000BB">      </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}

</span><span style="color: #0000BB">    options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">add</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">for (</span><span style="color: #0000BB">let k </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">k </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">k</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">      options</span><span style="color: #007700">[</span><span style="color: #0000BB">k</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">add</span><span style="color: #007700">(</span><span style="color: #DD0000">"selectall"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">}

</span><span style="color: #0000BB">    let forVal </span><span style="color: #007700">= </span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">getAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"for"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    let selectInput </span><span style="color: #007700">= </span><span style="color: #0000BB">document</span><span style="color: #007700">.</span><span style="color: #0000BB">querySelector</span><span style="color: #007700">(</span><span style="color: #DD0000">"#"</span><span style="color: #007700">+</span><span style="color: #0000BB">forVal</span><span style="color: #007700">);
</span><span style="color: #0000BB">    let getAtt </span><span style="color: #007700">= </span><span style="color: #0000BB">selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">getAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"type"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">if(</span><span style="color: #0000BB">getAtt </span><span style="color: #007700">== </span><span style="color: #DD0000">"checkbox"</span><span style="color: #007700">){
</span><span style="color: #0000BB">      selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">setAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"type"</span><span style="color: #007700">, </span><span style="color: #DD0000">"radio"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">}else if(</span><span style="color: #0000BB">selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">checked </span><span style="color: #007700">== </span><span style="color: #0000BB">true</span><span style="color: #007700">){
</span><span style="color: #0000BB">      options</span><span style="color: #007700">[</span><span style="color: #0000BB">i</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">remove</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">);
</span><span style="color: #0000BB">      selectInput</span><span style="color: #007700">.</span><span style="color: #0000BB">setAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"type"</span><span style="color: #007700">, </span><span style="color: #DD0000">"checkbox"</span><span style="color: #007700">);
</span><span style="color: #0000BB">    </span><span style="color: #007700">}

</span><span style="color: #0000BB">    let </span><span style="color: #007700">array = [];
</span><span style="color: #0000BB">    </span><span style="color: #007700">for (</span><span style="color: #0000BB">let l </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">l </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">l</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">      </span><span style="color: #007700">if(</span><span style="color: #0000BB">options</span><span style="color: #007700">[</span><span style="color: #0000BB">l</span><span style="color: #007700">].</span><span style="color: #0000BB">classList</span><span style="color: #007700">.</span><span style="color: #0000BB">contains</span><span style="color: #007700">(</span><span style="color: #DD0000">"selected"</span><span style="color: #007700">)){
</span><span style="color: #0000BB">        </span><span style="color: #007700">array.</span><span style="color: #0000BB">push</span><span style="color: #007700">(</span><span style="color: #0000BB">l</span><span style="color: #007700">);
</span><span style="color: #0000BB">      </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">if(array.</span><span style="color: #0000BB">length </span><span style="color: #007700">== </span><span style="color: #0000BB">0</span><span style="color: #007700">){
</span><span style="color: #0000BB">      </span><span style="color: #007700">for (</span><span style="color: #0000BB">let m </span><span style="color: #007700">= </span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">m </span><span style="color: #007700">&lt; </span><span style="color: #0000BB">options</span><span style="color: #007700">.</span><span style="color: #0000BB">length</span><span style="color: #007700">; </span><span style="color: #0000BB">m</span><span style="color: #007700">++) {
</span><span style="color: #0000BB">        options</span><span style="color: #007700">[</span><span style="color: #0000BB">m</span><span style="color: #007700">].</span><span style="color: #0000BB">removeAttribute</span><span style="color: #007700">(</span><span style="color: #DD0000">"class"</span><span style="color: #007700">);
</span><span style="color: #0000BB">      </span><span style="color: #007700">}
</span><span style="color: #0000BB">    </span><span style="color: #007700">}
</span><span style="color: #0000BB">  </span><span style="color: #007700">});
} 
</span></code></div></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&amp;display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}
body{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: FAFAFA;
}
.wrapper{
  padding: 30px;
  background: #fff;
  max-width: 500px;
  width: 100%;
  box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.1);
}

@media (max-width:675px){
    .wrapper{
        max-width: 300px;
}
}

.wrapper header{
  font-size: 22px;
  font-weight: 600;
}
.wrapper .poll-area{
  margin: 20px 0 15px 0;
}
.poll-area label{
  display: block;
  margin-bottom: 10px;
  padding: 8px 15px;
  border: 2px solid #e6e6e6;
  transition: all 0.2s ease;
}

label.opt-1.selected { 
    border: 2px solid #cf2d00;
}

label.opt-2.selected {
    border: 2px solid #4bcc00;
}

label.opt-3.selected {
    border: 2px solid #cfbd00;
}

label.opt-4.selected {
    border: 2px solid #01638c;
}

div#pstyle1::after {
    background: #cf2d00 !important;
}

div#pstyle2::after {
    background: #4bcc00 !important;
}

div#pstyle3::after {
    background:  #cfbd00 !important;
}

div#pstyle4::after {
    background: #01638c !important;
}

label.opt-1.selected .row .circle{
    border-color: #cf2d00 !important;
  }

  label.opt-2.selected .row .circle{
    border-color: #4bcc00 !important;
  }

  label.opt-3.selected .row .circle{
    border-color: #cfbd00 !important;
  }
  
  label.opt-4.selected .row .circle{
    border-color: #01638c !important;
  }


label.opt-1 .row .circle::after{
    background: #cf2d00 !important;
  }

  label.opt-2 .row .circle::after{
    background: #4bcc00 !important;
}

  label.opt-3 .row .circle::after{
    background: #cfbd00 !important;
  }

  label.opt-4 .row .circle::after{
    background: #01638c !important;
  }

label .row{
  display: flex;
  pointer-events: none;
  justify-content: space-between;
}
label .row .column{
  display: flex;
  align-items: center;
}
label .row .circle{
  height: 19px;
  width: 19px;
  display: block;
  border: 2px solid #ccc;
  border-radius: 50%;
  margin-right: 10px;
  position: relative;
}
label .row .circle::after{
  content: "";
  height: 11px;
  width: 11px;
  border-radius: inherit;
  position: absolute;
  left: 2px;
  top: 2px;
  display: none;
}
.poll-area label:hover .row .circle::after{
  display: block;
  background: #e6e6e6;
}
label.selected .row .circle::after{
  display: block;
}
label .row span{
  font-size: 16px;
  font-weight: 500;
}
label .row .percent{
  display: none;
}
label .progress{
  height: 7px;
  width: 100%;
  position: relative;
  background: #f0f0f0;
  margin: 8px 0 3px 0;
  border-radius: 30px;
  display: none;
  pointer-events: none;
}
label .progress:after{
  position: absolute;
  content: "";
  height: 100%;
  background: #ccc;
  width: calc(1% * var(--w));
  border-radius: inherit;
  transition: all 0.2s ease;
}
label.selectall .progress,
label.selectall .row .percent{
  display: block;
}
input[type="radio"],
input[type="checkbox"]{
  display: none;
}</code></div></div><div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;title&gt;RustFlash | Umfrage&lt;/title&gt;
  &lt;link rel="stylesheet" href="css/style.css"&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div class="wrapper"&gt;
    &lt;header&gt;What Design tool do you use the most? &lt;br&gt;&lt;/header&gt;
    &lt;div class="poll-area"&gt;
      &lt;input type="checkbox" name="poll" id="opt-1"&gt;
      &lt;input type="checkbox" name="poll" id="opt-2"&gt;
      &lt;input type="checkbox" name="poll" id="opt-3"&gt;
      &lt;input type="checkbox" name="poll" id="opt-4"&gt;
      &lt;label for="opt-1" class="opt-1"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Photoshop&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;55%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle1" style='--w:55;'&gt;&lt;/div&gt;
      &lt;/label&gt;
      &lt;label for="opt-2" class="opt-2"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Sketch&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;20%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle2" style='--w:80;'&gt;&lt;/div&gt;
      &lt;/label&gt;
      &lt;label for="opt-3" class="opt-3"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Adobe XD&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;20%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle3" style='--w:20;'&gt;&lt;/div&gt;
      &lt;/label&gt;
      &lt;label for="opt-4" class="opt-4"&gt;
        &lt;div class="row"&gt;
          &lt;div class="column"&gt;
            &lt;span class="circle"&gt;&lt;/span&gt;
            &lt;span class="text"&gt;Figma&lt;/span&gt;
          &lt;/div&gt;
          &lt;span class="percent"&gt;96%&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class="progress" id="pstyle4" style='--w:96;'&gt;&lt;/div&gt;
      &lt;/label&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;script src="javascript/script.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</code></div></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[PHP: if-Bedingung - Wo/Wie? (profilfeld !empty ODER nur bei best. guid)]]></title>
			<link>https://forum.mybb.de/thread-38004.html</link>
			<pubDate>Sun, 17 Oct 2021 15:01:16 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=9600">Glücksklee</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-38004.html</guid>
			<description><![CDATA[Moin!<br />
<br />
Ich habe eine PHP-Seite, bei der ich u.a. Usernamen ausgeben lasse, sofern sie in einem bestimmten Profilfeld eine vorgeschriebene Angabe machen.<br />
Z.B. Alle User, die im Profilfeld fid4 die Angabe "A" machen, gebe ich über ein Template_Bit aus und alle User, die in fid4 "B" angeben, gebe ich über ein anderes Bit aus.<br />
<span style="font-style: italic;" class="mycode_i">Konkreter: Die Spieler geben ihre Herkunfts- (fid1) und Aufenthaltszeit (fid4) an und ich ermittle alle Zeitreisende, weil dabei ja Herkunft != Aufenthalt ist.</span><br />
<br />
Jetzt ist mein Problem:<br />
Ich habe eine Abfrage die alle Usernamen ausgeben soll, die in fid1 und fid4 unterschiedliche Angaben gemacht haben, da beide fids zwar anders heißen, aber die gleichen Antwortmöglichkeiten zulassen.<br />
<span style="font-style: italic;" class="mycode_i">quasi fid1 != fid4</span><br />
Nur führt diese Abfrage dazu, dass auch alle User angezeigt werden, die bisher noch KEINE ANGABE in fid4 gemacht haben. Ist ja irgendwie auch logisch, weil dann fid1 und fid4 gar nicht identisch sein können.<br />
<br />
Mein Gedanke war es also eine if-Bedingung hinzuzufügen, die eine Ausgabe nur erlaubt, sofern fid4 nicht leer ist ODER (ginge auch) diese Abfrage nur gemacht wird, wenn die User, zu denen die fids gehören, nicht der Usergruppe 2 entsprechen. Also nicht die Betrachter, sondern die Besitzer der Profilfelder. - Verständlich?<br />
<br />
Das habe ich bisher:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;times</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT * FROM mybb_users LEFT JOIN mybb_userfields ON mybb_users.uid = mybb_userfields.ufid WHERE fid4 != fid1 ORDER BY mybb_users.username ASC"</span><span style="color: #007700">) ;
    
while(</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;times</span><span style="color: #007700">)) {
</span><span style="color: #0000BB">&#36;userid </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">];
</span><span style="color: #0000BB">&#36;username </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'username'</span><span style="color: #007700">];
</span><span style="color: #0000BB">&#36;zeitreise </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid4'</span><span style="color: #007700">];
eval(</span><span style="color: #DD0000">"&#092;&#36;reise_times .= &#092;""</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;templates</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #DD0000">"bit_reisende"</span><span style="color: #007700">).</span><span style="color: #DD0000">"&#092;";"</span><span style="color: #007700">); 
} 
</span></code></div></div></div><br />
Wo muss also die if-Abfrage hin und wie muss ich sie formulieren um<br />
entweder a) if(!empty .... fid4???<br />
oder b) die guid !=2 einzubauen.<br />
<br />
Danke für mögliche Hilfen oder Tipps für eigenständiges Denken. <img src="https://forum.mybb.de/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
LG<br />
<br />
P.S.: Habe Forensoftware u. alles Weitere auf aktuellstem Stand.]]></description>
			<content:encoded><![CDATA[Moin!<br />
<br />
Ich habe eine PHP-Seite, bei der ich u.a. Usernamen ausgeben lasse, sofern sie in einem bestimmten Profilfeld eine vorgeschriebene Angabe machen.<br />
Z.B. Alle User, die im Profilfeld fid4 die Angabe "A" machen, gebe ich über ein Template_Bit aus und alle User, die in fid4 "B" angeben, gebe ich über ein anderes Bit aus.<br />
<span style="font-style: italic;" class="mycode_i">Konkreter: Die Spieler geben ihre Herkunfts- (fid1) und Aufenthaltszeit (fid4) an und ich ermittle alle Zeitreisende, weil dabei ja Herkunft != Aufenthalt ist.</span><br />
<br />
Jetzt ist mein Problem:<br />
Ich habe eine Abfrage die alle Usernamen ausgeben soll, die in fid1 und fid4 unterschiedliche Angaben gemacht haben, da beide fids zwar anders heißen, aber die gleichen Antwortmöglichkeiten zulassen.<br />
<span style="font-style: italic;" class="mycode_i">quasi fid1 != fid4</span><br />
Nur führt diese Abfrage dazu, dass auch alle User angezeigt werden, die bisher noch KEINE ANGABE in fid4 gemacht haben. Ist ja irgendwie auch logisch, weil dann fid1 und fid4 gar nicht identisch sein können.<br />
<br />
Mein Gedanke war es also eine if-Bedingung hinzuzufügen, die eine Ausgabe nur erlaubt, sofern fid4 nicht leer ist ODER (ginge auch) diese Abfrage nur gemacht wird, wenn die User, zu denen die fids gehören, nicht der Usergruppe 2 entsprechen. Also nicht die Betrachter, sondern die Besitzer der Profilfelder. - Verständlich?<br />
<br />
Das habe ich bisher:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;times</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #DD0000">"SELECT * FROM mybb_users LEFT JOIN mybb_userfields ON mybb_users.uid = mybb_userfields.ufid WHERE fid4 != fid1 ORDER BY mybb_users.username ASC"</span><span style="color: #007700">) ;
    
while(</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;times</span><span style="color: #007700">)) {
</span><span style="color: #0000BB">&#36;userid </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">];
</span><span style="color: #0000BB">&#36;username </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'username'</span><span style="color: #007700">];
</span><span style="color: #0000BB">&#36;zeitreise </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid4'</span><span style="color: #007700">];
eval(</span><span style="color: #DD0000">"&#092;&#36;reise_times .= &#092;""</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;templates</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">get</span><span style="color: #007700">(</span><span style="color: #DD0000">"bit_reisende"</span><span style="color: #007700">).</span><span style="color: #DD0000">"&#092;";"</span><span style="color: #007700">); 
} 
</span></code></div></div></div><br />
Wo muss also die if-Abfrage hin und wie muss ich sie formulieren um<br />
entweder a) if(!empty .... fid4???<br />
oder b) die guid !=2 einzubauen.<br />
<br />
Danke für mögliche Hilfen oder Tipps für eigenständiges Denken. <img src="https://forum.mybb.de/images/smilies/smile.gif" alt="Smile" title="Smile" class="smilie smilie_1" /><br />
LG<br />
<br />
P.S.: Habe Forensoftware u. alles Weitere auf aktuellstem Stand.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Customfields auf extra Seite]]></title>
			<link>https://forum.mybb.de/thread-37948.html</link>
			<pubDate>Mon, 16 Aug 2021 16:19:24 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12951">Fiji</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37948.html</guid>
			<description><![CDATA[Hallo zusammen,<br />
<br />
ich möchte im UserCP einen extra Menüpunkt für die Customfields machen. <br />
Hintergrund: Wir sind ein Foren-RPG, unser Steckbrief läuft komplett über customfields und das sind so einige. Unter "Profil ändern" hat man ja dann noch den Abwesenheitsassi und Benutzertitel etc. Deswegen möchte ich das räumlich trennen und einen Punkt haben der "Steckbrief" heißt wo rein die Customfields drin sind.<br />
<br />
HTML-technisch hab ich keine Probleme, Gestaltung der Seite, Link im Menü - alles kein Ding. <br />
Aber ich muss da ja in der usercp.php rumspielen und da ... krieg ich Panik XD Allein schon weil "usercp_profile" 41 mal darin vorkommt und ich vorher noch dachte "Ach kein Ding, orientier dich da dran und dann wird das schon" aber ich hab zu viel Schiss mir was zu verschießen. <br />
<br />
Kann mir jemand vielleicht helfen?<br />
<br />
Version ist 1.8.27<br />
<br />
Vielen Dank schon mal =) <br />
<br />
LG]]></description>
			<content:encoded><![CDATA[Hallo zusammen,<br />
<br />
ich möchte im UserCP einen extra Menüpunkt für die Customfields machen. <br />
Hintergrund: Wir sind ein Foren-RPG, unser Steckbrief läuft komplett über customfields und das sind so einige. Unter "Profil ändern" hat man ja dann noch den Abwesenheitsassi und Benutzertitel etc. Deswegen möchte ich das räumlich trennen und einen Punkt haben der "Steckbrief" heißt wo rein die Customfields drin sind.<br />
<br />
HTML-technisch hab ich keine Probleme, Gestaltung der Seite, Link im Menü - alles kein Ding. <br />
Aber ich muss da ja in der usercp.php rumspielen und da ... krieg ich Panik XD Allein schon weil "usercp_profile" 41 mal darin vorkommt und ich vorher noch dachte "Ach kein Ding, orientier dich da dran und dann wird das schon" aber ich hab zu viel Schiss mir was zu verschießen. <br />
<br />
Kann mir jemand vielleicht helfen?<br />
<br />
Version ist 1.8.27<br />
<br />
Vielen Dank schon mal =) <br />
<br />
LG]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Report Reason Escape String?]]></title>
			<link>https://forum.mybb.de/thread-37887.html</link>
			<pubDate>Sat, 19 Jun 2021 15:31:05 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=10549">skrilaxrev</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37887.html</guid>
			<description><![CDATA[Hallo,<br />
<br />
folgende Zeile scheint in einem Custom-Script nicht mehr zu funktionieren:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #DD0000">'reason' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">"Thema ohne Bericht"</span><span style="color: #007700">), 
</span></code></div></div></div><br />
Das ist der Code doch der Meldungs-Grund wird im Meldezentrum stets als <span style="font-weight: bold;" class="mycode_b">"Keine Angabe" statt "Thema ohne Bericht"</span> angegeben.<br />
<br />
Hat jemand eine Idee, da ich ja nun von <span style="font-weight: bold;" class="mycode_b">PHP 5.6 auf 7.3</span> gestellt habe?<br />
<br />
Das Script meldet uns automatisch "ungepflegte Themen" und wird täglich per Cronjob ausgeführt. Alles funktioniert noch, bis auf das.<br />
<br />
<hr class="mycode_hr" />
<br />
In der Datenbank steht sogar "Thema ohne Bericht", aber es wird anders angezeigt.<br />
<br />
<hr class="mycode_hr" />
<br />
Komisch, bei einem anderen Plugin funktioniert genau die selbe Zeile.<br />
<br />
Falls mal jemand in das ganze Script reinschauen will, hier der ganze Code:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php
    define</span><span style="color: #007700">(</span><span style="color: #DD0000">"IN_MYBB"</span><span style="color: #007700">,</span><span style="color: #0000BB">1</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/global.php"</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/inc/datahandlers/pm.php"</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/inc/functions_modcp.php"</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/inc/datahandlers/post.php"</span><span style="color: #007700">);

</span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ERROR </span><span style="color: #007700">| </span><span style="color: #0000BB">E_WARNING </span><span style="color: #007700">| </span><span style="color: #0000BB">E_PARSE </span><span style="color: #007700">| </span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);
</span><span style="color: #FF8000">// LOG schreiben mrschmock 07.10.2018
</span><span style="color: #0000BB">&#36;log </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"***************/forumupdate/custom/LOG_mrschmock.txt"</span><span style="color: #007700">, </span><span style="color: #DD0000">"a"</span><span style="color: #007700">);

    </span><span style="color: #FF8000">//Konfiguration:
    // 11 = High Yield Investments
    // 10 = Adshares, GPTs &amp; Matrix
    // 13 = MLM- &amp; Hybrid-Programme
    // 383 = ICOs, Miner, Pools, MLM-Coins
    // 359 = Prelaunches &amp; Sleeper
    </span><span style="color: #0000BB">&#36;progfid</span><span style="color: #007700">=array(</span><span style="color: #0000BB">10</span><span style="color: #007700">,</span><span style="color: #0000BB">11</span><span style="color: #007700">,</span><span style="color: #0000BB">13</span><span style="color: #007700">,</span><span style="color: #0000BB">359</span><span style="color: #007700">,</span><span style="color: #0000BB">383</span><span style="color: #007700">,</span><span style="color: #0000BB">129</span><span style="color: #007700">,</span><span style="color: #0000BB">143</span><span style="color: #007700">); </span><span style="color: #FF8000">// alle prüfen
    </span><span style="color: #0000BB">&#36;progfid1</span><span style="color: #007700">=array(</span><span style="color: #0000BB">11</span><span style="color: #007700">); </span><span style="color: #FF8000">//FID Programmüberforum 7 Tage
    </span><span style="color: #0000BB">&#36;progfid2</span><span style="color: #007700">=array(</span><span style="color: #0000BB">10</span><span style="color: #007700">,</span><span style="color: #0000BB">13</span><span style="color: #007700">,</span><span style="color: #0000BB">383</span><span style="color: #007700">,</span><span style="color: #0000BB">129</span><span style="color: #007700">,</span><span style="color: #0000BB">143</span><span style="color: #007700">); </span><span style="color: #FF8000">//FID Programmüberforum 14 Tage
    </span><span style="color: #0000BB">&#36;progfid4</span><span style="color: #007700">=array(</span><span style="color: #0000BB">359</span><span style="color: #007700">); </span><span style="color: #FF8000">//FID Programmüberforum 28 Tage
//     &#36;progfid2=array(); //FID Programmüberforum 14 Tage
    //entfällt&#36;leftthreads=array(116,140,49); //Komma separierte liste von Threads, die nicht berücksichtigt werden sollen (im Programme Forum)
    </span><span style="color: #0000BB">&#36;checktime</span><span style="color: #007700">=</span><span style="color: #0000BB">7</span><span style="color: #007700">; </span><span style="color: #FF8000">//Zeit in Tagen, ab wann gepostet wird, dass kein Bericht vorhanden ist.
    </span><span style="color: #0000BB">&#36;postmessage</span><span style="color: #007700">=</span><span style="color: #DD0000">"[update]"</span><span style="color: #007700">;
    
    </span><span style="color: #FF8000">//Funktionen:
    </span><span style="color: #007700">function </span><span style="color: #0000BB">sendPM</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fromuid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;touid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">){
        </span><span style="color: #0000BB">&#36;pmhandler </span><span style="color: #007700">= new </span><span style="color: #0000BB">PMDataHandler</span><span style="color: #007700">();
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">admin_override </span><span style="color: #007700">= </span><span style="color: #0000BB">true</span><span style="color: #007700">;
        </span><span style="color: #0000BB">&#36;pm </span><span style="color: #007700">= array(
            </span><span style="color: #DD0000">"subject" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"message" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"icon" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"fromid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;fromuid</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"do" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"pmid" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"toid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;touid</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"saveasdraft" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;pm</span><span style="color: #007700">[</span><span style="color: #DD0000">'options'</span><span style="color: #007700">] = array(
            </span><span style="color: #DD0000">"signature" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"disablesmilies" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"savecopy" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"readreceipt" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_data</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;pm</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">validate_pm</span><span style="color: #007700">();
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_pm</span><span style="color: #007700">();
    }
    function </span><span style="color: #0000BB">sendPost</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;forumid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;threadid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">){
        </span><span style="color: #0000BB">&#36;stickyquery </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">simple_select</span><span style="color: #007700">(</span><span style="color: #DD0000">"threads"</span><span style="color: #007700">, </span><span style="color: #DD0000">"*"</span><span style="color: #007700">, </span><span style="color: #DD0000">"tid="</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;threadid</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;sticky </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_field</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stickyquery</span><span style="color: #007700">, </span><span style="color: #DD0000">"sticky"</span><span style="color: #007700">);
        
        </span><span style="color: #0000BB">&#36;posthandler </span><span style="color: #007700">= new </span><span style="color: #0000BB">PostDataHandler</span><span style="color: #007700">(</span><span style="color: #DD0000">"insert"</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;userarray</span><span style="color: #007700">=</span><span style="color: #0000BB">get_user</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uid</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;new_post </span><span style="color: #007700">= array(
            </span><span style="color: #DD0000">"tid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;threadid</span><span style="color: #007700">, </span><span style="color: #FF8000">//1468
            </span><span style="color: #DD0000">"fid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;forumid</span><span style="color: #007700">, </span><span style="color: #FF8000">//134
            </span><span style="color: #DD0000">"subject" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">""</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"icon" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">16</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"uid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"username" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">"Nummer1"</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"dateline" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">TIME_NOW</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"message" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"ipaddress" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">""
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;new_post</span><span style="color: #007700">[</span><span style="color: #DD0000">'options'</span><span style="color: #007700">]=array(
            </span><span style="color: #DD0000">"signature" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"subscriptionmethod" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"disablesmilies" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;posthandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_data</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;new_post</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;valid_post </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;posthandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">validate_post</span><span style="color: #007700">();
        if(</span><span style="color: #0000BB">&#36;valid_post</span><span style="color: #007700">) </span><span style="color: #0000BB">&#36;posthandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_post</span><span style="color: #007700">();
        
        </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"threads"</span><span style="color: #007700">,array(</span><span style="color: #DD0000">'sticky'</span><span style="color: #007700">=&gt;</span><span style="color: #0000BB">&#36;sticky</span><span style="color: #007700">),</span><span style="color: #DD0000">"tid=</span><span style="color: #0000BB">&#36;threadid</span><span style="color: #DD0000">"</span><span style="color: #007700">);
    }
    
</span><span style="color: #FF8000">/*    function zwischenstring (&#36;start, &#36;ende, &#36;string) {
      return reset (explode (&#36;ende, end (explode (&#36;start, &#36;string))));
    }*/
    
    //Zeit in datetime Format umrechnen
    </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
    </span><span style="color: #0000BB">&#36;checktimenn</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">2 </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
    
    </span><span style="color: #FF8000">//Get all threads with link to azthread
    </span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">=array();    </span><span style="color: #0000BB">&#36;firstposts</span><span style="color: #007700">=array(); </span><span style="color: #0000BB">&#36;forumsids</span><span style="color: #007700">=array(); </span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">=array();</span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">=array();
    </span><span style="color: #FF8000">//message like '%&#092;[azb=%&#092;]%'  AND

// Änderung 10.09.2018:
//    &#36;querytext="SELECT firstpost,tid,uid,fid FROM mybb_threads WHERE (fid IN (".implode(",", &#36;progfid1).") or fid IN (".implode(",",&#36;progfid2).")) AND visible&gt;0  AND closed = ''"; //icon IN (2,3) AND
// Änderung 10.10.2018:
// &#36;querytext="SELECT firstpost,tid,uid,fid FROM mybb_threads WHERE (fid IN (".implode(",", &#36;progfid1).")) AND visible&gt;0  AND closed = ''"; //icon IN (2,3) AND
</span><span style="color: #0000BB">&#36;querytext</span><span style="color: #007700">=</span><span style="color: #DD0000">"SELECT firstpost,tid,uid,fid FROM mybb_threads WHERE (fid IN ("</span><span style="color: #007700">.</span><span style="color: #0000BB">implode</span><span style="color: #007700">(</span><span style="color: #DD0000">","</span><span style="color: #007700">, </span><span style="color: #0000BB">&#36;progfid</span><span style="color: #007700">).</span><span style="color: #DD0000">")) AND visible&gt;0  AND closed = ''"</span><span style="color: #007700">; </span><span style="color: #FF8000">//icon IN (2,3) AND
    </span><span style="color: #0000BB">&#36;query </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;querytext</span><span style="color: #007700">);
    while(</span><span style="color: #0000BB">&#36;result </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;query</span><span style="color: #007700">)){

        </span><span style="color: #FF8000">//Zeit in datetime Format umrechnen
        </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
     if(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid'</span><span style="color: #007700">],</span><span style="color: #0000BB">&#36;progfid2</span><span style="color: #007700">)) </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">2 </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
     if(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid'</span><span style="color: #007700">],</span><span style="color: #0000BB">&#36;progfid4</span><span style="color: #007700">)) </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">4 </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
        
        </span><span style="color: #FF8000">//&#36;querytext2 = "SELECT tid,fid,dateline FROM mybb_posts WHERE tid = ".&#36;result['tid']." AND uid=".&#36;result['uid']." order by dateline DESC limit 1 ";//&#36;db-&gt;simple_select("posts", "tid,fid", "lastpost&lt;&#36;checktimen AND tid=&#36;temptid", array("order_dir" =&gt; 'DESC',"limit" =&gt; 1));
        </span><span style="color: #0000BB">&#36;querytext2 </span><span style="color: #007700">= </span><span style="color: #DD0000">"SELECT pid, tid,fid,dateline FROM mybb_posts WHERE tid = "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'tid'</span><span style="color: #007700">].</span><span style="color: #DD0000">" AND (uid="</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">].</span><span style="color: #DD0000">" OR uid=1 AND message LIKE '[update]') order by dateline DESC limit 1 "</span><span style="color: #007700">;
        </span><span style="color: #0000BB">&#36;query2 </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;querytext2</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;result2 </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;query2</span><span style="color: #007700">);

        if(</span><span style="color: #0000BB">&#36;result2</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">]&lt;</span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">){
            </span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'tid'</span><span style="color: #007700">];    
            </span><span style="color: #0000BB">&#36;forumsids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result2</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid'</span><span style="color: #007700">];
            </span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">];
            </span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'firstpost'</span><span style="color: #007700">];    
        }

    }
</span><span style="color: #FF8000">// 30.10.2018 Außnahme für Nummer 1 und Ungepflegt durch mrschmock
// ALT:
//    &#36;leavetids=array(16121); /* TIDs Ausschließen */
//    for(&#36;i=0;&#36;i&lt;count(&#36;progthreadids);&#36;i++){
//        if (!in_array(&#36;progthreadids[&#36;i], &#36;leavetids)) {
// ALT ENDE

// NEU:
    </span><span style="color: #0000BB">&#36;leaveuids</span><span style="color: #007700">=array(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #0000BB">10538</span><span style="color: #007700">,</span><span style="color: #0000BB">10743</span><span style="color: #007700">); </span><span style="color: #FF8000">/* UIDs Ausschließen */
    </span><span style="color: #007700">for(</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">count</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">);</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">++){
        if (!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">], </span><span style="color: #0000BB">&#36;leaveuids</span><span style="color: #007700">)) {
</span><span style="color: #FF8000">// NEU ENDE
// 30.10.2018 ENDE
            /* TEXT PETER ANPASSEN: (vor kommt vor [update] und nach danach) */
            </span><span style="color: #0000BB">&#36;petertextvor</span><span style="color: #007700">=</span><span style="color: #DD0000">'Bitte poste innerhalb der nächsten 72 Stunden deinen Bericht [url=https://x-invest.net/new/forumupdate/showthread.php?tid='</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">'&amp;action=lastpost]in diesem Thema von dir[/url]!

            '</span><span style="color: #007700">;
            </span><span style="color: #0000BB">&#36;petertextnach</span><span style="color: #007700">=</span><span style="color: #DD0000">""</span><span style="color: #007700">;
            </span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">=</span><span style="color: #DD0000">"Erinnerung für deinen Bericht + 7 Tipps was du schreiben kannst"</span><span style="color: #007700">;
            
            </span><span style="color: #FF8000">//PM senden
            </span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;petertextvor</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;postmessage</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;petertextnach</span><span style="color: #007700">;
            </span><span style="color: #0000BB">sendPM</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">);
            
</span><span style="color: #FF8000">// LOG schreiben mrschmock 07.10.2018
</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;log</span><span style="color: #007700">, </span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d.m.Y H:i:s'</span><span style="color: #007700">).</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;forumids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">.</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">.</span><span style="color: #DD0000">"&#092;r&#092;n"</span><span style="color: #007700">);
            
            
            </span><span style="color: #FF8000">/* modcp hinzufügen */
            </span><span style="color: #0000BB">&#36;new_report </span><span style="color: #007700">= array(
                </span><span style="color: #DD0000">'id' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'id2' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'id3' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;forumsids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'uid' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'reportstatus' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'reason' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">"Thema ohne Bericht"</span><span style="color: #007700">),
                </span><span style="color: #DD0000">'type' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'post'</span><span style="color: #007700">),
                </span><span style="color: #DD0000">'reports' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'dateline' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">TIME_NOW</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'lastreport' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">TIME_NOW</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'reporters' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">my_serialize</span><span style="color: #007700">(array(</span><span style="color: #0000BB">1</span><span style="color: #007700">)))
            );
            </span><span style="color: #0000BB">add_report</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;new_report</span><span style="color: #007700">, </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'post'</span><span style="color: #007700">));
            
            </span><span style="color: #FF8000">//sendPost(&#36;postmessage,&#36;forumsids[&#36;i],&#36;progthreadids[&#36;i],&#36;db);
            //echo '&lt;a href="https://x-invest.net/forum/showthread.php?tid='.&#36;progthreadids[&#36;i].'&amp;action=lastpost"&gt;Thread '.&#36;progthreadids[&#36;i].'&lt;/a&gt;&lt;br&gt;';
            //echo &#36;progthreadids[&#36;i]."&lt;br&gt;".&#36;pids[&#36;i]."&lt;br&gt;".&#36;forumsids[&#36;i]."&lt;br&gt;".&#36;userids[&#36;i];

        </span><span style="color: #007700">}
    }
</span><span style="color: #FF8000">// LOG schreiben mrschmock 07.10.2018
</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;log</span><span style="color: #007700">);
</span><span style="color: #0000BB">?&gt;</span></code></div></div></div><hr class="mycode_hr" />
Ich sehe gerade <span style="font-weight: bold;" class="mycode_b">"reasonid" steht in der Datenbank auf "0", sollte aber "1" sein</span>.<br />
Das dürfte der <span style="font-weight: bold;" class="mycode_b">Grund für den Fehler</span> sein. Jemand eine Idee woran das im Code liegt?<br />
<hr class="mycode_hr" />
Ich habe jetzt folgendes ergänzt und jetzt wird der Meldegrund korrekt angegeben:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #DD0000">'reasonid' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">, 
</span></code></div></div></div><br />
Vorher hat es immer ohne geklappt, aber siehe da, ich habe es schon alleine hinbekommen (Jubelmodus). <img src="https://forum.mybb.de/images/smilies/biggrin.gif" alt="Big Grin" title="Big Grin" class="smilie smilie_5" /><br />
<br />
Vielen Dank fürs Zuhören! <img src="https://forum.mybb.de/images/smilies/biggrin.gif" alt="Big Grin" title="Big Grin" class="smilie smilie_5" />]]></description>
			<content:encoded><![CDATA[Hallo,<br />
<br />
folgende Zeile scheint in einem Custom-Script nicht mehr zu funktionieren:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #DD0000">'reason' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">"Thema ohne Bericht"</span><span style="color: #007700">), 
</span></code></div></div></div><br />
Das ist der Code doch der Meldungs-Grund wird im Meldezentrum stets als <span style="font-weight: bold;" class="mycode_b">"Keine Angabe" statt "Thema ohne Bericht"</span> angegeben.<br />
<br />
Hat jemand eine Idee, da ich ja nun von <span style="font-weight: bold;" class="mycode_b">PHP 5.6 auf 7.3</span> gestellt habe?<br />
<br />
Das Script meldet uns automatisch "ungepflegte Themen" und wird täglich per Cronjob ausgeführt. Alles funktioniert noch, bis auf das.<br />
<br />
<hr class="mycode_hr" />
<br />
In der Datenbank steht sogar "Thema ohne Bericht", aber es wird anders angezeigt.<br />
<br />
<hr class="mycode_hr" />
<br />
Komisch, bei einem anderen Plugin funktioniert genau die selbe Zeile.<br />
<br />
Falls mal jemand in das ganze Script reinschauen will, hier der ganze Code:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&lt;?php
    define</span><span style="color: #007700">(</span><span style="color: #DD0000">"IN_MYBB"</span><span style="color: #007700">,</span><span style="color: #0000BB">1</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/global.php"</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/inc/datahandlers/pm.php"</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/inc/functions_modcp.php"</span><span style="color: #007700">);
    require_once(</span><span style="color: #DD0000">"***************/new/forumupdate/inc/datahandlers/post.php"</span><span style="color: #007700">);

</span><span style="color: #0000BB">error_reporting</span><span style="color: #007700">(</span><span style="color: #0000BB">E_ERROR </span><span style="color: #007700">| </span><span style="color: #0000BB">E_WARNING </span><span style="color: #007700">| </span><span style="color: #0000BB">E_PARSE </span><span style="color: #007700">| </span><span style="color: #0000BB">E_NOTICE</span><span style="color: #007700">);
</span><span style="color: #FF8000">// LOG schreiben mrschmock 07.10.2018
</span><span style="color: #0000BB">&#36;log </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">"***************/forumupdate/custom/LOG_mrschmock.txt"</span><span style="color: #007700">, </span><span style="color: #DD0000">"a"</span><span style="color: #007700">);

    </span><span style="color: #FF8000">//Konfiguration:
    // 11 = High Yield Investments
    // 10 = Adshares, GPTs &amp; Matrix
    // 13 = MLM- &amp; Hybrid-Programme
    // 383 = ICOs, Miner, Pools, MLM-Coins
    // 359 = Prelaunches &amp; Sleeper
    </span><span style="color: #0000BB">&#36;progfid</span><span style="color: #007700">=array(</span><span style="color: #0000BB">10</span><span style="color: #007700">,</span><span style="color: #0000BB">11</span><span style="color: #007700">,</span><span style="color: #0000BB">13</span><span style="color: #007700">,</span><span style="color: #0000BB">359</span><span style="color: #007700">,</span><span style="color: #0000BB">383</span><span style="color: #007700">,</span><span style="color: #0000BB">129</span><span style="color: #007700">,</span><span style="color: #0000BB">143</span><span style="color: #007700">); </span><span style="color: #FF8000">// alle prüfen
    </span><span style="color: #0000BB">&#36;progfid1</span><span style="color: #007700">=array(</span><span style="color: #0000BB">11</span><span style="color: #007700">); </span><span style="color: #FF8000">//FID Programmüberforum 7 Tage
    </span><span style="color: #0000BB">&#36;progfid2</span><span style="color: #007700">=array(</span><span style="color: #0000BB">10</span><span style="color: #007700">,</span><span style="color: #0000BB">13</span><span style="color: #007700">,</span><span style="color: #0000BB">383</span><span style="color: #007700">,</span><span style="color: #0000BB">129</span><span style="color: #007700">,</span><span style="color: #0000BB">143</span><span style="color: #007700">); </span><span style="color: #FF8000">//FID Programmüberforum 14 Tage
    </span><span style="color: #0000BB">&#36;progfid4</span><span style="color: #007700">=array(</span><span style="color: #0000BB">359</span><span style="color: #007700">); </span><span style="color: #FF8000">//FID Programmüberforum 28 Tage
//     &#36;progfid2=array(); //FID Programmüberforum 14 Tage
    //entfällt&#36;leftthreads=array(116,140,49); //Komma separierte liste von Threads, die nicht berücksichtigt werden sollen (im Programme Forum)
    </span><span style="color: #0000BB">&#36;checktime</span><span style="color: #007700">=</span><span style="color: #0000BB">7</span><span style="color: #007700">; </span><span style="color: #FF8000">//Zeit in Tagen, ab wann gepostet wird, dass kein Bericht vorhanden ist.
    </span><span style="color: #0000BB">&#36;postmessage</span><span style="color: #007700">=</span><span style="color: #DD0000">"[update]"</span><span style="color: #007700">;
    
    </span><span style="color: #FF8000">//Funktionen:
    </span><span style="color: #007700">function </span><span style="color: #0000BB">sendPM</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;fromuid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;touid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">){
        </span><span style="color: #0000BB">&#36;pmhandler </span><span style="color: #007700">= new </span><span style="color: #0000BB">PMDataHandler</span><span style="color: #007700">();
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">admin_override </span><span style="color: #007700">= </span><span style="color: #0000BB">true</span><span style="color: #007700">;
        </span><span style="color: #0000BB">&#36;pm </span><span style="color: #007700">= array(
            </span><span style="color: #DD0000">"subject" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"message" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"icon" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"fromid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;fromuid</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"do" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"pmid" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">''</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"toid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;touid</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"saveasdraft" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;pm</span><span style="color: #007700">[</span><span style="color: #DD0000">'options'</span><span style="color: #007700">] = array(
            </span><span style="color: #DD0000">"signature" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"disablesmilies" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"savecopy" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"readreceipt" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_data</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;pm</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">validate_pm</span><span style="color: #007700">();
        </span><span style="color: #0000BB">&#36;pmhandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_pm</span><span style="color: #007700">();
    }
    function </span><span style="color: #0000BB">sendPost</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;forumid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;threadid</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">){
        </span><span style="color: #0000BB">&#36;stickyquery </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">simple_select</span><span style="color: #007700">(</span><span style="color: #DD0000">"threads"</span><span style="color: #007700">, </span><span style="color: #DD0000">"*"</span><span style="color: #007700">, </span><span style="color: #DD0000">"tid="</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;threadid</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;sticky </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_field</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;stickyquery</span><span style="color: #007700">, </span><span style="color: #DD0000">"sticky"</span><span style="color: #007700">);
        
        </span><span style="color: #0000BB">&#36;posthandler </span><span style="color: #007700">= new </span><span style="color: #0000BB">PostDataHandler</span><span style="color: #007700">(</span><span style="color: #DD0000">"insert"</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;userarray</span><span style="color: #007700">=</span><span style="color: #0000BB">get_user</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;uid</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;new_post </span><span style="color: #007700">= array(
            </span><span style="color: #DD0000">"tid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;threadid</span><span style="color: #007700">, </span><span style="color: #FF8000">//1468
            </span><span style="color: #DD0000">"fid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;forumid</span><span style="color: #007700">, </span><span style="color: #FF8000">//134
            </span><span style="color: #DD0000">"subject" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">""</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"icon" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">16</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"uid" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"username" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">"Nummer1"</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"dateline" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">TIME_NOW</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"message" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"ipaddress" </span><span style="color: #007700">=&gt; </span><span style="color: #DD0000">""
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;new_post</span><span style="color: #007700">[</span><span style="color: #DD0000">'options'</span><span style="color: #007700">]=array(
            </span><span style="color: #DD0000">"signature" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"subscriptionmethod" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
            </span><span style="color: #DD0000">"disablesmilies" </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0
        </span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;posthandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">set_data</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;new_post</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;valid_post </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;posthandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">validate_post</span><span style="color: #007700">();
        if(</span><span style="color: #0000BB">&#36;valid_post</span><span style="color: #007700">) </span><span style="color: #0000BB">&#36;posthandler</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">insert_post</span><span style="color: #007700">();
        
        </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">update_query</span><span style="color: #007700">(</span><span style="color: #DD0000">"threads"</span><span style="color: #007700">,array(</span><span style="color: #DD0000">'sticky'</span><span style="color: #007700">=&gt;</span><span style="color: #0000BB">&#36;sticky</span><span style="color: #007700">),</span><span style="color: #DD0000">"tid=</span><span style="color: #0000BB">&#36;threadid</span><span style="color: #DD0000">"</span><span style="color: #007700">);
    }
    
</span><span style="color: #FF8000">/*    function zwischenstring (&#36;start, &#36;ende, &#36;string) {
      return reset (explode (&#36;ende, end (explode (&#36;start, &#36;string))));
    }*/
    
    //Zeit in datetime Format umrechnen
    </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
    </span><span style="color: #0000BB">&#36;checktimenn</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">2 </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
    
    </span><span style="color: #FF8000">//Get all threads with link to azthread
    </span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">=array();    </span><span style="color: #0000BB">&#36;firstposts</span><span style="color: #007700">=array(); </span><span style="color: #0000BB">&#36;forumsids</span><span style="color: #007700">=array(); </span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">=array();</span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">=array();
    </span><span style="color: #FF8000">//message like '%&#092;[azb=%&#092;]%'  AND

// Änderung 10.09.2018:
//    &#36;querytext="SELECT firstpost,tid,uid,fid FROM mybb_threads WHERE (fid IN (".implode(",", &#36;progfid1).") or fid IN (".implode(",",&#36;progfid2).")) AND visible&gt;0  AND closed = ''"; //icon IN (2,3) AND
// Änderung 10.10.2018:
// &#36;querytext="SELECT firstpost,tid,uid,fid FROM mybb_threads WHERE (fid IN (".implode(",", &#36;progfid1).")) AND visible&gt;0  AND closed = ''"; //icon IN (2,3) AND
</span><span style="color: #0000BB">&#36;querytext</span><span style="color: #007700">=</span><span style="color: #DD0000">"SELECT firstpost,tid,uid,fid FROM mybb_threads WHERE (fid IN ("</span><span style="color: #007700">.</span><span style="color: #0000BB">implode</span><span style="color: #007700">(</span><span style="color: #DD0000">","</span><span style="color: #007700">, </span><span style="color: #0000BB">&#36;progfid</span><span style="color: #007700">).</span><span style="color: #DD0000">")) AND visible&gt;0  AND closed = ''"</span><span style="color: #007700">; </span><span style="color: #FF8000">//icon IN (2,3) AND
    </span><span style="color: #0000BB">&#36;query </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;querytext</span><span style="color: #007700">);
    while(</span><span style="color: #0000BB">&#36;result </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;query</span><span style="color: #007700">)){

        </span><span style="color: #FF8000">//Zeit in datetime Format umrechnen
        </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
     if(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid'</span><span style="color: #007700">],</span><span style="color: #0000BB">&#36;progfid2</span><span style="color: #007700">)) </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">2 </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
     if(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid'</span><span style="color: #007700">],</span><span style="color: #0000BB">&#36;progfid4</span><span style="color: #007700">)) </span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">=</span><span style="color: #0000BB">TIME_NOW </span><span style="color: #007700">- (</span><span style="color: #0000BB">&#36;checktime </span><span style="color: #007700">* </span><span style="color: #0000BB">4 </span><span style="color: #007700">* </span><span style="color: #0000BB">24 </span><span style="color: #007700">* </span><span style="color: #0000BB">60 </span><span style="color: #007700">* </span><span style="color: #0000BB">60</span><span style="color: #007700">);
        
        </span><span style="color: #FF8000">//&#36;querytext2 = "SELECT tid,fid,dateline FROM mybb_posts WHERE tid = ".&#36;result['tid']." AND uid=".&#36;result['uid']." order by dateline DESC limit 1 ";//&#36;db-&gt;simple_select("posts", "tid,fid", "lastpost&lt;&#36;checktimen AND tid=&#36;temptid", array("order_dir" =&gt; 'DESC',"limit" =&gt; 1));
        </span><span style="color: #0000BB">&#36;querytext2 </span><span style="color: #007700">= </span><span style="color: #DD0000">"SELECT pid, tid,fid,dateline FROM mybb_posts WHERE tid = "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'tid'</span><span style="color: #007700">].</span><span style="color: #DD0000">" AND (uid="</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">].</span><span style="color: #DD0000">" OR uid=1 AND message LIKE '[update]') order by dateline DESC limit 1 "</span><span style="color: #007700">;
        </span><span style="color: #0000BB">&#36;query2 </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">query</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;querytext2</span><span style="color: #007700">);
        </span><span style="color: #0000BB">&#36;result2 </span><span style="color: #007700">= </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">fetch_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;query2</span><span style="color: #007700">);

        if(</span><span style="color: #0000BB">&#36;result2</span><span style="color: #007700">[</span><span style="color: #DD0000">'dateline'</span><span style="color: #007700">]&lt;</span><span style="color: #0000BB">&#36;checktimen</span><span style="color: #007700">){
            </span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'tid'</span><span style="color: #007700">];    
            </span><span style="color: #0000BB">&#36;forumsids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result2</span><span style="color: #007700">[</span><span style="color: #DD0000">'fid'</span><span style="color: #007700">];
            </span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'uid'</span><span style="color: #007700">];
            </span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">[]=(int)</span><span style="color: #0000BB">&#36;result</span><span style="color: #007700">[</span><span style="color: #DD0000">'firstpost'</span><span style="color: #007700">];    
        }

    }
</span><span style="color: #FF8000">// 30.10.2018 Außnahme für Nummer 1 und Ungepflegt durch mrschmock
// ALT:
//    &#36;leavetids=array(16121); /* TIDs Ausschließen */
//    for(&#36;i=0;&#36;i&lt;count(&#36;progthreadids);&#36;i++){
//        if (!in_array(&#36;progthreadids[&#36;i], &#36;leavetids)) {
// ALT ENDE

// NEU:
    </span><span style="color: #0000BB">&#36;leaveuids</span><span style="color: #007700">=array(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #0000BB">10538</span><span style="color: #007700">,</span><span style="color: #0000BB">10743</span><span style="color: #007700">); </span><span style="color: #FF8000">/* UIDs Ausschließen */
    </span><span style="color: #007700">for(</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">;</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">count</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">);</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">++){
        if (!</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">], </span><span style="color: #0000BB">&#36;leaveuids</span><span style="color: #007700">)) {
</span><span style="color: #FF8000">// NEU ENDE
// 30.10.2018 ENDE
            /* TEXT PETER ANPASSEN: (vor kommt vor [update] und nach danach) */
            </span><span style="color: #0000BB">&#36;petertextvor</span><span style="color: #007700">=</span><span style="color: #DD0000">'Bitte poste innerhalb der nächsten 72 Stunden deinen Bericht [url=https://x-invest.net/new/forumupdate/showthread.php?tid='</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">'&amp;action=lastpost]in diesem Thema von dir[/url]!

            '</span><span style="color: #007700">;
            </span><span style="color: #0000BB">&#36;petertextnach</span><span style="color: #007700">=</span><span style="color: #DD0000">""</span><span style="color: #007700">;
            </span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">=</span><span style="color: #DD0000">"Erinnerung für deinen Bericht + 7 Tipps was du schreiben kannst"</span><span style="color: #007700">;
            
            </span><span style="color: #FF8000">//PM senden
            </span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">=</span><span style="color: #0000BB">&#36;petertextvor</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;postmessage</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;petertextnach</span><span style="color: #007700">;
            </span><span style="color: #0000BB">sendPM</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">,</span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">);
            
</span><span style="color: #FF8000">// LOG schreiben mrschmock 07.10.2018
</span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;log</span><span style="color: #007700">, </span><span style="color: #0000BB">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'d.m.Y H:i:s'</span><span style="color: #007700">).</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;forumids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">].</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;message</span><span style="color: #007700">.</span><span style="color: #DD0000">", "</span><span style="color: #007700">.</span><span style="color: #0000BB">&#36;subject</span><span style="color: #007700">.</span><span style="color: #DD0000">"&#092;r&#092;n"</span><span style="color: #007700">);
            
            
            </span><span style="color: #FF8000">/* modcp hinzufügen */
            </span><span style="color: #0000BB">&#36;new_report </span><span style="color: #007700">= array(
                </span><span style="color: #DD0000">'id' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;pids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'id2' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;progthreadids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'id3' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;forumsids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'uid' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;userids</span><span style="color: #007700">[</span><span style="color: #0000BB">&#36;i</span><span style="color: #007700">],
                </span><span style="color: #DD0000">'reportstatus' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">0</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'reason' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">"Thema ohne Bericht"</span><span style="color: #007700">),
                </span><span style="color: #DD0000">'type' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'post'</span><span style="color: #007700">),
                </span><span style="color: #DD0000">'reports' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'dateline' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">TIME_NOW</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'lastreport' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">TIME_NOW</span><span style="color: #007700">,
                </span><span style="color: #DD0000">'reporters' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #0000BB">my_serialize</span><span style="color: #007700">(array(</span><span style="color: #0000BB">1</span><span style="color: #007700">)))
            );
            </span><span style="color: #0000BB">add_report</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;new_report</span><span style="color: #007700">, </span><span style="color: #0000BB">&#36;db</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">escape_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'post'</span><span style="color: #007700">));
            
            </span><span style="color: #FF8000">//sendPost(&#36;postmessage,&#36;forumsids[&#36;i],&#36;progthreadids[&#36;i],&#36;db);
            //echo '&lt;a href="https://x-invest.net/forum/showthread.php?tid='.&#36;progthreadids[&#36;i].'&amp;action=lastpost"&gt;Thread '.&#36;progthreadids[&#36;i].'&lt;/a&gt;&lt;br&gt;';
            //echo &#36;progthreadids[&#36;i]."&lt;br&gt;".&#36;pids[&#36;i]."&lt;br&gt;".&#36;forumsids[&#36;i]."&lt;br&gt;".&#36;userids[&#36;i];

        </span><span style="color: #007700">}
    }
</span><span style="color: #FF8000">// LOG schreiben mrschmock 07.10.2018
</span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">&#36;log</span><span style="color: #007700">);
</span><span style="color: #0000BB">?&gt;</span></code></div></div></div><hr class="mycode_hr" />
Ich sehe gerade <span style="font-weight: bold;" class="mycode_b">"reasonid" steht in der Datenbank auf "0", sollte aber "1" sein</span>.<br />
Das dürfte der <span style="font-weight: bold;" class="mycode_b">Grund für den Fehler</span> sein. Jemand eine Idee woran das im Code liegt?<br />
<hr class="mycode_hr" />
Ich habe jetzt folgendes ergänzt und jetzt wird der Meldegrund korrekt angegeben:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #DD0000">'reasonid' </span><span style="color: #007700">=&gt; </span><span style="color: #0000BB">1</span><span style="color: #007700">, 
</span></code></div></div></div><br />
Vorher hat es immer ohne geklappt, aber siehe da, ich habe es schon alleine hinbekommen (Jubelmodus). <img src="https://forum.mybb.de/images/smilies/biggrin.gif" alt="Big Grin" title="Big Grin" class="smilie smilie_5" /><br />
<br />
Vielen Dank fürs Zuhören! <img src="https://forum.mybb.de/images/smilies/biggrin.gif" alt="Big Grin" title="Big Grin" class="smilie smilie_5" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[RewriteEngine]]></title>
			<link>https://forum.mybb.de/thread-37707.html</link>
			<pubDate>Sat, 20 Feb 2021 16:49:15 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12225">Schnapsnase</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37707.html</guid>
			<description><![CDATA[Hallo werte Community!<br />
<br />
Da mir das etwas zu hoch ist, hier mal eine Frage:<br />
Wie kann ich eine dynamische URL per 301 in der .htaccess weiterleiten?<br />
<br />
Folgendes ist beispielhaft gegeben:<br />
<span style="color: #00369B;" class="mycode_color"><a href="http://subdomain.example.de/forumdisplay.php?fid=10" target="_blank" rel="noopener" class="mycode_url">http://subdomain.example.de/forumdisplay.php?fid=10</a></span> soll nach<br />
<span style="color: #00369B;" class="mycode_color"><a href="https://beispiel.de/forumdisplay.php?fid=10" target="_blank" rel="noopener" class="mycode_url">https://beispiel.de/forumdisplay.php?fid=10</a></span> weitergeleitet werden<br />
<br />
<span style="color: #00369B;" class="mycode_color"><a href="http://subdomain.example.de/showthread.php?tid=14&amp;pid=33" target="_blank" rel="noopener" class="mycode_url">http://subdomain.example.de/showthread.p...=14&amp;pid=33</a></span> soll nach<br />
<span style="color: #00369B;" class="mycode_color"><a href="https://beispiel.de/showthread.php?tid=14&amp;pid=33" target="_blank" rel="noopener" class="mycode_url">https://beispiel.de/showthread.php?tid=14&amp;pid=33</a></span> weitergeleitet werden<br />
<br />
Eine "normale" 301-Weiterleitung funktioniert hier nicht.<br />
<br />
Danke im Voraus für einen verständlichen Tipp. <img src="https://forum.mybb.de/images/smilies/wink.gif" alt="Wink" title="Wink" class="smilie smilie_3" />]]></description>
			<content:encoded><![CDATA[Hallo werte Community!<br />
<br />
Da mir das etwas zu hoch ist, hier mal eine Frage:<br />
Wie kann ich eine dynamische URL per 301 in der .htaccess weiterleiten?<br />
<br />
Folgendes ist beispielhaft gegeben:<br />
<span style="color: #00369B;" class="mycode_color"><a href="http://subdomain.example.de/forumdisplay.php?fid=10" target="_blank" rel="noopener" class="mycode_url">http://subdomain.example.de/forumdisplay.php?fid=10</a></span> soll nach<br />
<span style="color: #00369B;" class="mycode_color"><a href="https://beispiel.de/forumdisplay.php?fid=10" target="_blank" rel="noopener" class="mycode_url">https://beispiel.de/forumdisplay.php?fid=10</a></span> weitergeleitet werden<br />
<br />
<span style="color: #00369B;" class="mycode_color"><a href="http://subdomain.example.de/showthread.php?tid=14&amp;pid=33" target="_blank" rel="noopener" class="mycode_url">http://subdomain.example.de/showthread.p...=14&amp;pid=33</a></span> soll nach<br />
<span style="color: #00369B;" class="mycode_color"><a href="https://beispiel.de/showthread.php?tid=14&amp;pid=33" target="_blank" rel="noopener" class="mycode_url">https://beispiel.de/showthread.php?tid=14&amp;pid=33</a></span> weitergeleitet werden<br />
<br />
Eine "normale" 301-Weiterleitung funktioniert hier nicht.<br />
<br />
Danke im Voraus für einen verständlichen Tipp. <img src="https://forum.mybb.de/images/smilies/wink.gif" alt="Wink" title="Wink" class="smilie smilie_3" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[pathinfo() Function]]></title>
			<link>https://forum.mybb.de/thread-37348.html</link>
			<pubDate>Fri, 17 Jul 2020 11:59:32 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12225">Schnapsnase</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37348.html</guid>
			<description><![CDATA[Hallo liebe Community,<br />
<br />
ich habe mal (wieder) eine Verständnisfrage.<br />
Wenn ich mittels "pathinfo" folgenden Pfad untersuche:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;mypath </span><span style="color: #007700">= </span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'./directory/xyz.php'</span><span style="color: #007700">, </span><span style="color: #0000BB">PATHINFO_DIRNAME</span><span style="color: #007700">); 
</span></code></div></div></div>Was wird dann als "DIRNAME" ausgegeben?<br />
Ist es "./directory" oder ist es "/directory"?<br />
Um die Frage klarer zu stellen, wird der Punkt (relativer Pfad) mit ausgegeben, denn das müsste ich dann verhindern, oder ihn replacen.<br />
<br />
Danke für Infos!]]></description>
			<content:encoded><![CDATA[Hallo liebe Community,<br />
<br />
ich habe mal (wieder) eine Verständnisfrage.<br />
Wenn ich mittels "pathinfo" folgenden Pfad untersuche:<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">&#36;mypath </span><span style="color: #007700">= </span><span style="color: #0000BB">pathinfo</span><span style="color: #007700">(</span><span style="color: #DD0000">'./directory/xyz.php'</span><span style="color: #007700">, </span><span style="color: #0000BB">PATHINFO_DIRNAME</span><span style="color: #007700">); 
</span></code></div></div></div>Was wird dann als "DIRNAME" ausgegeben?<br />
Ist es "./directory" oder ist es "/directory"?<br />
Um die Frage klarer zu stellen, wird der Punkt (relativer Pfad) mit ausgegeben, denn das müsste ich dann verhindern, oder ihn replacen.<br />
<br />
Danke für Infos!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Verlinkung Forenprofil aus Chat]]></title>
			<link>https://forum.mybb.de/thread-37328.html</link>
			<pubDate>Wed, 01 Jul 2020 18:33:45 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12971">skorpion9</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37328.html</guid>
			<description><![CDATA[Hallo zusammen,<br />
<br />
bin neu hier und verfüge nur über geringe IT-Kenntnisse. Wir sind eine kleine Community (derzeit ca. 130 Leute) und betreiben MyBB 1.8.22 (auf PHP 7.3) in Verbindung mit phpFreeChat 1.7.<br />
Wir würden gerne die Forenprofile aus dem Chat verlinken. Mit folgendem Code konnten wir bereits einen Link bei den jeweiligen Usern im Chat erstellen, allerdings wird durch unserem Code ein Link mit Bezug auf den Usernamen erzeugt. Wir bräuchten jedoch einen Link mit Bezug zum UID. Unser derzeitiger Code lautet wie folgt:<br />
<br />
--------------------------------------------------------------------<br />
// add the Profile link<br />
if (pfc.getUserMeta(nickid,'nick').substr(0,4) != "Gast")<br />
{<br />
var p = document.createElement('p');<br />
p.setAttribute(className, 'pfc_nickwhois_profile');<br />
var a = document.createElement('a');<br />
a.setAttribute('href', '');<br />
a.pfc_nickid = nickid;<br />
a.title = "Show User Profile";<br />
a.href = 'https://wetfun.de.cool/member.php?action=profile&amp;uid=' + pfc.getUserMeta(nickid,'nick') + '';<br />
a.target = '_blank';<br />
a.onclick = function(evt){<br />
var nick = pfc.getUserMeta(nickid,'nick');<br />
this.pfc_parent.style.display = 'none';<br />
return false;<br />
}<br />
var img = document.createElement('img');<br />
img.setAttribute('src', this.res.getFileUrl('images/openpv.gif'));<br />
img.alt = document.createTextNode(this.res.getLabel('Profil'));<br />
a.appendChild(img);<br />
a.appendChild(document.createTextNode(this.res.getLabel('Profil')));<br />
p.appendChild(a);<br />
div.appendChild(p);<br />
}<br />
--------------------------------------------------------------------<br />
<br />
Leider wird der erzeugte Link nicht korrekt interpretiert, da am Ende des Links der Username eingefügt wird statt der UID. Wie müssten wir den obigen Code umgestalten damit die UID als Zahl hinter dem = im Link erscheint?<br />
<br />
Bitte um Euren Rat <br />
Beste Grüße,<br />
Skorpion9]]></description>
			<content:encoded><![CDATA[Hallo zusammen,<br />
<br />
bin neu hier und verfüge nur über geringe IT-Kenntnisse. Wir sind eine kleine Community (derzeit ca. 130 Leute) und betreiben MyBB 1.8.22 (auf PHP 7.3) in Verbindung mit phpFreeChat 1.7.<br />
Wir würden gerne die Forenprofile aus dem Chat verlinken. Mit folgendem Code konnten wir bereits einen Link bei den jeweiligen Usern im Chat erstellen, allerdings wird durch unserem Code ein Link mit Bezug auf den Usernamen erzeugt. Wir bräuchten jedoch einen Link mit Bezug zum UID. Unser derzeitiger Code lautet wie folgt:<br />
<br />
--------------------------------------------------------------------<br />
// add the Profile link<br />
if (pfc.getUserMeta(nickid,'nick').substr(0,4) != "Gast")<br />
{<br />
var p = document.createElement('p');<br />
p.setAttribute(className, 'pfc_nickwhois_profile');<br />
var a = document.createElement('a');<br />
a.setAttribute('href', '');<br />
a.pfc_nickid = nickid;<br />
a.title = "Show User Profile";<br />
a.href = 'https://wetfun.de.cool/member.php?action=profile&amp;uid=' + pfc.getUserMeta(nickid,'nick') + '';<br />
a.target = '_blank';<br />
a.onclick = function(evt){<br />
var nick = pfc.getUserMeta(nickid,'nick');<br />
this.pfc_parent.style.display = 'none';<br />
return false;<br />
}<br />
var img = document.createElement('img');<br />
img.setAttribute('src', this.res.getFileUrl('images/openpv.gif'));<br />
img.alt = document.createTextNode(this.res.getLabel('Profil'));<br />
a.appendChild(img);<br />
a.appendChild(document.createTextNode(this.res.getLabel('Profil')));<br />
p.appendChild(a);<br />
div.appendChild(p);<br />
}<br />
--------------------------------------------------------------------<br />
<br />
Leider wird der erzeugte Link nicht korrekt interpretiert, da am Ende des Links der Username eingefügt wird statt der UID. Wie müssten wir den obigen Code umgestalten damit die UID als Zahl hinter dem = im Link erscheint?<br />
<br />
Bitte um Euren Rat <br />
Beste Grüße,<br />
Skorpion9]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Benutzergruppe anzeigen]]></title>
			<link>https://forum.mybb.de/thread-37262.html</link>
			<pubDate>Fri, 05 Jun 2020 17:02:36 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12059">Gerti</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37262.html</guid>
			<description><![CDATA[Hi MyBB-Profis,<br />
<br />
im Template <span style="color: #9A00B2;" class="mycode_color">postbit </span>kann mit dem Syntax <span style="color: #00369B;" class="mycode_color">{&#36;post['uid']}</span> die ID des Users angezeigt werden.<br />
<br />
Wie kann man im Postbit auch die Gruppenzugehörigkeit mit anzeigen?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Beispiel:</span><br />
Es gibt Benutzergruppen: z.B. Anfänger, Profi, Entwickler u.v.m.<br />
<br />
In einem Thema beteiligen sich mehrere User welche unterschiedlichen Gruppen angehören.<br />
<br />
Wenn ich nun die Benutzergruppe im <span style="color: #9A00B2;" class="mycode_color">postbit</span>, analog der UID, mit Anzeigen könnte, würde der Benutzer der Gruppe Entwickler erkennen, das der Beitrag X von einem Anfänger geschrieben wurde!<br />
<br />
Jemand eine Lösung wie man meinen Wunsch umsetzen kann?<br />
<br />
Danke vorab für jegliche Hinweise]]></description>
			<content:encoded><![CDATA[Hi MyBB-Profis,<br />
<br />
im Template <span style="color: #9A00B2;" class="mycode_color">postbit </span>kann mit dem Syntax <span style="color: #00369B;" class="mycode_color">{&#36;post['uid']}</span> die ID des Users angezeigt werden.<br />
<br />
Wie kann man im Postbit auch die Gruppenzugehörigkeit mit anzeigen?<br />
<br />
<span style="font-weight: bold;" class="mycode_b">Beispiel:</span><br />
Es gibt Benutzergruppen: z.B. Anfänger, Profi, Entwickler u.v.m.<br />
<br />
In einem Thema beteiligen sich mehrere User welche unterschiedlichen Gruppen angehören.<br />
<br />
Wenn ich nun die Benutzergruppe im <span style="color: #9A00B2;" class="mycode_color">postbit</span>, analog der UID, mit Anzeigen könnte, würde der Benutzer der Gruppe Entwickler erkennen, das der Beitrag X von einem Anfänger geschrieben wurde!<br />
<br />
Jemand eine Lösung wie man meinen Wunsch umsetzen kann?<br />
<br />
Danke vorab für jegliche Hinweise]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Einbindung der global.php]]></title>
			<link>https://forum.mybb.de/thread-37168.html</link>
			<pubDate>Sun, 26 Apr 2020 11:48:46 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=10220">itsmeJAY</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37168.html</guid>
			<description><![CDATA[Guten Tag zusammen,<br />
<br />
ich habe gerade einen Fehler, welchen ich nicht so richtig nachvollziehen kann. <br />
<br />
Vielleicht kann mir hier ja jemand auf die Sprünge helfen. <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Ausgangssituation: </span><br />
Ich entwickel ein Plugin, welches einen AJAX-Request an eine Datei (z. B. inc/datei.php) sendet. In dieser Datei ist die global.php eingebunden, damit ich u.a das &#36;db Objekt verwenden kann und die SESSION.  Das klappt bei mir in der Testumgebung auch wunderbar. Ich habe absolut keine Probleme damit. <br />
<br />
In einer anderen - unabhängigen - Testumgebung, habe ich folgenden Fehler den der AJAX-Response sendet:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">MyBB Internal</span><span style="color: #007700">: </span><span style="color: #0000BB">One </span><span style="color: #007700">or </span><span style="color: #0000BB">more warnings occurred</span><span style="color: #007700">. </span><span style="color: #0000BB">Please contact your administrator </span><span style="color: #007700">for </span><span style="color: #0000BB">assistance</span><span style="color: #007700">.
</span><span style="color: #0000BB">MyBB Internal</span><span style="color: #007700">: </span><span style="color: #0000BB">One </span><span style="color: #007700">or </span><span style="color: #0000BB">more warnings occurred</span><span style="color: #007700">. </span><span style="color: #0000BB">Please contact your administrator </span><span style="color: #007700">for </span><span style="color: #0000BB">assistance</span><span style="color: #007700">.
</span><span style="color: #0000BB">MyBB Internal</span><span style="color: #007700">: </span><span style="color: #0000BB">One </span><span style="color: #007700">or </span><span style="color: #0000BB">more warnings occurred</span><span style="color: #007700">. </span><span style="color: #0000BB">Please contact your administrator </span><span style="color: #007700">for </span><span style="color: #0000BB">assistance</span><span style="color: #007700">.
{</span><span style="color: #DD0000">"changedto"</span><span style="color: #007700">:</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #DD0000">"postID"</span><span style="color: #007700">:</span><span style="color: #DD0000">"35620"</span><span style="color: #007700">} 
</span></code></div></div></div><br />
An der letzten Zeile erkennt man und kann man nachvollziehen, dass die jeweilige Änderung trotzdem in der Datenbank vorgenommen wurde. Die Antwort kommt aber erst nach ca. 5 - 10 Sekunden und bringt die o.g Fehler/Warnungen mit. <br />
<br />
Wenn ich die global.php aus der inc/datei.php rausnehme und zu Testzwecken z. B. irgendetwas zurückgebe, klappt das auch wunderbar und der Response ist sofort da. Sobald die global.php wieder required wird, sind die oben stehenden Warnungen wieder da und ich warte 5-10 Sek auf den Response. <br />
<br />
Mysteriös... Ich habe derzeit noch absolut 0 Schimmer woran das liegen könnte. Vielleicht an Einstellungen des Forums? Aber an welchen? <br />
<br />
Der Pfad zu global.php stimmt überein. Die Datei benutzt ja sogar das &#36;db-Objekt und updated die Datenbank, also required wird die global.php Datei.. aber weshalb die Warnings?  <img src="https://forum.mybb.de/images/smilies/rolleyes.gif" alt="Rolleyes" title="Rolleyes" class="smilie smilie_7" /><br />
<br />
Vielleicht weiß ja jemand etwas hier.. In den Logs welche unter "Server und Optimierung -&gt; Logdatei" definiert sind, steht auch nichts drin. <br />
<br />
Grüße,<br />
JAY]]></description>
			<content:encoded><![CDATA[Guten Tag zusammen,<br />
<br />
ich habe gerade einen Fehler, welchen ich nicht so richtig nachvollziehen kann. <br />
<br />
Vielleicht kann mir hier ja jemand auf die Sprünge helfen. <br />
<br />
<span style="font-weight: bold;" class="mycode_b">Ausgangssituation: </span><br />
Ich entwickel ein Plugin, welches einen AJAX-Request an eine Datei (z. B. inc/datei.php) sendet. In dieser Datei ist die global.php eingebunden, damit ich u.a das &#36;db Objekt verwenden kann und die SESSION.  Das klappt bei mir in der Testumgebung auch wunderbar. Ich habe absolut keine Probleme damit. <br />
<br />
In einer anderen - unabhängigen - Testumgebung, habe ich folgenden Fehler den der AJAX-Response sendet:<br />
<br />
<div class="codeblock phpcodeblock"><div class="title">PHP-Code:</div><div class="body"><div dir="ltr"><code><span style="color: #0000BB">MyBB Internal</span><span style="color: #007700">: </span><span style="color: #0000BB">One </span><span style="color: #007700">or </span><span style="color: #0000BB">more warnings occurred</span><span style="color: #007700">. </span><span style="color: #0000BB">Please contact your administrator </span><span style="color: #007700">for </span><span style="color: #0000BB">assistance</span><span style="color: #007700">.
</span><span style="color: #0000BB">MyBB Internal</span><span style="color: #007700">: </span><span style="color: #0000BB">One </span><span style="color: #007700">or </span><span style="color: #0000BB">more warnings occurred</span><span style="color: #007700">. </span><span style="color: #0000BB">Please contact your administrator </span><span style="color: #007700">for </span><span style="color: #0000BB">assistance</span><span style="color: #007700">.
</span><span style="color: #0000BB">MyBB Internal</span><span style="color: #007700">: </span><span style="color: #0000BB">One </span><span style="color: #007700">or </span><span style="color: #0000BB">more warnings occurred</span><span style="color: #007700">. </span><span style="color: #0000BB">Please contact your administrator </span><span style="color: #007700">for </span><span style="color: #0000BB">assistance</span><span style="color: #007700">.
{</span><span style="color: #DD0000">"changedto"</span><span style="color: #007700">:</span><span style="color: #0000BB">0</span><span style="color: #007700">,</span><span style="color: #DD0000">"postID"</span><span style="color: #007700">:</span><span style="color: #DD0000">"35620"</span><span style="color: #007700">} 
</span></code></div></div></div><br />
An der letzten Zeile erkennt man und kann man nachvollziehen, dass die jeweilige Änderung trotzdem in der Datenbank vorgenommen wurde. Die Antwort kommt aber erst nach ca. 5 - 10 Sekunden und bringt die o.g Fehler/Warnungen mit. <br />
<br />
Wenn ich die global.php aus der inc/datei.php rausnehme und zu Testzwecken z. B. irgendetwas zurückgebe, klappt das auch wunderbar und der Response ist sofort da. Sobald die global.php wieder required wird, sind die oben stehenden Warnungen wieder da und ich warte 5-10 Sek auf den Response. <br />
<br />
Mysteriös... Ich habe derzeit noch absolut 0 Schimmer woran das liegen könnte. Vielleicht an Einstellungen des Forums? Aber an welchen? <br />
<br />
Der Pfad zu global.php stimmt überein. Die Datei benutzt ja sogar das &#36;db-Objekt und updated die Datenbank, also required wird die global.php Datei.. aber weshalb die Warnings?  <img src="https://forum.mybb.de/images/smilies/rolleyes.gif" alt="Rolleyes" title="Rolleyes" class="smilie smilie_7" /><br />
<br />
Vielleicht weiß ja jemand etwas hier.. In den Logs welche unter "Server und Optimierung -&gt; Logdatei" definiert sind, steht auch nichts drin. <br />
<br />
Grüße,<br />
JAY]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[MySQL eintrag]]></title>
			<link>https://forum.mybb.de/thread-37160.html</link>
			<pubDate>Thu, 23 Apr 2020 17:09:49 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12894">vecodx</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37160.html</guid>
			<description><![CDATA[Hallo,<br />
<br />
Ich habe vor ein Minecraft Plugin zu Programmieren, doch ich finde keine Möglichkeit einen account zu erstellen, da das Passwort ja verschlüsselt ist habt ihr eine andere idee wie ich über Minecraft einen Account erstellen kann?]]></description>
			<content:encoded><![CDATA[Hallo,<br />
<br />
Ich habe vor ein Minecraft Plugin zu Programmieren, doch ich finde keine Möglichkeit einen account zu erstellen, da das Passwort ja verschlüsselt ist habt ihr eine andere idee wie ich über Minecraft einen Account erstellen kann?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Mehrere Templates auf einer Seite]]></title>
			<link>https://forum.mybb.de/thread-37143.html</link>
			<pubDate>Thu, 16 Apr 2020 17:50:22 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.mybb.de/member.php?action=profile&uid=12872">Kiruku</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.mybb.de/thread-37143.html</guid>
			<description><![CDATA[Hallöchen, ich mal wieder.<br />
<br />
Meine anderen Probleme haben sich ja geklärt.<br />
<br />
Nun tut sich eine neue Frage auf. Und zwar arbeite ich gerade an einem Lexikon.<br />
<br />
Da durch die Unmengen an Informationen das Limit des 'Lexikon' Templates erreicht ist möchte ich diese gerne in verschiedenen Templates aufteilen.<br />
<br />
Das heißt:<br />
<br />
Ich habe das Lexikon.<br />
Dieses Lexikon hat verschiedene Kategorien, wenn man auf eine Kategorie klickt öffnet sich daneben in einem Fester das neue Template. Aktuell habe ich das mit IFrame gelöst, das große Problem dabei ist das die Formatierung flöten geht weil die Datei nicht mehr auf die global.css zugreift (Aus welchen Gründen auch immer).<br />

<br />
<img src="https://forum.mybb.de/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a href="attachment.php?aid=12706" target="_blank">Lexikon.PNG</a> (Größe: 73,32 KB / Downloads: 23)
<br />
<br />
Ich habe für das 'Fauna' Template (Welches auf dem Bild zu sehen ist) folgendes benutzt:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;link href="global.css" rel="stylesheet" type="text/css" /&gt;</code></div></div><br />
<br />
Kann man das ganze ein wenig geschickter lösen, oder auf meine ziemlich hässliche Art und Weise nur in Richtig? :'D<br />
<br />
MYBB: 1.8.12<br />
PHP: 7.0.33]]></description>
			<content:encoded><![CDATA[Hallöchen, ich mal wieder.<br />
<br />
Meine anderen Probleme haben sich ja geklärt.<br />
<br />
Nun tut sich eine neue Frage auf. Und zwar arbeite ich gerade an einem Lexikon.<br />
<br />
Da durch die Unmengen an Informationen das Limit des 'Lexikon' Templates erreicht ist möchte ich diese gerne in verschiedenen Templates aufteilen.<br />
<br />
Das heißt:<br />
<br />
Ich habe das Lexikon.<br />
Dieses Lexikon hat verschiedene Kategorien, wenn man auf eine Kategorie klickt öffnet sich daneben in einem Fester das neue Template. Aktuell habe ich das mit IFrame gelöst, das große Problem dabei ist das die Formatierung flöten geht weil die Datei nicht mehr auf die global.css zugreift (Aus welchen Gründen auch immer).<br />

<br />
<img src="https://forum.mybb.de/images/attachtypes/image.png" title="PNG Image" border="0" alt=".png" />
&nbsp;&nbsp;<a href="attachment.php?aid=12706" target="_blank">Lexikon.PNG</a> (Größe: 73,32 KB / Downloads: 23)
<br />
<br />
Ich habe für das 'Fauna' Template (Welches auf dem Bild zu sehen ist) folgendes benutzt:<br />
<div class="codeblock"><div class="title">Code:</div><div class="body" dir="ltr"><code>&lt;link href="global.css" rel="stylesheet" type="text/css" /&gt;</code></div></div><br />
<br />
Kann man das ganze ein wenig geschickter lösen, oder auf meine ziemlich hässliche Art und Weise nur in Richtig? :'D<br />
<br />
MYBB: 1.8.12<br />
PHP: 7.0.33]]></content:encoded>
		</item>
	</channel>
</rss>