FastComments.com

התקנת ווידג'ט דיונים אחרונים Internal Link

ווידג'ט דיונים אחרונים מציג עמודים באתר שלך שיש בהם את פעילות התגובות האחרונה. כל רשומה מציגה את כותרת העמוד, תאריך הפעילות האחרון וסך כל התגובות. הוא מזהה באופן אוטומטי רקעים כהים ומתאים את העיצוב שלו בהתאם.

התקנה בסיסית

התקנת ווידגט דיונים אחרונים
Copy CopyRun External Link
1
2<script src="https://cdn.fastcomments.com/js/widget-recent-discussions-v2.min.js"></script>
3<div id="fastcomments-widget-recent-discussions"></div>
4<script>
5 FastCommentsRecentDiscussionsV2(document.getElementById('fastcomments-widget-recent-discussions'), {
6 tenantId: 'demo'
7 });
8</script>
9

אפשרויות תצורה

הפונקציה FastCommentsRecentDiscussionsV2 מקבלת את אפשרויות התצורה הבאות:

  • tenantId (required): מזהה ה-tenant של FastComments שלך
  • count (optional): מספר העמודים להצגה. ברירת המחדל היא 20, מקסימום 100
  • hasDarkBackground (optional): כפה עיצוב במצב כהה. יזוהה אוטומטית מרקע הדף אם לא הוגדר

דוגמאות מתקדמות

ספירה מותאמת

דיונים אחרונים עם ספירה מותאמת
Copy CopyRun External Link
1
2<script src="https://cdn.fastcomments.com/js/widget-recent-discussions-v2.min.js"></script>
3<div id="fastcomments-widget-recent-discussions"></div>
4<script>
5 FastCommentsRecentDiscussionsV2(document.getElementById('fastcomments-widget-recent-discussions'), {
6 tenantId: 'demo',
7 count: 5
8 });
9</script>
10

כפיית מצב כהה

דיונים אחרונים במצב כהה
Copy CopyRun External Link
1
2<script src="https://cdn.fastcomments.com/js/widget-recent-discussions-v2.min.js"></script>
3<div id="fastcomments-widget-recent-discussions"></div>
4<script>
5 FastCommentsRecentDiscussionsV2(document.getElementById('fastcomments-widget-recent-discussions'), {
6 tenantId: 'demo',
7 hasDarkBackground: true
8 });
9</script>
10