العودة إلى لوحة التحكم

التوثيق

تعلّم كيفية استخدام Asyntai

الميزات
شريط Ask AI شريط البحث بالذكاء الاصطناعي بحث الذكاء الاصطناعي لووردبريس AI Search for Joomla AI Search for Webflow AI Search for Ghost AI Search for Moodle AI Search for TYPO3 AI Search for Craft CMS AI Search for Grav AI Search for Concrete CMS AI Search for October CMS AI Search for ProcessWire AI Search for Odoo AI Search for Bagisto AI Search for Medusa AI Search for OpenCart AI Search for BigCommerce AI Search for Magento زحف الموقع فجوات المعرفة بطاقات المنتجات بطاقات المنتجات الديناميكية صور ديناميكية سياق المستخدم الأدوات المخصصة معلمات الروابط المراقبة المباشرة التحكم البشري التصعيد إشعارات الذكاء الاصطناعي التقرير اليومي تغذية البيانات في الوقت الفعلي تغذية البيانات في الوقت الفعلي - الحد الأقصى أعضاء الفريق تسجيل الدخول الموحد المصادقة الثنائية تضمين الصور رؤية الصور أداة الترجمة الترجمة والتوطين شفافية الذكاء الاصطناعي العملاء المحتملون التقاط العملاء المحتملين الذكي تذاكر الدعم فئات المحادثات الحجوزات تضمينات استبعاد الصفحات عناوين IP المحظورة سياسة الاحتفاظ بالبيانات وضع عدم الاحتفاظ إخفاء البيانات الشخصية مصنّف الردود Access Tags تثبيت إصدار الأداة سجل التدقيق النموذج الأذكى تفعيل التفكير اقتراحات الردود رسائل المتابعة تحويل الكلام إلى نص تنزيل النص الكامل الدردشة المضمّنة التضمين عبر iframe

How to Add Asyntai AI Chatbot to Discourse

Step-by-step guide for Discourse communities

الحصول على كود التضمين

الخطوة 1: احصل على كود التضمين

First, go to your Asyntai Dashboard and scroll down to the "Embed Code" section. Copy your unique embed code which will look like this:

<script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>

ملاحظة: الكود أعلاه مجرد مثال. يجب عليك نسخ كود التضمين الفريد الخاص بك من لوحة التحكم لأنه يحتوي على معرف الأداة الشخصي الخاص بك.

Before you start: Adding custom code to Discourse requires an administrator account. If you don't have admin access to your community, ask your site administrator to complete these steps.

Step 2: Open Your Theme's Customization Editor

Discourse lets you inject custom HTML and JavaScript through the theme editor, without touching any server files:

  1. Log in to your Discourse community as an administrator
  2. Click your profile icon and open Admin, or go directly to /admin
  3. In the admin sidebar, go to Customize → Themes
  4. Select the theme that is currently active on your community (it will be marked as Default or Active)
  5. Click Edit CSS/HTML to open the code editor

نصيحة: Editing the active theme applies the chatbot to every page of your community for all visitors. Make sure you are editing the theme your community actually uses, not an inactive one.

Step 3: Add the Embed Code to the Head Section

Inside the theme editor you'll see a Common tab with several code sections. This is where you paste your Asyntai embed code:

  1. In the code editor, make sure the Common tab is selected (this applies your code to both desktop and mobile)
  2. Choose the </head> section from the list of available areas (other options include Header, After Header, <body>, and Footer)
  3. Paste your Asyntai embed code into the </head> section:
<script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>
  1. Click Save to apply your changes
  2. Make sure the theme is enabled and set as the active theme for your community

نصيحة: The Asyntai script loads asynchronously, so it won't slow down your community. Placing it in the </head> section ensures it loads on every page.

Alternative Method: Use a Theme Component

If you'd rather keep the chatbot code separate from your main theme, you can add it as a dedicated theme component. This makes it easy to enable or disable without editing your active theme:

  1. Go to Admin → Customize → Components
  2. Click Install, then choose Create new to make a blank component
  3. Give it a name such as Asyntai Chatbot and click Create
  4. Open Edit CSS/HTML, select the Common tab, and paste your embed code into the </head> section
  5. انقر على Save
  6. Add the component to your active theme under the theme's Components section

ملاحظة: A theme component only takes effect once it is added to a theme that is active on your community. Toggling the component on or off is a quick way to enable or disable the chatbot.

الخطوة 4: التحقق من التثبيت

After saving your changes, open your Discourse community in a new browser tab or incognito window. You should see the chat widget button in the bottom right corner. Click it to ensure it opens and functions correctly.

لا ترى الأداة؟ Make sure you saved the theme and that it is enabled and active for your community. Clear your browser cache or view in incognito mode, since Discourse caches theme assets. Check the browser console (F12) for any JavaScript errors.

تحتاج مساعدة؟

If you're not comfortable editing your theme, ask your Discourse administrator or hosting provider to add the embed code for you. You can also contact Asyntai support for guidance on installing the chatbot on your Discourse community.

نصيحة: If your community is hosted on the official Discourse hosting plans, your admin still has full access to the theme editor, so these same steps apply.