كود قسمي المفضل للنسخة awesome bb

2 مشترك

اذهب الى الأسفل

تم الحل كود قسمي المفضل للنسخة awesome bb

مُساهمة من طرف المبدع الخبير الإثنين 14 أكتوبر 2024 - 14:43

ممكن تعديل كود قسمي المفضل الموجود?هنآ وجعله خاص بالنسخة awesome bb ؟


عدل سابقا من قبل المبدع الخبير في الأربعاء 16 أكتوبر 2024 - 14:15 عدل 1 مرات
المبدع الخبير
المبدع الخبير
 
 

ذكر
عدد المساهمات : 135
معدل النشاط : 1503
السُمعة : 0

https://pirates-revo.forummo.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: كود قسمي المفضل للنسخة awesome bb

مُساهمة من طرف كونان2000 الإثنين 14 أكتوبر 2024 - 19:38

اهلا
ابحث عن التالي في قالب index_box
الكود:
<a href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>
واستبدله بالتالي
الكود:
<a href="{catrow.forumrow.U_VIEWFORUM}" class="conan2000">{catrow.forumrow.FORUM_NAME}</a>

JavaScript
الكود:
$(function() {
  if (/\/c\d+-/.test(window.location.href)) return; // return if category
 
  // automatically detects the version
  var version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('div.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : document.getElementById('fa_edge') ? 4 : 'badapple';
 
  // error notifications
  if (version == 'badapple' || !window.JSON || !window.localStorage) {
    var errString = 'The plugin "fa_starred" could not be executed because : ';
 
    if (version == 'badapple') errString += '\nYour forum version is not supported.';
    if (!window.JSON) errString += '\nJSON is not supported by your browser';
    if (!window.localStorage) errString += '\nThe Storage API is not support by your browser.';
 
    window.console && console.error ? console.error(errString) : alert(errString);
    return;
  }
 
  // get fontawesome if unavailable
  if (!$('link[href$="font-awesome.min.css"]')[0]) {
    document.getElementsByTagName('HEAD')[0].insertAdjacentHTML('beforeend', '<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css" />');
  }
 
  window.fa_starred = {
    version : version, // forum version
    forums : localStorage.fa_starred_forums ? JSON.parse(localStorage.fa_starred_forums) : null,
 
    // language settings
    lang : {
        star : 'Star this forum',
      unstar : 'Unstar this forum',
      starred : 'Starred Forums'
    },
 
    icon : {
        star : '',
      unstar : ''
    },
 
    // selectors
    select : {
      content : version ? document.getElementById('main-content') : $('#content-container td:has(> img[height="5"])')[0],
      category : ['.forumline:has(.secondarytitle)', '.forum.type-table-forum', '.main:has(.tcr) .main-content', '.borderwrap:has(.index-box)', '.forum-category'][version],
      forum :'a.' + (version ? 'conan2000': ''),
      row : version == 1 ? '.forum-section' : version == 4 ? '.forum-block' : 'tr'
    },
 
    // move the selected forum to the "starred" category
    star : function(that, id, startup) {
      if (!fa_starred.forums) fa_starred.forums = {};
      if (!fa_starred.board) fa_starred.createStarBoard();
 
      if (!fa_starred.forums[id]) {
        // clone the row and add it to the star board
        var clone = $(that).closest(fa_starred.select.row)[0].cloneNode(true),
            rows = $(that).closest(fa_starred.select.row).parent().find(fa_starred.select.row);
 
        // update the star attributes for the clone
        $('.fa_star', clone).attr({
          'onclick' : 'fa_starred.unstar(this, ' + id + '); return false',
          'class' : 'fa_unstar',
          'title' : fa_starred.lang.unstar
        }).html('<i class="fa">' + fa_starred.icon.unstar + '</i>');
 
        fa_starred.list.appendChild(clone); // append the clone to the starred category
 
        $(that).closest(fa_starred.select.row)[0].style.display = 'none'; // hide the original row
 
        // check if all forums are hidden for this category
        for (var i = 0, j = rows.length, k = 0; i < j; i++) {
          if (/none/.test(rows[i].style.display)) k++;
        }
 
        // hide the category if all forums are hidden
        if (i == k) {
          $(that).closest(fa_starred.select.category)[0].className += ' fa_star_hidden';
        }
 
        // jump to the star board if it's out of sight
        if (!startup && document.getElementById('fa_star_board').getBoundingClientRect().top < 0) {
          window.location.hash = '';
          window.location.hash = '#fa_star_board';
        }
 
        // update storage
        fa_starred.forums[id] = 1;
        localStorage.fa_starred_forums = JSON.stringify(fa_starred.forums);
      }
 
    },
 
    // unstar the selected forum
    unstar : function (that, id) {
      var forum, catg, i = 0, j;
 
      fa_starred.list.removeChild($(that).closest(fa_starred.select.row)[0]); // remove cloned row
 
      // update variables
      forum = $(fa_starred.select.forum + '[href^="/f' + id + '-"]')[0]; // original forum
      catg = $(forum).closest(fa_starred.select.category)[0]; // original category
 
      $(forum).closest(fa_starred.select.row)[0].style.display = ''; // show the original forum's row
 
      // show the category if all forums were hidden
      if (/fa_star_hidden/.test(catg.className)) {
        catg.className = catg.className.replace(/fa_star_hidden/, '');
      }
 
      // delete the starred forum and check if there are anymore stars
      delete fa_starred.forums[id];
      for (j in fa_starred.forums) {
        if (fa_starred.forums[j]) i++;
      }
 
      // update storage
      if (i) {
        localStorage.fa_starred_forums = JSON.stringify(fa_starred.forums);
      } else {
        fa_starred.forums = null;
        localStorage.removeItem('fa_starred_forums');
 
        // remove nodes
        if (version == 2) {
          fa_starred.board.parentNode.removeChild(fa_starred.board.previousSibling); // remove header for punbb
        }
        fa_starred.board.parentNode.removeChild(fa_starred.board);
 
        // delete node references
        delete fa_starred.board;
        delete fa_starred.list;
      }
 
    },
 
    // create the "starred" category
    createStarBoard : function() {
      var catg = $(fa_starred.select.category, fa_starred.select.content)[0],
          board = catg ? catg.cloneNode(true) : null,
          rows = $(fa_starred.select.row, board);
 
      if (!catg) return;
 
      board.id = 'fa_star_board';
      board.style.display = '';
 
      if (version != 2) {
        board.getElementsByTagName('H2')[0].innerHTML = fa_starred.lang.starred; // change category title
      }
 
      // find forum list and remove exisiting rows in the clone
      fa_starred.list = rows[0].parentNode;
      rows.remove();
 
      // punbb insertion method
      if (version == 2) {
        var head = catg.previousSibling.cloneNode(true);
        head.getElementsByTagName('H2')[0].innerHTML = fa_starred.lang.starred;
 
        catg.parentNode.insertBefore(board, catg.previousSibling);
        board.parentNode.insertBefore(head, board);
      } else {
        catg.parentNode.insertBefore(board, catg); // default insertion
      }
 
      fa_starred.board = board;
    }
  };
 
  fa_starred.select.row += ':has(' + fa_starred.select.forum + ')'; // update row selector
 
  // general startup
  var a = $(fa_starred.select.forum, fa_starred.select.content),
      i = 0,
      j = a.length,
      k,
      id;
 
  // setup star board and reset forum states if starred
  if (fa_starred.forums) {
    if (!fa_starred.board) fa_starred.createStarBoard();
    for (k in fa_starred.forums) {
      fa_starred.forums[k] = 0;
    }
  }
 
  // setup stars and starred forums
  for (; i < j; i++) {
    id = a[i].href.replace(/.*?\/f(\d+).*/, '$1');
 
    a[i].insertAdjacentHTML('afterend', '<a href="#" class="fa_star" onclick="fa_starred.star(this, ' + id + '); return false;" title="' + fa_starred.lang.star + '"><i class="fa">' + fa_starred.icon.unstar + '</i></a>');
 
    if (fa_starred.forums) {
      for (k in fa_starred.forums) {
        if (k == id) {
          fa_starred.star(a[i], id, true);
        }
      }
    }
  }
 
  document.getElementsByTagName('HEAD')[0].insertAdjacentHTML('beforeend', '<style type="text/css">a.fa_star,a.fa_unstar{color:#999!important;font-size:16px;vertical-align:-2px;margin-left:3px;opacity:0}a.fa_star:hover,a.fa_unstar,li:hover a.fa_star,tr:hover a.fa_star{opacity:1}a.fa_star i,a.fa_unstar i{position:relative}a.fa_star i:hover:after,a.fa_unstar i:after{content:"' + fa_starred.icon.star + '";position:absolute;left:0;bottom:0}a.fa_unstar i:hover:after{content:""}.fa_star_hidden {display:none!important}</style>');
});
كونان2000
كونان2000
احلى نائب
احلى نائب

ذكر
عدد المساهمات : 1643
معدل النشاط : 3427
السُمعة : 271

https://anime.forumperso.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: كود قسمي المفضل للنسخة awesome bb

مُساهمة من طرف المبدع الخبير الإثنين 14 أكتوبر 2024 - 19:45

كونان2000 كتب:اهلا
ابحث عن التالي في قالب index_box
الكود:
<a href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_NAME}</a>
واستبدله بالتالي
الكود:
<a href="{catrow.forumrow.U_VIEWFORUM}" class="conan2000">{catrow.forumrow.FORUM_NAME}</a>

JavaScript
الكود:
$(function() {
  if (/\/c\d+-/.test(window.location.href)) return; // return if category
 
  // automatically detects the version
  var version = $('.bodylinewidth')[0] ? 0 : document.getElementById('wrap') ? 1 : $('div.pun')[0] ? 2 : document.getElementById('ipbwrapper') ? 3 : document.getElementById('fa_edge') ? 4 : 'badapple';
 
  // error notifications
  if (version == 'badapple' || !window.JSON || !window.localStorage) {
    var errString = 'The plugin "fa_starred" could not be executed because : ';
 
    if (version == 'badapple') errString += '\nYour forum version is not supported.';
    if (!window.JSON) errString += '\nJSON is not supported by your browser';
    if (!window.localStorage) errString += '\nThe Storage API is not support by your browser.';
 
    window.console && console.error ? console.error(errString) : alert(errString);
    return;
  }
 
  // get fontawesome if unavailable
  if (!$('link[href$="font-awesome.min.css"]')[0]) {
    document.getElementsByTagName('HEAD')[0].insertAdjacentHTML('beforeend', '<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css" />');
  }
 
  window.fa_starred = {
    version : version, // forum version
    forums : localStorage.fa_starred_forums ? JSON.parse(localStorage.fa_starred_forums) : null,
 
    // language settings
    lang : {
        star : 'Star this forum',
      unstar : 'Unstar this forum',
      starred : 'Starred Forums'
    },
 
    icon : {
        star : '',
      unstar : ''
    },
 
    // selectors
    select : {
      content : version ? document.getElementById('main-content') : $('#content-container td:has(> img[height="5"])')[0],
      category : ['.forumline:has(.secondarytitle)', '.forum.type-table-forum', '.main:has(.tcr) .main-content', '.borderwrap:has(.index-box)', '.forum-category'][version],
      forum :'a.' + (version ? 'conan2000': ''),
      row : version == 1 ? '.forum-section' : version == 4 ? '.forum-block' : 'tr'
    },
 
    // move the selected forum to the "starred" category
    star : function(that, id, startup) {
      if (!fa_starred.forums) fa_starred.forums = {};
      if (!fa_starred.board) fa_starred.createStarBoard();
 
      if (!fa_starred.forums[id]) {
        // clone the row and add it to the star board
        var clone = $(that).closest(fa_starred.select.row)[0].cloneNode(true),
            rows = $(that).closest(fa_starred.select.row).parent().find(fa_starred.select.row);
 
        // update the star attributes for the clone
        $('.fa_star', clone).attr({
          'onclick' : 'fa_starred.unstar(this, ' + id + '); return false',
          'class' : 'fa_unstar',
          'title' : fa_starred.lang.unstar
        }).html('<i class="fa">' + fa_starred.icon.unstar + '</i>');
 
        fa_starred.list.appendChild(clone); // append the clone to the starred category
 
        $(that).closest(fa_starred.select.row)[0].style.display = 'none'; // hide the original row
 
        // check if all forums are hidden for this category
        for (var i = 0, j = rows.length, k = 0; i < j; i++) {
          if (/none/.test(rows[i].style.display)) k++;
        }
 
        // hide the category if all forums are hidden
        if (i == k) {
          $(that).closest(fa_starred.select.category)[0].className += ' fa_star_hidden';
        }
 
        // jump to the star board if it's out of sight
        if (!startup && document.getElementById('fa_star_board').getBoundingClientRect().top < 0) {
          window.location.hash = '';
          window.location.hash = '#fa_star_board';
        }
 
        // update storage
        fa_starred.forums[id] = 1;
        localStorage.fa_starred_forums = JSON.stringify(fa_starred.forums);
      }
 
    },
 
    // unstar the selected forum
    unstar : function (that, id) {
      var forum, catg, i = 0, j;
 
      fa_starred.list.removeChild($(that).closest(fa_starred.select.row)[0]); // remove cloned row
 
      // update variables
      forum = $(fa_starred.select.forum + '[href^="/f' + id + '-"]')[0]; // original forum
      catg = $(forum).closest(fa_starred.select.category)[0]; // original category
 
      $(forum).closest(fa_starred.select.row)[0].style.display = ''; // show the original forum's row
 
      // show the category if all forums were hidden
      if (/fa_star_hidden/.test(catg.className)) {
        catg.className = catg.className.replace(/fa_star_hidden/, '');
      }
 
      // delete the starred forum and check if there are anymore stars
      delete fa_starred.forums[id];
      for (j in fa_starred.forums) {
        if (fa_starred.forums[j]) i++;
      }
 
      // update storage
      if (i) {
        localStorage.fa_starred_forums = JSON.stringify(fa_starred.forums);
      } else {
        fa_starred.forums = null;
        localStorage.removeItem('fa_starred_forums');
 
        // remove nodes
        if (version == 2) {
          fa_starred.board.parentNode.removeChild(fa_starred.board.previousSibling); // remove header for punbb
        }
        fa_starred.board.parentNode.removeChild(fa_starred.board);
 
        // delete node references
        delete fa_starred.board;
        delete fa_starred.list;
      }
 
    },
 
    // create the "starred" category
    createStarBoard : function() {
      var catg = $(fa_starred.select.category, fa_starred.select.content)[0],
          board = catg ? catg.cloneNode(true) : null,
          rows = $(fa_starred.select.row, board);
  
      if (!catg) return;
 
      board.id = 'fa_star_board';
      board.style.display = '';
 
      if (version != 2) {
        board.getElementsByTagName('H2')[0].innerHTML = fa_starred.lang.starred; // change category title
      }
 
      // find forum list and remove exisiting rows in the clone
      fa_starred.list = rows[0].parentNode;
      rows.remove();
 
      // punbb insertion method
      if (version == 2) {
        var head = catg.previousSibling.cloneNode(true);
        head.getElementsByTagName('H2')[0].innerHTML = fa_starred.lang.starred;
 
        catg.parentNode.insertBefore(board, catg.previousSibling);
        board.parentNode.insertBefore(head, board);
      } else {
        catg.parentNode.insertBefore(board, catg); // default insertion
      }
 
      fa_starred.board = board;
    }
  };
 
  fa_starred.select.row += ':has(' + fa_starred.select.forum + ')'; // update row selector
 
  // general startup
  var a = $(fa_starred.select.forum, fa_starred.select.content),
      i = 0,
      j = a.length,
      k,
      id;
 
  // setup star board and reset forum states if starred
  if (fa_starred.forums) {
    if (!fa_starred.board) fa_starred.createStarBoard();
    for (k in fa_starred.forums) {
      fa_starred.forums[k] = 0;
    }
  }
 
  // setup stars and starred forums
  for (; i < j; i++) {
    id = a[i].href.replace(/.*?\/f(\d+).*/, '$1');
 
    a[i].insertAdjacentHTML('afterend', '<a href="#" class="fa_star" onclick="fa_starred.star(this, ' + id + '); return false;" title="' + fa_starred.lang.star + '"><i class="fa">' + fa_starred.icon.unstar + '</i></a>');
 
    if (fa_starred.forums) {
      for (k in fa_starred.forums) {
        if (k == id) {
          fa_starred.star(a[i], id, true);
        }
      }
    }
  }
 
  document.getElementsByTagName('HEAD')[0].insertAdjacentHTML('beforeend', '<style type="text/css">a.fa_star,a.fa_unstar{color:#999!important;font-size:16px;vertical-align:-2px;margin-left:3px;opacity:0}a.fa_star:hover,a.fa_unstar,li:hover a.fa_star,tr:hover a.fa_star{opacity:1}a.fa_star i,a.fa_unstar i{position:relative}a.fa_star i:hover:after,a.fa_unstar i:after{content:"' + fa_starred.icon.star + '";position:absolute;left:0;bottom:0}a.fa_unstar i:hover:after{content:""}.fa_star_hidden {display:none!important}</style>');
});

لم اجد الكود المطلوب البحث عنه علماً اني معدل قالب الاندكس بوكس وهذا الكود الذي استعمله
الكود:
<div class="forumsContainer">
    <!-- BEGIN catrow -->
    <!-- BEGIN tablehead -->
    <div class="forumRowContainer">
        <!-- END tablehead -->
        <!-- BEGIN forumrow -->
        <div class="forumRow {catrow.forumrow.FOLDER_CLASSNAME} {catrow.forumrow.TYPE_SECTION}">

          <div class="forumRowImage"><a class="forumImg" href="{catrow.forumrow.U_VIEWFORUM}">{catrow.forumrow.FORUM_DESC}</a></div>

            <div class="forumRowTitle">
              <a href="{catrow.forumrow.U_VIEWFORUM}" title="{catrow.forumrow.FORUM_NAME}" class="forumtitle">{catrow.forumrow.FORUM_NAME}</a>
                <div class="forumRowSubForums"><i class="fas fa-comments"></i></div>
              <div class="sub_forums">{catrow.forumrow.LINKS}</div>
            </div>

            <div class="forumRowLastTopic">
              <!-- BEGIN switch_topic_title -->
               <a href="{catrow.forumrow.U_LATEST_TOPIC}" class="forumLastTopic" title="{catrow.forumrow.LATEST_TOPIC_TITLE}">{catrow.forumrow.LATEST_TOPIC_NAME}</a>
              <!-- END switch_topic_title -->
          </div>

        </div>
        <!-- END forumrow -->
        <!-- BEGIN tablefoot -->
    </div>
    <!-- END tablefoot -->
    <!-- END catrow -->
</div>
<script type="text/javascript">
    //<![CDATA[

  $(function() {  
  var sep = '', max_by_line = 2;
  $('.s_forums').each(function() {  
    var nth = 0;  
    $('a.gensmall', this).each(function(){  
      var next = this.nextSibling;
      if (next && next.nodeType == 3 && next.nodeValue == ", ") {  
        if (++nth % max_by_line) $(next).replaceWith(sep);
        else $(next).replaceWith('<br>');
      }  
    });  
  });  
});
  
$(".sub_forums").each(function() {
    var sub = $(this);
    if (!sub.is(":empty")) {
        sub.contents().filter(function() {
            return this.nodeType === 3;
        }).remove().end().filter("a").wrap("<li></li>");
  sub.wrapInner('<ul class="subLink"></ul>').prepend("");
    }
});
$(".forumRowSubForums").each(function() {
    $(this).click(function() {
        $(this).parent().toggleClass('show');
    })
});
  
$(function() {
    $(".forumRowSubForums").each(function() {
        if ( $(this).parent().find('.sub_forums').html() == "") {
            $(this).remove();
        }
    })
});  
 
  $('.forumRowLastTopic').each(function() {
        if ($(this).find('.forumLastTopic').last().is(':empty')) {
  $(this).html('<span class="noLastTopic">لا يوجد مواضيع</span>')
        }
    });
  
    //]]>
</script>
رابط المنتدى
المبدع الخبير
المبدع الخبير
 
 

ذكر
عدد المساهمات : 135
معدل النشاط : 1503
السُمعة : 0

https://pirates-revo.forummo.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: كود قسمي المفضل للنسخة awesome bb

مُساهمة من طرف كونان2000 الإثنين 14 أكتوبر 2024 - 21:49

اهلا اخي المبدع
تصميم الفئات لمنتداك غير ملائم لكود قسمي المفضل ولا لكود تبويبات الاقسام
وحتى لو يعمل لن يكون معروف بسبب طريقة التصميم المستخدمة بمنتداك

ولهذا لا انصحك بتركيب كود قسمي المفضل ولا كود تبويبات الاقسام
كونان2000
كونان2000
احلى نائب
احلى نائب

ذكر
عدد المساهمات : 1643
معدل النشاط : 3427
السُمعة : 271

https://anime.forumperso.com/

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: كود قسمي المفضل للنسخة awesome bb

مُساهمة من طرف المبدع الخبير الأربعاء 16 أكتوبر 2024 - 13:16

تم الحل جزاك الله خيرا اخي كونان
المبدع الخبير
المبدع الخبير
 
 

ذكر
عدد المساهمات : 135
معدل النشاط : 1503
السُمعة : 0

https://pirates-revo.forummo.com/

كونان2000 يعجبه هذا الموضوع

الرجوع الى أعلى الصفحة اذهب الى الأسفل

تم الحل رد: كود قسمي المفضل للنسخة awesome bb

مُساهمة من طرف كونان2000 الأربعاء 16 أكتوبر 2024 - 20:03

المبدع الخبير كتب:تم الحل جزاك الله خيرا اخي كونان
العفو اخي المبدع ^^

تم حل المشكلة & ينقل للأرشيف.
يرجى مراجعة : قوانين منتدى الدعم
كونان2000
كونان2000
احلى نائب
احلى نائب

ذكر
عدد المساهمات : 1643
معدل النشاط : 3427
السُمعة : 271

https://anime.forumperso.com/

المبدع الخبير يعجبه هذا الموضوع

الرجوع الى أعلى الصفحة اذهب الى الأسفل

الرجوع الى أعلى الصفحة

- مواضيع مماثلة

 
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى