<?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 Community Forums - Third Party Integration]]></title>
		<link>https://community.mybb.com/</link>
		<description><![CDATA[MyBB Community Forums - https://community.mybb.com]]></description>
		<pubDate>Tue, 09 Jun 2026 11:59:16 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[need support to implement a script]]></title>
			<link>https://community.mybb.com/thread-243930.html</link>
			<pubDate>Mon, 18 Aug 2025 11:42:34 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=146587">indigos</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-243930.html</guid>
			<description><![CDATA[Hello Community, i need Help to implement a script into myBB latest Version ... i am not a programmer so i do not understand how i can implement this script...<br />
<br />
<br />
details:<br />
<br />
<span style="color: #2b2e2f;" class="mycode_color">Hi Martin,</span><br />
<span style="color: #2b2e2f;" class="mycode_color">Thank you for reaching out for help on embedding the Website Translator widget on your myBB forum. Here's a streamlined guide to help you implement the widget:</span><br />
<span style="color: #333333;" class="mycode_color">Option 1: Add to a Template or Global Area</span><br />
<span style="color: #2b2e2f;" class="mycode_color">1.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="font-weight: bold;" class="mycode_b"><span style="color: #2b2e2f;" class="mycode_color"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Log in to your MyBB Admin Control Panel</span></span></span><span style="color: #2b2e2f;" class="mycode_color">.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">2.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="color: #2b2e2f;" class="mycode_color">Navigate to <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Templates &amp; Style &gt; Templates &gt; [Your Theme] Templates</span></span>.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">3.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="color: #2b2e2f;" class="mycode_color">Identify where you would like the widget to appear (such as in the header, footer, or a custom page).</span><br />
<span style="color: #2b2e2f;" class="mycode_color">4.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="font-weight: bold;" class="mycode_b"><span style="color: #2b2e2f;" class="mycode_color"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Paste your Common Ninja embed code</span></span></span><span style="color: #2b2e2f;" class="mycode_color"> in the desired location within the template.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">5.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="font-weight: bold;" class="mycode_b"><span style="color: #2b2e2f;" class="mycode_color"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Save</span></span></span><span style="color: #2b2e2f;" class="mycode_color"> the changes and <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">refresh</span></span> your site to see the widget in action.</span><br />
<span style="color: #333333;" class="mycode_color">Option 2: Add to a Forum Post</span><br />
<span style="color: #2b2e2f;" class="mycode_color">If you prefer to have the widget within a forum post:</span><br />
<span style="color: #2b2e2f;" class="mycode_color">1.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="color: #2b2e2f;" class="mycode_color">Ensure you use the <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">iframe version</span></span> of the embed code, as regular script tags might be blocked in posts for security reasons.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">2.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span>Enter the post editor and paste the <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">iframe embed code</span></span> directly into the post (ensure your post editor is set to HTML mode or you have a plugin that allows HTML editing).</span><br />
<br />
iframe code:<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;iframe src=&quot;https://widgets.commoninja.com/iframe/b0cea11f-fd06-472c-bf10-7c8054f49477&quot; width=&quot;100%&quot; height=&quot;100%&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;</code></pre><br />
script code:<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;script src=&quot;https://cdn.commoninja.com/sdk/latest/commonninja.js&quot; defer&gt;&lt;/script&gt;
&lt;div class=&quot;commonninja_component pid-b0cea11f-fd06-472c-bf10-7c8054f49477&quot;&gt;&lt;/div&gt;
</code></pre><br />
<br />
this code is from a translation widget and should be to implement into myBB...<br />
<br />
Hope someone of you can Help me to make everything right ...<br />
Thank you my friends for your input and or help<br />
<br />
Martin]]></description>
			<content:encoded><![CDATA[Hello Community, i need Help to implement a script into myBB latest Version ... i am not a programmer so i do not understand how i can implement this script...<br />
<br />
<br />
details:<br />
<br />
<span style="color: #2b2e2f;" class="mycode_color">Hi Martin,</span><br />
<span style="color: #2b2e2f;" class="mycode_color">Thank you for reaching out for help on embedding the Website Translator widget on your myBB forum. Here's a streamlined guide to help you implement the widget:</span><br />
<span style="color: #333333;" class="mycode_color">Option 1: Add to a Template or Global Area</span><br />
<span style="color: #2b2e2f;" class="mycode_color">1.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="font-weight: bold;" class="mycode_b"><span style="color: #2b2e2f;" class="mycode_color"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Log in to your MyBB Admin Control Panel</span></span></span><span style="color: #2b2e2f;" class="mycode_color">.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">2.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="color: #2b2e2f;" class="mycode_color">Navigate to <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Templates &amp; Style &gt; Templates &gt; [Your Theme] Templates</span></span>.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">3.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="color: #2b2e2f;" class="mycode_color">Identify where you would like the widget to appear (such as in the header, footer, or a custom page).</span><br />
<span style="color: #2b2e2f;" class="mycode_color">4.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="font-weight: bold;" class="mycode_b"><span style="color: #2b2e2f;" class="mycode_color"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Paste your Common Ninja embed code</span></span></span><span style="color: #2b2e2f;" class="mycode_color"> in the desired location within the template.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">5.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="font-weight: bold;" class="mycode_b"><span style="color: #2b2e2f;" class="mycode_color"><span style="font-family: Aptos, sans-serif;" class="mycode_font">Save</span></span></span><span style="color: #2b2e2f;" class="mycode_color"> the changes and <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">refresh</span></span> your site to see the widget in action.</span><br />
<span style="color: #333333;" class="mycode_color">Option 2: Add to a Forum Post</span><br />
<span style="color: #2b2e2f;" class="mycode_color">If you prefer to have the widget within a forum post:</span><br />
<span style="color: #2b2e2f;" class="mycode_color">1.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span></span><span style="color: #2b2e2f;" class="mycode_color">Ensure you use the <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">iframe version</span></span> of the embed code, as regular script tags might be blocked in posts for security reasons.</span><br />
<span style="color: #2b2e2f;" class="mycode_color">2.<span style="font-size: 1pt;" class="mycode_size"><span style="font-family: 'Times New Roman';" class="mycode_font">       </span></span>Enter the post editor and paste the <span style="font-weight: bold;" class="mycode_b"><span style="font-family: Aptos, sans-serif;" class="mycode_font">iframe embed code</span></span> directly into the post (ensure your post editor is set to HTML mode or you have a plugin that allows HTML editing).</span><br />
<br />
iframe code:<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;iframe src=&quot;https://widgets.commoninja.com/iframe/b0cea11f-fd06-472c-bf10-7c8054f49477&quot; width=&quot;100%&quot; height=&quot;100%&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;</code></pre><br />
script code:<br />
<pre class="block-code line-numbers language-none"><code class="language-none">&lt;script src=&quot;https://cdn.commoninja.com/sdk/latest/commonninja.js&quot; defer&gt;&lt;/script&gt;
&lt;div class=&quot;commonninja_component pid-b0cea11f-fd06-472c-bf10-7c8054f49477&quot;&gt;&lt;/div&gt;
</code></pre><br />
<br />
this code is from a translation widget and should be to implement into myBB...<br />
<br />
Hope someone of you can Help me to make everything right ...<br />
Thank you my friends for your input and or help<br />
<br />
Martin]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[website+forum database]]></title>
			<link>https://community.mybb.com/thread-243690.html</link>
			<pubDate>Mon, 30 Jun 2025 15:50:45 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=158857">helloworld</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-243690.html</guid>
			<description><![CDATA[Hello,<br />
<br />
If we want add a forum to a website who have also a user database,<br />
<br />
with the password change documentation (<a href="https://docs.mybb.com/1.8/faq/login-problems/" target="_blank" rel="noopener" class="mycode_url">https://docs.mybb.com/1.8/faq/login-problems/</a>) we can add an user who registered in the website to the  table <br />
<span style="font-weight: bold;" class="mycode_b">mybb_user</span> of the forum. Its avoid double registering (website&gt;forum).<br />
<br />
But what is the best way if the user register in the forum first ? When the user want change name in the forum ? Where i can add a function in the forum to update the website database in these case ?<br />
<br />
Any idea ?<br />
<br />
Best regard]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
If we want add a forum to a website who have also a user database,<br />
<br />
with the password change documentation (<a href="https://docs.mybb.com/1.8/faq/login-problems/" target="_blank" rel="noopener" class="mycode_url">https://docs.mybb.com/1.8/faq/login-problems/</a>) we can add an user who registered in the website to the  table <br />
<span style="font-weight: bold;" class="mycode_b">mybb_user</span> of the forum. Its avoid double registering (website&gt;forum).<br />
<br />
But what is the best way if the user register in the forum first ? When the user want change name in the forum ? Where i can add a function in the forum to update the website database in these case ?<br />
<br />
Any idea ?<br />
<br />
Best regard]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Visitor sidebar (login-register panel)]]></title>
			<link>https://community.mybb.com/thread-243514.html</link>
			<pubDate>Sat, 31 May 2025 23:28:12 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=158423">Cambaz</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-243514.html</guid>
			<description><![CDATA[<div style="text-align: center;" class="mycode_align">Bugün sizlere visitor panel sidebar (login - register) kodlarını paylaşmak istiyorum kendi forumumda bunu kullanıyoru sizde imza ma bakarak foruma bakmaya gelebilirsiniz bunun diğer sidebarlardan farkı sabit durmuyor sayfa yukarı veya aşağıya kaydıkça oda sizi takip eder scrollbara asılı vaziyette görünür şık bir tasarıma sahiptir<br />
<br />
global.css kod</div>
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-none">/* ==============================================
   Ziyaretçi Sidebar’ı – #visitor-sidebar
   ============================================== */

/* 1) Başlangıçta gizle */
#visitor-sidebar {
  display: none;            /* JS ile görünür hale getireceğiz */
  position: fixed;
  top: 80px;                /* Header yüksekliğine göre ayarlayın */
  right: 0;
  width: 260px;
  max-width: 80%;
  background-color: #222;
  color: #fff;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  font-family: Arial, sans-serif;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

/* 2) Header bölümü */
#visitor-sidebar .vs-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: rgba(59,130,246,.5);
  border-radius: 8px 0 0 0;
  font-size: 18px;
  font-weight: bold;
}

#visitor-sidebar .vs-header i {
  margin-right: 8px;
  font-size: 20px;
  color: #fff; /* İsterseniz #f39c12 yerine beyaz yapabilirsiniz */
}

/* 3) Form alanları */
#visitor-sidebar form {
  padding: 16px;
}

#visitor-sidebar .vs-field {
  position: relative;
  margin-bottom: 16px;
}

#visitor-sidebar .vs-field label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #888;
  font-size: 16px;
}

#visitor-sidebar .vs-field input[type=&quot;text&quot;],
#visitor-sidebar .vs-field input[type=&quot;password&quot;] {
  width: 100%;
  padding: 10px 10px 10px 36px;
  border: none;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

#visitor-sidebar .vs-field input[type=&quot;text&quot;]:focus,
#visitor-sidebar .vs-field input[type=&quot;password&quot;]:focus {
  background-color: #444;
  outline: none;
}

/* 4) Remember Me */
#visitor-sidebar .vs-remember {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

#visitor-sidebar .vs-remember input[type=&quot;checkbox&quot;] {
  margin-right: 6px;
  width: 16px;
  height: 16px;
}

#visitor-sidebar .vs-remember label {
  font-size: 13px;
  color: #ccc;
  cursor: pointer;
}

/* 5) Butonlar */
#visitor-sidebar .vs-buttons {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

#visitor-sidebar .vs-btn {
  flex: 1 1 calc(50% - 4px);
  text-align: center;
  padding: 10px 0;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

#visitor-sidebar .vs-btn i {
  margin-right: 6px;
  font-size: 16px;
}

#visitor-sidebar .vs-btn-login {
  background-color: #e74c3c;
  color: #fff;
}

#visitor-sidebar .vs-btn-login:hover {
  background-color: #c0392b;
}

#visitor-sidebar .vs-btn-register {
  background-color: #3498db;
  color: #fff;
}

#visitor-sidebar .vs-btn-register:hover {
  background-color: #2980b9;
}

/* 6) Forgot Password */
#visitor-sidebar .vs-forgot {
  text-align: center;
  margin-top: 8px;
}

#visitor-sidebar .vs-forgot a {
  color: #ccc;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

#visitor-sidebar .vs-forgot a:hover {
  color: #fff;
}</code></pre><div style="text-align: center;" class="mycode_align">
Şimdi ise bir sidebar alanı oluşturacağız eğer zaten sidebar alanınız var ise index.php ye eklenecek kodu direk sidebar alanına ekleyebilirsiniz anacak yok ise aşağıdaki sidebar alanı kodunu kullanın<br />
</div>
<pre class="block-code line-numbers language-none"><code class="language-none"> &lt;div class=&quot;index-container&quot; style=&quot;display:flex; flex-wrap:wrap;&quot;&gt;
        &lt;!-- Main Content (75%) --&gt;
        &lt;div class=&quot;index-main&quot; style=&quot;flex:1 1 75%; padding:10px;&quot;&gt;
&lt;div class=&quot;forums&quot;&gt;{$forums}&lt;/div&gt;
&lt;/div&gt;
  &lt;aside class=&quot;index-sidebar&quot; style=&quot;flex:0 0 25%; padding:10px;&quot;&gt;
//buraya aşağıda verdiğim visitor sidebar index.php kodunu yapıştırın 
&lt;/aside&gt;</code></pre>Aşağıda ise visitor sidebar kodunun index.php içine yerleşecek olan kodu var<br />
index.php<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-none">&lt;div id=&quot;visitor-sidebar&quot;&gt;
  &lt;div class=&quot;vs-header&quot;&gt;
    &lt;i class=&quot;fas fa-user-circle&quot;&gt;&lt;/i&gt;
    Member Login
  &lt;/div&gt;
  &lt;form method=&quot;post&quot; action=&quot;{$mybb-&gt;settings['bburl']}/member.php?action=do_login&quot;&gt;
    &lt;!-- Gizli alanlar: zorunlu --&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;do_login&quot; /&gt;
    &lt;!-- Bu satırı eski hâliyle kaldırdık:
    &lt;input type=&quot;hidden&quot; name=&quot;url&quot; value=&quot;{$mybb-&gt;settings['bburl']}{$requesturi}&quot; /&gt;
    --&gt;
    &lt;!-- Yeni URL alanı: giriş sonrası anasayfaya yönlendir --&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;url&quot; value=&quot;{$mybb-&gt;settings['bburl']}/&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;my_post_key&quot; value=&quot;{$mybb-&gt;post_code}&quot; /&gt;

    &lt;div class=&quot;vs-field&quot;&gt;
      &lt;label for=&quot;vs-username&quot;&gt;&lt;i class=&quot;fas fa-user&quot;&gt;&lt;/i&gt;&lt;/label&gt;
      &lt;input
        type=&quot;text&quot;
        name=&quot;username&quot;
        id=&quot;vs-username&quot;
        placeholder=&quot;Username&quot;
        required
      /&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-field&quot;&gt;
      &lt;label for=&quot;vs-password&quot;&gt;&lt;i class=&quot;fas fa-lock&quot;&gt;&lt;/i&gt;&lt;/label&gt;
      &lt;input
        type=&quot;password&quot;
        name=&quot;password&quot;
        id=&quot;vs-password&quot;
        placeholder=&quot;Password&quot;
        required
      /&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-field vs-remember&quot;&gt;
      &lt;input
        type=&quot;checkbox&quot;
        name=&quot;remember&quot;
        id=&quot;vs-remember&quot;
        value=&quot;1&quot;
      /&gt;
      &lt;label for=&quot;vs-remember&quot;&gt;Remember Me&lt;/label&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-buttons&quot;&gt;
      &lt;button type=&quot;submit&quot; class=&quot;vs-btn vs-btn-login&quot;&gt;
        &lt;i class=&quot;fas fa-sign-in-alt&quot;&gt;&lt;/i&gt; Login
      &lt;/button&gt;
      &lt;a href=&quot;{$mybb-&gt;settings['bburl']}/member.php?action=register&quot; class=&quot;vs-btn vs-btn-register&quot;&gt;
        &lt;i class=&quot;fas fa-user-plus&quot;&gt;&lt;/i&gt; Register
      &lt;/a&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-forgot&quot;&gt;
      &lt;a href=&quot;{$mybb-&gt;settings['bburl']}/member.php?action=lostpw&quot;&gt;Forgot Password?&lt;/a&gt;
    &lt;/div&gt;
  &lt;/form&gt;
&lt;/div&gt;




&lt;script&gt;
  (function() {
    // MyBB sayfasında daha önce tanımlı olduğu varsayılan 'connected' değişkenini kontrol et
    if (typeof connected === 'undefined') return;

    // &quot;visitor-sidebar&quot; öğesini bul
    var sidebar = document.getElementById('visitor-sidebar');
    if (!sidebar) return;

    // Eğer connected == 0 ise ziyaretçi: sidebar'ı göster
    if (connected == 0) {
      sidebar.style.display = 'block';
    }
    // Eğer connected == 1 ise üye: sidebar'ı gizle (zaten CSS'de none ama güvenlik için)
    else if (connected == 1) {
      sidebar.style.display = 'none';
    }

    
  })();
&lt;/script&gt;</code></pre><div style="text-align: center;" class="mycode_align">
kodun en altında &lt;script&gt;&lt;/script&gt; içindeki js kodu kullanıcının id sini kontrol eder eğer 0 ise ziyaretçi olarak görür ve visitor panel gözükür eğer giriş yapmışsa visitor panel gizlenir hepsi bu kadar eğer bu paneli mobil uyumlu bir temanız var ise ve mobilde göstermek istemiyorsanız <br />
global.css ye aşağıdaki kodu ekleyin</div>
<pre class="block-code line-numbers language-none"><code class="language-none">@media (max-width: 768px) {
  #visitor-sidebar {
    display: none !important;
  }
}</code></pre><div style="text-align: center;" class="mycode_align">SS<br />
<a href="https://i.hizliresim.com/immq3b2.PNG" target="_blank" rel="noopener" class="mycode_url">https://i.hizliresim.com/immq3b2.PNG</a></div>
<div style="text-align: center;" class="mycode_align"><a href="https://crackfrm.com" target="_blank" rel="noopener" class="mycode_url">https://crackfrm.com</a></div>]]></description>
			<content:encoded><![CDATA[<div style="text-align: center;" class="mycode_align">Bugün sizlere visitor panel sidebar (login - register) kodlarını paylaşmak istiyorum kendi forumumda bunu kullanıyoru sizde imza ma bakarak foruma bakmaya gelebilirsiniz bunun diğer sidebarlardan farkı sabit durmuyor sayfa yukarı veya aşağıya kaydıkça oda sizi takip eder scrollbara asılı vaziyette görünür şık bir tasarıma sahiptir<br />
<br />
global.css kod</div>
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-none">/* ==============================================
   Ziyaretçi Sidebar’ı – #visitor-sidebar
   ============================================== */

/* 1) Başlangıçta gizle */
#visitor-sidebar {
  display: none;            /* JS ile görünür hale getireceğiz */
  position: fixed;
  top: 80px;                /* Header yüksekliğine göre ayarlayın */
  right: 0;
  width: 260px;
  max-width: 80%;
  background-color: #222;
  color: #fff;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  font-family: Arial, sans-serif;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

/* 2) Header bölümü */
#visitor-sidebar .vs-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: rgba(59,130,246,.5);
  border-radius: 8px 0 0 0;
  font-size: 18px;
  font-weight: bold;
}

#visitor-sidebar .vs-header i {
  margin-right: 8px;
  font-size: 20px;
  color: #fff; /* İsterseniz #f39c12 yerine beyaz yapabilirsiniz */
}

/* 3) Form alanları */
#visitor-sidebar form {
  padding: 16px;
}

#visitor-sidebar .vs-field {
  position: relative;
  margin-bottom: 16px;
}

#visitor-sidebar .vs-field label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #888;
  font-size: 16px;
}

#visitor-sidebar .vs-field input[type=&quot;text&quot;],
#visitor-sidebar .vs-field input[type=&quot;password&quot;] {
  width: 100%;
  padding: 10px 10px 10px 36px;
  border: none;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

#visitor-sidebar .vs-field input[type=&quot;text&quot;]:focus,
#visitor-sidebar .vs-field input[type=&quot;password&quot;]:focus {
  background-color: #444;
  outline: none;
}

/* 4) Remember Me */
#visitor-sidebar .vs-remember {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

#visitor-sidebar .vs-remember input[type=&quot;checkbox&quot;] {
  margin-right: 6px;
  width: 16px;
  height: 16px;
}

#visitor-sidebar .vs-remember label {
  font-size: 13px;
  color: #ccc;
  cursor: pointer;
}

/* 5) Butonlar */
#visitor-sidebar .vs-buttons {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

#visitor-sidebar .vs-btn {
  flex: 1 1 calc(50% - 4px);
  text-align: center;
  padding: 10px 0;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

#visitor-sidebar .vs-btn i {
  margin-right: 6px;
  font-size: 16px;
}

#visitor-sidebar .vs-btn-login {
  background-color: #e74c3c;
  color: #fff;
}

#visitor-sidebar .vs-btn-login:hover {
  background-color: #c0392b;
}

#visitor-sidebar .vs-btn-register {
  background-color: #3498db;
  color: #fff;
}

#visitor-sidebar .vs-btn-register:hover {
  background-color: #2980b9;
}

/* 6) Forgot Password */
#visitor-sidebar .vs-forgot {
  text-align: center;
  margin-top: 8px;
}

#visitor-sidebar .vs-forgot a {
  color: #ccc;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

#visitor-sidebar .vs-forgot a:hover {
  color: #fff;
}</code></pre><div style="text-align: center;" class="mycode_align">
Şimdi ise bir sidebar alanı oluşturacağız eğer zaten sidebar alanınız var ise index.php ye eklenecek kodu direk sidebar alanına ekleyebilirsiniz anacak yok ise aşağıdaki sidebar alanı kodunu kullanın<br />
</div>
<pre class="block-code line-numbers language-none"><code class="language-none"> &lt;div class=&quot;index-container&quot; style=&quot;display:flex; flex-wrap:wrap;&quot;&gt;
        &lt;!-- Main Content (75%) --&gt;
        &lt;div class=&quot;index-main&quot; style=&quot;flex:1 1 75%; padding:10px;&quot;&gt;
&lt;div class=&quot;forums&quot;&gt;{$forums}&lt;/div&gt;
&lt;/div&gt;
  &lt;aside class=&quot;index-sidebar&quot; style=&quot;flex:0 0 25%; padding:10px;&quot;&gt;
//buraya aşağıda verdiğim visitor sidebar index.php kodunu yapıştırın 
&lt;/aside&gt;</code></pre>Aşağıda ise visitor sidebar kodunun index.php içine yerleşecek olan kodu var<br />
index.php<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-none">&lt;div id=&quot;visitor-sidebar&quot;&gt;
  &lt;div class=&quot;vs-header&quot;&gt;
    &lt;i class=&quot;fas fa-user-circle&quot;&gt;&lt;/i&gt;
    Member Login
  &lt;/div&gt;
  &lt;form method=&quot;post&quot; action=&quot;{$mybb-&gt;settings['bburl']}/member.php?action=do_login&quot;&gt;
    &lt;!-- Gizli alanlar: zorunlu --&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;do_login&quot; /&gt;
    &lt;!-- Bu satırı eski hâliyle kaldırdık:
    &lt;input type=&quot;hidden&quot; name=&quot;url&quot; value=&quot;{$mybb-&gt;settings['bburl']}{$requesturi}&quot; /&gt;
    --&gt;
    &lt;!-- Yeni URL alanı: giriş sonrası anasayfaya yönlendir --&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;url&quot; value=&quot;{$mybb-&gt;settings['bburl']}/&quot; /&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;my_post_key&quot; value=&quot;{$mybb-&gt;post_code}&quot; /&gt;

    &lt;div class=&quot;vs-field&quot;&gt;
      &lt;label for=&quot;vs-username&quot;&gt;&lt;i class=&quot;fas fa-user&quot;&gt;&lt;/i&gt;&lt;/label&gt;
      &lt;input
        type=&quot;text&quot;
        name=&quot;username&quot;
        id=&quot;vs-username&quot;
        placeholder=&quot;Username&quot;
        required
      /&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-field&quot;&gt;
      &lt;label for=&quot;vs-password&quot;&gt;&lt;i class=&quot;fas fa-lock&quot;&gt;&lt;/i&gt;&lt;/label&gt;
      &lt;input
        type=&quot;password&quot;
        name=&quot;password&quot;
        id=&quot;vs-password&quot;
        placeholder=&quot;Password&quot;
        required
      /&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-field vs-remember&quot;&gt;
      &lt;input
        type=&quot;checkbox&quot;
        name=&quot;remember&quot;
        id=&quot;vs-remember&quot;
        value=&quot;1&quot;
      /&gt;
      &lt;label for=&quot;vs-remember&quot;&gt;Remember Me&lt;/label&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-buttons&quot;&gt;
      &lt;button type=&quot;submit&quot; class=&quot;vs-btn vs-btn-login&quot;&gt;
        &lt;i class=&quot;fas fa-sign-in-alt&quot;&gt;&lt;/i&gt; Login
      &lt;/button&gt;
      &lt;a href=&quot;{$mybb-&gt;settings['bburl']}/member.php?action=register&quot; class=&quot;vs-btn vs-btn-register&quot;&gt;
        &lt;i class=&quot;fas fa-user-plus&quot;&gt;&lt;/i&gt; Register
      &lt;/a&gt;
    &lt;/div&gt;
    &lt;div class=&quot;vs-forgot&quot;&gt;
      &lt;a href=&quot;{$mybb-&gt;settings['bburl']}/member.php?action=lostpw&quot;&gt;Forgot Password?&lt;/a&gt;
    &lt;/div&gt;
  &lt;/form&gt;
&lt;/div&gt;




&lt;script&gt;
  (function() {
    // MyBB sayfasında daha önce tanımlı olduğu varsayılan 'connected' değişkenini kontrol et
    if (typeof connected === 'undefined') return;

    // &quot;visitor-sidebar&quot; öğesini bul
    var sidebar = document.getElementById('visitor-sidebar');
    if (!sidebar) return;

    // Eğer connected == 0 ise ziyaretçi: sidebar'ı göster
    if (connected == 0) {
      sidebar.style.display = 'block';
    }
    // Eğer connected == 1 ise üye: sidebar'ı gizle (zaten CSS'de none ama güvenlik için)
    else if (connected == 1) {
      sidebar.style.display = 'none';
    }

    
  })();
&lt;/script&gt;</code></pre><div style="text-align: center;" class="mycode_align">
kodun en altında &lt;script&gt;&lt;/script&gt; içindeki js kodu kullanıcının id sini kontrol eder eğer 0 ise ziyaretçi olarak görür ve visitor panel gözükür eğer giriş yapmışsa visitor panel gizlenir hepsi bu kadar eğer bu paneli mobil uyumlu bir temanız var ise ve mobilde göstermek istemiyorsanız <br />
global.css ye aşağıdaki kodu ekleyin</div>
<pre class="block-code line-numbers language-none"><code class="language-none">@media (max-width: 768px) {
  #visitor-sidebar {
    display: none !important;
  }
}</code></pre><div style="text-align: center;" class="mycode_align">SS<br />
<a href="https://i.hizliresim.com/immq3b2.PNG" target="_blank" rel="noopener" class="mycode_url">https://i.hizliresim.com/immq3b2.PNG</a></div>
<div style="text-align: center;" class="mycode_align"><a href="https://crackfrm.com" target="_blank" rel="noopener" class="mycode_url">https://crackfrm.com</a></div>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Auto login for third party integration best practices?]]></title>
			<link>https://community.mybb.com/thread-243012.html</link>
			<pubDate>Wed, 26 Feb 2025 15:35:44 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=157726">kylesands</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-243012.html</guid>
			<description><![CDATA[Hi gang....<br />
<br />
I have an existing project with an existing user auth and was hoping to add a forum to the project without users maintaining multiple accounts but doing it using the existing sites user auth.    I believe I have it working with MyBB 1.8.38 and will include what I did below, but if possible, I was wondering if this is in any way considered best practice, or if there's a different preferred way, or if there may even be some security concerns with this approach.  Any constructive feedback is welcome.<br />
<br />
Specifically, this was done to integrate it with a Yii Framework project, but this approach could seemingly be done with about any environment I would think.   The idea is based on this thread.  <a href="https://community.mybb.com/thread-118971.html" target="_blank" rel="noopener" class="mycode_url">https://community.mybb.com/thread-118971.html</a>  using Seeker's approach, although it was modified due to database connection variable collisions with Yii and perhaps some minor updates done from older versions of MyBB at the time.<br />
<br />
<br />
Basically what's happening is links in the existing site to the forum will go to a forumAutoLogin controller that returns the following view.  Some of that code should probably be in the controller, but for the simplicity to implement, I stuck it all in the view.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">&lt;?php
use vendor\glacierparkchat\managers\MyBBManager;

if(!Yii::$app-&gt;user-&gt;isGuest) // checks if user is logged in to existing system already or not.
{
    $myBBMan = new MyBBManager();
   
    $user = $myBBMan-&gt;findMyBBUserByLoggedInUser(); // Gets the MyBB user info based on the already logged in user
   
    // Modify path here for your needs:
    //require_once './global.php';
    define('IN_MYBB', 1);
    define(&quot;TIME_NOW&quot;, time());
    define(&quot;COMMUNITY&quot;, &quot;./../../../web/community/&quot;);
   
    $settings = array();
    if(file_exists(COMMUNITY.&quot;inc/settings.php&quot;))
    {
        require_once COMMUNITY.&quot;inc/settings.php&quot;;
    }
    require_once COMMUNITY.&quot;inc/functions.php&quot;;
    require_once COMMUNITY.&quot;inc/class_session.php&quot;;
    require_once COMMUNITY.&quot;inc/class_core.php&quot;;
    $session = new session;
   
    global $mybb;
    $mybb = new MyBB;
    $mybb-&gt;user = $user;
    $mybb-&gt;settings = $settings;
    $session-&gt;init();
    $mybb-&gt;session = &amp;$session;
   
   
    my_setcookie('loginattempts', 1);
    my_setcookie(&quot;mybbuser&quot;, $user['uid'].&quot;_&quot;.$user['loginkey'], null, true);
    my_setcookie(&quot;sid&quot;, $session-&gt;sid, -1, true);
   
    //$plugins-&gt;run_hooks(&quot;member_do_login_end&quot;); // Don't know what this does...seems to work without it
}
// using metta refresh below feels rudimentary, but also platform agnostic
?&gt;
&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0; url=/community&quot; /&gt;</code></pre><br />
<br />
findMyBBUserByLoggedInUser() explained here....  It basically gets the MyBB user info from the mybb_users table based on who is currently logged in to the existing site.  The MyBB user table should be populated at time of user registration to original site and original user auth, but it also populates it on the fly if it's missing for any reason.  Once it has the MyBB user info, it populates what seem to be the appropriate cookies, and sends them on to the forum which then sees them logged in automatically as them.<br />
<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">&lt;?php
namespace vendor\glacierparkchat\managers;

use amnah\yii2\user\models\User;
use Yii;

class MyBBManager
{
     
    public function createMyBBUser($username, $email)
    {
        $usergroup = 2;
        $password = Yii::$app-&gt;security-&gt;generateRandomString(32);  // Password not used
        $salt = Yii::$app-&gt;getSecurity()-&gt;generateRandomString(8);
        $signature = &quot;&quot;;
        $buddyList = &quot;&quot;;
        $ignoreList = &quot;&quot;;
        $pmfolders = &quot;0**$%%$1**$%%$2**$%%$3**$%%$4**&quot;;
        $notepad = &quot;&quot;;
        $usernotes = &quot;&quot;;
        $loginkey = Yii::$app-&gt;security-&gt;generateRandomString(50);
        $allownotices = 1;
        $receivepms = 1;
        $pmnotice = 1;
        $pmnotify = 1;
        $showimages = 1;
        $showvideos = 1;
        $showsigs = 1;
        $showavatars = 1;
        $showquickreply = 1;
        $showredirect = 1;
        $timezone = 0;
        $regdate = time();
        
        $connection = \Yii::$app-&gt;db;
        $command = $connection-&gt;createCommand(&quot;INSERT INTO mybb_users (username, password, salt, email, usergroup, signature, buddyList, ignoreList, pmfolders, notepad, &quot;. 
            &quot; usernotes, loginkey, allownotices, receivepms, pmnotice, pmnotify, showimages, showvideos, showsigs, showavatars, &quot;.
            &quot; showquickreply, showredirect, timezone, regdate ) &quot;.
            &quot; VALUES (:username, :password, :salt, :email, :usergroup, :signature, :buddyList, :ignoreList, :pmfolders, :notepad,  &quot;.
            &quot; :usernotes, :loginkey, :allownotices, :receivepms, :pmnotice, :pmnotify, :showimages, :showvideos, :showsigs, :showavatars, &quot;.
            &quot; :showquickreply, :showredirect, :timezone, :regdate ) &quot;);
        
        $command-&gt;bindValue(':username', $username   );
        $command-&gt;bindValue(':password', $password); //  md5(md5($salt).md5($password))  );
        $command-&gt;bindValue(':salt',  $salt  );
        $command-&gt;bindValue(':email',  $email  );
        $command-&gt;bindValue(':usergroup',  $usergroup  );
        $command-&gt;bindValue(':signature',  $signature  );
        $command-&gt;bindValue(':buddyList',  $buddyList  );
        $command-&gt;bindValue(':ignoreList',  $ignoreList  );
        $command-&gt;bindValue(':pmfolders',  $pmfolders  );
        $command-&gt;bindValue(':notepad',  $notepad  );
        $command-&gt;bindValue(':usernotes',  $usernotes  );
        $command-&gt;bindValue(':loginkey', $loginkey);
        $command-&gt;bindValue(':allownotices',  $allownotices  );
        $command-&gt;bindValue(':receivepms',  $receivepms  );
        $command-&gt;bindValue(':pmnotice',  $pmnotice  );
        $command-&gt;bindValue(':pmnotify',  $pmnotify  );
        $command-&gt;bindValue(':showimages',  $showimages  );
        $command-&gt;bindValue(':showvideos',  $showvideos  );
        $command-&gt;bindValue(':showsigs',  $showsigs  );
        $command-&gt;bindValue(':showavatars',  $showavatars  );
        $command-&gt;bindValue(':showquickreply',  $showquickreply  );
        $command-&gt;bindValue(':showredirect',  $showredirect  );
        $command-&gt;bindValue(':timezone',  $timezone  );
        $command-&gt;bindValue(':regdate',  $regdate  );
        
        $command-&gt;execute();
        
    }

    
    public function findMyBBUserByLoggedInUser()
    {
        $connection = \Yii::$app-&gt;db;
        $command = $connection-&gt;createCommand(&quot;SELECT uid,username,password,salt,loginkey,email,usergroup &quot;.
            &quot; FROM mybb_users where username = :username&quot;);
        $command-&gt;bindValue(&quot;:username&quot;,  Yii::$app-&gt;user-&gt;identity-&gt;username );
        $user = $command-&gt;queryOne();
        
        if(!$user)
        {
            //MyBB user was not there for some reason, so creating it now and trying again.
            
            $origUser = User::findUserByUsername(Yii::$app-&gt;user-&gt;identity-&gt;username);
            // insert MyBB user info
            $this-&gt;createMyBBUser($origUser-&gt;username, $origUser-&gt;email);
            
            $user = $this-&gt;findMyBBUserByLoggedInUser();
        }
        
        return $user;
    }
}

?&gt;</code></pre><br />
<br />
Once in place, I modified the MyBB login and register links in the header_welcomeblock_guest theme template to point to the existing systems login and register controllers.  <br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">&lt;span class=&quot;welcome&quot;&gt;{$lang-&gt;welcome_guest} &lt;a href=&quot;/site/user/login?return=/site/user/forumautologin&quot; class=&quot;login&quot;&gt;{$lang-&gt;welcome_login}&lt;/a&gt; &lt;a href=&quot;/site/user/register&quot; class=&quot;register&quot;&gt;{$lang-&gt;welcome_register}&lt;/a&gt;&lt;/span&gt;</code></pre><br />
<br />
Presumably, no one should directly login or register via the MyBB user now, though that might need a little more tightening up perhaps, but the auto logging in does seem to work.<br />
<br />
Anyway.... It would be great to hear thoughts on whether this methodology is ok or sorely lacking in certain areas.<br />
<br />
Thanks.]]></description>
			<content:encoded><![CDATA[Hi gang....<br />
<br />
I have an existing project with an existing user auth and was hoping to add a forum to the project without users maintaining multiple accounts but doing it using the existing sites user auth.    I believe I have it working with MyBB 1.8.38 and will include what I did below, but if possible, I was wondering if this is in any way considered best practice, or if there's a different preferred way, or if there may even be some security concerns with this approach.  Any constructive feedback is welcome.<br />
<br />
Specifically, this was done to integrate it with a Yii Framework project, but this approach could seemingly be done with about any environment I would think.   The idea is based on this thread.  <a href="https://community.mybb.com/thread-118971.html" target="_blank" rel="noopener" class="mycode_url">https://community.mybb.com/thread-118971.html</a>  using Seeker's approach, although it was modified due to database connection variable collisions with Yii and perhaps some minor updates done from older versions of MyBB at the time.<br />
<br />
<br />
Basically what's happening is links in the existing site to the forum will go to a forumAutoLogin controller that returns the following view.  Some of that code should probably be in the controller, but for the simplicity to implement, I stuck it all in the view.<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">&lt;?php
use vendor\glacierparkchat\managers\MyBBManager;

if(!Yii::$app-&gt;user-&gt;isGuest) // checks if user is logged in to existing system already or not.
{
    $myBBMan = new MyBBManager();
   
    $user = $myBBMan-&gt;findMyBBUserByLoggedInUser(); // Gets the MyBB user info based on the already logged in user
   
    // Modify path here for your needs:
    //require_once './global.php';
    define('IN_MYBB', 1);
    define(&quot;TIME_NOW&quot;, time());
    define(&quot;COMMUNITY&quot;, &quot;./../../../web/community/&quot;);
   
    $settings = array();
    if(file_exists(COMMUNITY.&quot;inc/settings.php&quot;))
    {
        require_once COMMUNITY.&quot;inc/settings.php&quot;;
    }
    require_once COMMUNITY.&quot;inc/functions.php&quot;;
    require_once COMMUNITY.&quot;inc/class_session.php&quot;;
    require_once COMMUNITY.&quot;inc/class_core.php&quot;;
    $session = new session;
   
    global $mybb;
    $mybb = new MyBB;
    $mybb-&gt;user = $user;
    $mybb-&gt;settings = $settings;
    $session-&gt;init();
    $mybb-&gt;session = &amp;$session;
   
   
    my_setcookie('loginattempts', 1);
    my_setcookie(&quot;mybbuser&quot;, $user['uid'].&quot;_&quot;.$user['loginkey'], null, true);
    my_setcookie(&quot;sid&quot;, $session-&gt;sid, -1, true);
   
    //$plugins-&gt;run_hooks(&quot;member_do_login_end&quot;); // Don't know what this does...seems to work without it
}
// using metta refresh below feels rudimentary, but also platform agnostic
?&gt;
&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0; url=/community&quot; /&gt;</code></pre><br />
<br />
findMyBBUserByLoggedInUser() explained here....  It basically gets the MyBB user info from the mybb_users table based on who is currently logged in to the existing site.  The MyBB user table should be populated at time of user registration to original site and original user auth, but it also populates it on the fly if it's missing for any reason.  Once it has the MyBB user info, it populates what seem to be the appropriate cookies, and sends them on to the forum which then sees them logged in automatically as them.<br />
<br />
<pre data-deferred="true" class="block-code line-numbers language-none"><code class="language-php">&lt;?php
namespace vendor\glacierparkchat\managers;

use amnah\yii2\user\models\User;
use Yii;

class MyBBManager
{
     
    public function createMyBBUser($username, $email)
    {
        $usergroup = 2;
        $password = Yii::$app-&gt;security-&gt;generateRandomString(32);  // Password not used
        $salt = Yii::$app-&gt;getSecurity()-&gt;generateRandomString(8);
        $signature = &quot;&quot;;
        $buddyList = &quot;&quot;;
        $ignoreList = &quot;&quot;;
        $pmfolders = &quot;0**$%%$1**$%%$2**$%%$3**$%%$4**&quot;;
        $notepad = &quot;&quot;;
        $usernotes = &quot;&quot;;
        $loginkey = Yii::$app-&gt;security-&gt;generateRandomString(50);
        $allownotices = 1;
        $receivepms = 1;
        $pmnotice = 1;
        $pmnotify = 1;
        $showimages = 1;
        $showvideos = 1;
        $showsigs = 1;
        $showavatars = 1;
        $showquickreply = 1;
        $showredirect = 1;
        $timezone = 0;
        $regdate = time();
        
        $connection = \Yii::$app-&gt;db;
        $command = $connection-&gt;createCommand(&quot;INSERT INTO mybb_users (username, password, salt, email, usergroup, signature, buddyList, ignoreList, pmfolders, notepad, &quot;. 
            &quot; usernotes, loginkey, allownotices, receivepms, pmnotice, pmnotify, showimages, showvideos, showsigs, showavatars, &quot;.
            &quot; showquickreply, showredirect, timezone, regdate ) &quot;.
            &quot; VALUES (:username, :password, :salt, :email, :usergroup, :signature, :buddyList, :ignoreList, :pmfolders, :notepad,  &quot;.
            &quot; :usernotes, :loginkey, :allownotices, :receivepms, :pmnotice, :pmnotify, :showimages, :showvideos, :showsigs, :showavatars, &quot;.
            &quot; :showquickreply, :showredirect, :timezone, :regdate ) &quot;);
        
        $command-&gt;bindValue(':username', $username   );
        $command-&gt;bindValue(':password', $password); //  md5(md5($salt).md5($password))  );
        $command-&gt;bindValue(':salt',  $salt  );
        $command-&gt;bindValue(':email',  $email  );
        $command-&gt;bindValue(':usergroup',  $usergroup  );
        $command-&gt;bindValue(':signature',  $signature  );
        $command-&gt;bindValue(':buddyList',  $buddyList  );
        $command-&gt;bindValue(':ignoreList',  $ignoreList  );
        $command-&gt;bindValue(':pmfolders',  $pmfolders  );
        $command-&gt;bindValue(':notepad',  $notepad  );
        $command-&gt;bindValue(':usernotes',  $usernotes  );
        $command-&gt;bindValue(':loginkey', $loginkey);
        $command-&gt;bindValue(':allownotices',  $allownotices  );
        $command-&gt;bindValue(':receivepms',  $receivepms  );
        $command-&gt;bindValue(':pmnotice',  $pmnotice  );
        $command-&gt;bindValue(':pmnotify',  $pmnotify  );
        $command-&gt;bindValue(':showimages',  $showimages  );
        $command-&gt;bindValue(':showvideos',  $showvideos  );
        $command-&gt;bindValue(':showsigs',  $showsigs  );
        $command-&gt;bindValue(':showavatars',  $showavatars  );
        $command-&gt;bindValue(':showquickreply',  $showquickreply  );
        $command-&gt;bindValue(':showredirect',  $showredirect  );
        $command-&gt;bindValue(':timezone',  $timezone  );
        $command-&gt;bindValue(':regdate',  $regdate  );
        
        $command-&gt;execute();
        
    }

    
    public function findMyBBUserByLoggedInUser()
    {
        $connection = \Yii::$app-&gt;db;
        $command = $connection-&gt;createCommand(&quot;SELECT uid,username,password,salt,loginkey,email,usergroup &quot;.
            &quot; FROM mybb_users where username = :username&quot;);
        $command-&gt;bindValue(&quot;:username&quot;,  Yii::$app-&gt;user-&gt;identity-&gt;username );
        $user = $command-&gt;queryOne();
        
        if(!$user)
        {
            //MyBB user was not there for some reason, so creating it now and trying again.
            
            $origUser = User::findUserByUsername(Yii::$app-&gt;user-&gt;identity-&gt;username);
            // insert MyBB user info
            $this-&gt;createMyBBUser($origUser-&gt;username, $origUser-&gt;email);
            
            $user = $this-&gt;findMyBBUserByLoggedInUser();
        }
        
        return $user;
    }
}

?&gt;</code></pre><br />
<br />
Once in place, I modified the MyBB login and register links in the header_welcomeblock_guest theme template to point to the existing systems login and register controllers.  <br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">&lt;span class=&quot;welcome&quot;&gt;{$lang-&gt;welcome_guest} &lt;a href=&quot;/site/user/login?return=/site/user/forumautologin&quot; class=&quot;login&quot;&gt;{$lang-&gt;welcome_login}&lt;/a&gt; &lt;a href=&quot;/site/user/register&quot; class=&quot;register&quot;&gt;{$lang-&gt;welcome_register}&lt;/a&gt;&lt;/span&gt;</code></pre><br />
<br />
Presumably, no one should directly login or register via the MyBB user now, though that might need a little more tightening up perhaps, but the auto logging in does seem to work.<br />
<br />
Anyway.... It would be great to hear thoughts on whether this methodology is ok or sorely lacking in certain areas.<br />
<br />
Thanks.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[creating posts using python/API]]></title>
			<link>https://community.mybb.com/thread-241669.html</link>
			<pubDate>Fri, 23 Aug 2024 16:59:42 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=21433">steviem</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-241669.html</guid>
			<description><![CDATA[Not sure if this is the correct section for this question.<br />
 <br />
However, is it possible to 'auto-create' posts/usernames etc, via API using a program such as Python?<br />
<br />
ie so that the forum could be populated with threads, created via Python<br />
<br />
Thanks]]></description>
			<content:encoded><![CDATA[Not sure if this is the correct section for this question.<br />
 <br />
However, is it possible to 'auto-create' posts/usernames etc, via API using a program such as Python?<br />
<br />
ie so that the forum could be populated with threads, created via Python<br />
<br />
Thanks]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Safe User Integration with Wordpress/Joomla]]></title>
			<link>https://community.mybb.com/thread-241665.html</link>
			<pubDate>Thu, 22 Aug 2024 13:54:01 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=29955">SolidSnake2003</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-241665.html</guid>
			<description><![CDATA[Is there an up to date way to integrate MyBB with either Joomla or Wordpress?]]></description>
			<content:encoded><![CDATA[Is there an up to date way to integrate MyBB with either Joomla or Wordpress?]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Cookie integration]]></title>
			<link>https://community.mybb.com/thread-241327.html</link>
			<pubDate>Wed, 03 Jul 2024 17:45:34 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=73545">ruffex</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-241327.html</guid>
			<description><![CDATA[hi everybody !<br />
<br />
i want integrate in my torrent tracker mybb forum !<br />
<br />
some files am integrate full ! example : newreply, newthread, modcp and other !<br />
<br />
it ok but i cant integrate mybb cookies , without cookies i cant delete threads , post and other..<br />
<br />
how to to integrate mybb cookies  ?<br />
<br />
this is not work , <br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">$inlinecookie = &quot;inlinemod_forum&quot;.$fid;

if(isset($mybb-&gt;cookies[$inlinecookie]) &amp;&amp; my_strpos($mybb-&gt;cookies[$inlinecookie], &quot;|{$thread['tid']}|&quot;) !== false)
			{
				$inlinecheck = &quot;checked=\&quot;checked\&quot;&quot;;
				++$inlinecount;
			}
			else
			{
				$inlinecheck = '';
			}</code></pre>]]></description>
			<content:encoded><![CDATA[hi everybody !<br />
<br />
i want integrate in my torrent tracker mybb forum !<br />
<br />
some files am integrate full ! example : newreply, newthread, modcp and other !<br />
<br />
it ok but i cant integrate mybb cookies , without cookies i cant delete threads , post and other..<br />
<br />
how to to integrate mybb cookies  ?<br />
<br />
this is not work , <br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">$inlinecookie = &quot;inlinemod_forum&quot;.$fid;

if(isset($mybb-&gt;cookies[$inlinecookie]) &amp;&amp; my_strpos($mybb-&gt;cookies[$inlinecookie], &quot;|{$thread['tid']}|&quot;) !== false)
			{
				$inlinecheck = &quot;checked=\&quot;checked\&quot;&quot;;
				++$inlinecount;
			}
			else
			{
				$inlinecheck = '';
			}</code></pre>]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Joomla 5.1.1. and MyBB?]]></title>
			<link>https://community.mybb.com/thread-241218.html</link>
			<pubDate>Mon, 17 Jun 2024 16:28:35 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=154886">rubin4</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-241218.html</guid>
			<description><![CDATA[Hello, <br />
Does anyone know of MyBB can be successfully integrated with new Joomla (v5.1.1)? <br />
Your help will be highly appreciated. <br />
Thank you.]]></description>
			<content:encoded><![CDATA[Hello, <br />
Does anyone know of MyBB can be successfully integrated with new Joomla (v5.1.1)? <br />
Your help will be highly appreciated. <br />
Thank you.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Using myBB accounts in my own script]]></title>
			<link>https://community.mybb.com/thread-240417.html</link>
			<pubDate>Fri, 01 Mar 2024 14:25:40 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=145785">Harlock</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-240417.html</guid>
			<description><![CDATA[Hi gang,<br />
<br />
So haven't done any php in decades (php3 lol), I would like to create a tool that uses myBB accounts to log in. How do I catch the current session (and if not send back people to the forum homepage to log) ?<br />
<br />
I asked chatgpt, but it doesn't seem to be doing anything :<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">&lt;?php

define('IN_MYBB', 1);
require_once 'global.php';

$session = $mybb-&gt;session;
$session-&gt;start();

// Get user ID
$uid = $session-&gt;get('uid');

// Get username
$username = $session-&gt;get('username');
echo $username;

// Check if user is logged in
if($session-&gt;is_set('uid')) {
    echo &quot;Welcome, $username!&quot;;
} else {
    echo &quot;Please log in to access this page.&quot;;
}

?&gt;</code></pre><br />
Thanks for the help !]]></description>
			<content:encoded><![CDATA[Hi gang,<br />
<br />
So haven't done any php in decades (php3 lol), I would like to create a tool that uses myBB accounts to log in. How do I catch the current session (and if not send back people to the forum homepage to log) ?<br />
<br />
I asked chatgpt, but it doesn't seem to be doing anything :<br />
<br />
<pre class="block-code line-numbers language-none"><code class="language-php">&lt;?php

define('IN_MYBB', 1);
require_once 'global.php';

$session = $mybb-&gt;session;
$session-&gt;start();

// Get user ID
$uid = $session-&gt;get('uid');

// Get username
$username = $session-&gt;get('username');
echo $username;

// Check if user is logged in
if($session-&gt;is_set('uid')) {
    echo &quot;Welcome, $username!&quot;;
} else {
    echo &quot;Please log in to access this page.&quot;;
}

?&gt;</code></pre><br />
Thanks for the help !]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Possible to use MyBB on old Joomla Versions?]]></title>
			<link>https://community.mybb.com/thread-240302.html</link>
			<pubDate>Wed, 14 Feb 2024 14:18:18 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=153428">natastna2</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-240302.html</guid>
			<description><![CDATA[Hello,<br />
<br />
I'm hoping to integrate MyBB with <a href="https://www.seed-city.com" target="_blank" rel="noopener" class="mycode_url">https://www.seed-city.com</a><br />
<br />
This runs on an old version of Joomla - Joomla 1.5.<br />
<br />
Can anyone let me know if this is a possibility?<br />
<br />
We are looking to upgrade the website to Wordpress in a few months and so if not we could wait until then.<br />
<br />
Kind Regards,<br />
Anthony]]></description>
			<content:encoded><![CDATA[Hello,<br />
<br />
I'm hoping to integrate MyBB with <a href="https://www.seed-city.com" target="_blank" rel="noopener" class="mycode_url">https://www.seed-city.com</a><br />
<br />
This runs on an old version of Joomla - Joomla 1.5.<br />
<br />
Can anyone let me know if this is a possibility?<br />
<br />
We are looking to upgrade the website to Wordpress in a few months and so if not we could wait until then.<br />
<br />
Kind Regards,<br />
Anthony]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Cloudflare Turnstile]]></title>
			<link>https://community.mybb.com/thread-239022.html</link>
			<pubDate>Sat, 19 Aug 2023 05:12:27 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=123904">W13</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-239022.html</guid>
			<description><![CDATA[<a href="https://developers.cloudflare.com/turnstile/" target="_blank" rel="noopener" class="mycode_url">https://developers.cloudflare.com/turnstile/</a><br />
<br />
It's a smart captcha alternative. Should consider building into 1.9.]]></description>
			<content:encoded><![CDATA[<a href="https://developers.cloudflare.com/turnstile/" target="_blank" rel="noopener" class="mycode_url">https://developers.cloudflare.com/turnstile/</a><br />
<br />
It's a smart captcha alternative. Should consider building into 1.9.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[WordPress to MyBB Complete Integration]]></title>
			<link>https://community.mybb.com/thread-237094.html</link>
			<pubDate>Tue, 29 Nov 2022 13:07:53 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=147764">[ChrisB]</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-237094.html</guid>
			<description><![CDATA[Are there any other MyBB users who would like to use WordPress for their sites content/articles, integrated with MyBB at a single login/logout point?<br />
<br />
I am curious if anyone one would be up for funding such development between each other.<br />
<br />
Features:<br />
Single Login/Logout point (shared cookie)<br />
User group management automatically<br />
<br />
This would allow the cost to be broken down amongst those that fund it, whilst allowing a developer to invest their valuable time towards completing something complete and polished. It would also enable the development to continue with future releases if enough interest is shown. If you're interested or have ideas on features - drop a reply.]]></description>
			<content:encoded><![CDATA[Are there any other MyBB users who would like to use WordPress for their sites content/articles, integrated with MyBB at a single login/logout point?<br />
<br />
I am curious if anyone one would be up for funding such development between each other.<br />
<br />
Features:<br />
Single Login/Logout point (shared cookie)<br />
User group management automatically<br />
<br />
This would allow the cost to be broken down amongst those that fund it, whilst allowing a developer to invest their valuable time towards completing something complete and polished. It would also enable the development to continue with future releases if enough interest is shown. If you're interested or have ideas on features - drop a reply.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Trigger 3rd party API from MyBB]]></title>
			<link>https://community.mybb.com/thread-236453.html</link>
			<pubDate>Mon, 05 Sep 2022 00:20:25 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=146608">gman</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-236453.html</guid>
			<description><![CDATA[Hi all,<br />
<br />
i would like to create a REST Client from MyBB to a third party API and have its response posted back to MyBB. Is this possible ?<br />
<br />
Thanks in advance!]]></description>
			<content:encoded><![CDATA[Hi all,<br />
<br />
i would like to create a REST Client from MyBB to a third party API and have its response posted back to MyBB. Is this possible ?<br />
<br />
Thanks in advance!]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[MyBB in Wordpress]]></title>
			<link>https://community.mybb.com/thread-234579.html</link>
			<pubDate>Wed, 29 Dec 2021 23:05:10 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=44583">Wazzyl</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-234579.html</guid>
			<description><![CDATA[Is there maybe a solution to get MyBB Integrated in WordPress itself? I have checked out a couple of topics/threads for this topic, and they all are out of date.<br />
<br />
does anyone in the MyBB Community have a solution to fix this, cause I love the MyBB forum better than all other forums...<br />
<br />
I have a business company and I want to fit the MyBB forums into my website.<br />
<br />
I know in 1.4 and 1.6 we had a plugin for that.]]></description>
			<content:encoded><![CDATA[Is there maybe a solution to get MyBB Integrated in WordPress itself? I have checked out a couple of topics/threads for this topic, and they all are out of date.<br />
<br />
does anyone in the MyBB Community have a solution to fix this, cause I love the MyBB forum better than all other forums...<br />
<br />
I have a business company and I want to fit the MyBB forums into my website.<br />
<br />
I know in 1.4 and 1.6 we had a plugin for that.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[configuring MyBB with Ace Editor]]></title>
			<link>https://community.mybb.com/thread-232238.html</link>
			<pubDate>Mon, 26 Apr 2021 20:07:10 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://community.mybb.com/member.php?action=profile&uid=140281">wajed</a>]]></dc:creator>
			<guid isPermaLink="false">https://community.mybb.com/thread-232238.html</guid>
			<description><![CDATA[Hello,<br />
+ I have myBB installed<br />
+ I am the only one who has access to the forums<br />
+ I enabled HTML<br />
+ JS and CSS are not allowed, I used MyCode<br />
+ JS and CSS are working using MyCode (as far as I've tested)<br />
+ I'm trying to include Ace Editor into posts/threads, which isn't working.<br />
+ I'm trying the following specifically:<br />
<pre class="block-code line-numbers language-none"><code class="language-none">[style]  #editor {height:500px; width:500px; font-size:50px;} [/style]

&lt;div id=&quot;editor&quot;&gt;function foo(items) {
    var x = &quot;All this is syntax highlighted&quot;;
    return x;
}&lt;/div&gt;

[javascript=&quot;/src-min/ace.js&quot;]
[javascript] var editor = ace.edit(&quot;editor&quot;); editor.setTheme(&quot;ace/theme/monokai&quot;); editor.session.setMode(&quot;ace/mode/javascript&quot;);[/javascript]
</code></pre><br />
<br />
which results in<br />
<br />
&lt;div id="editor"&gt;function foo(items) {<br />
    var x = "All this is syntax highlighted";<br />
    return x;<br />
}&lt;/div&gt;<br />
<br />
(no Ace editor/textbox... plain text)<br />
<br />
-----------------------------------------<br />
<br />
note: MyCodes:<br />
<br />
1)<br />
Name: CSS: block <br />
Regular Expression: \[style(.*?)\](.*?)\[/style\]<br />
Replacement: &lt;style&#36;1&gt;&#36;2&lt;/style&gt;<br />
<br />
2)<br />
Name: JavaScript: Inline <br />
Regular Expression: \[javascript\](.*?)\[/javascript\]<br />
Replacement: &lt;script type="text/javascript"&gt;&#36;1&lt;/script&gt;<br />
<br />
3)<br />
Name: Javascript: External<br />
Regular Expression: \[javascript=(.*?)\]<br />
Replacement: &lt;script type="text/javascript" src="&#36;1"&gt;&lt;/script&gt;<br />
The MyCodes are baffling, but I think they are working anyway... I don't know why the editor isn't working.<br />
<br />
------------------------------------------<br />
<br />
Please note I installed/configured the editor correctly (i.e., I can access it through regular HTML page)]]></description>
			<content:encoded><![CDATA[Hello,<br />
+ I have myBB installed<br />
+ I am the only one who has access to the forums<br />
+ I enabled HTML<br />
+ JS and CSS are not allowed, I used MyCode<br />
+ JS and CSS are working using MyCode (as far as I've tested)<br />
+ I'm trying to include Ace Editor into posts/threads, which isn't working.<br />
+ I'm trying the following specifically:<br />
<pre class="block-code line-numbers language-none"><code class="language-none">[style]  #editor {height:500px; width:500px; font-size:50px;} [/style]

&lt;div id=&quot;editor&quot;&gt;function foo(items) {
    var x = &quot;All this is syntax highlighted&quot;;
    return x;
}&lt;/div&gt;

[javascript=&quot;/src-min/ace.js&quot;]
[javascript] var editor = ace.edit(&quot;editor&quot;); editor.setTheme(&quot;ace/theme/monokai&quot;); editor.session.setMode(&quot;ace/mode/javascript&quot;);[/javascript]
</code></pre><br />
<br />
which results in<br />
<br />
&lt;div id="editor"&gt;function foo(items) {<br />
    var x = "All this is syntax highlighted";<br />
    return x;<br />
}&lt;/div&gt;<br />
<br />
(no Ace editor/textbox... plain text)<br />
<br />
-----------------------------------------<br />
<br />
note: MyCodes:<br />
<br />
1)<br />
Name: CSS: block <br />
Regular Expression: \[style(.*?)\](.*?)\[/style\]<br />
Replacement: &lt;style&#36;1&gt;&#36;2&lt;/style&gt;<br />
<br />
2)<br />
Name: JavaScript: Inline <br />
Regular Expression: \[javascript\](.*?)\[/javascript\]<br />
Replacement: &lt;script type="text/javascript"&gt;&#36;1&lt;/script&gt;<br />
<br />
3)<br />
Name: Javascript: External<br />
Regular Expression: \[javascript=(.*?)\]<br />
Replacement: &lt;script type="text/javascript" src="&#36;1"&gt;&lt;/script&gt;<br />
The MyCodes are baffling, but I think they are working anyway... I don't know why the editor isn't working.<br />
<br />
------------------------------------------<br />
<br />
Please note I installed/configured the editor correctly (i.e., I can access it through regular HTML page)]]></content:encoded>
		</item>
	</channel>
</rss>