"Edit Conflict" error when editing footer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • habili
    Senior Member
    • Jan 2018
    • 253
    • 4.2.x

    "Edit Conflict" error when editing footer

    i put a script in footer of forum style and in the script i used Persian/Arabic language. when for the first time i put script in the footer and click on "save and reload" it applies changes successfully but the problem is that when i want to edit a line ( no difference that chenge code with my script or change in default codes of vbulltin footer) after i click on "save and reload", faced with error :"Edit Conflict"
    I found that problem is for the words in Arabic/Persian font in my script and if i dont use any word in Persian language, i can change the codes as many times as i want, but when i use Persian i can edit just one time.
    how can i solve this error "Edit Conflict" when using other language like Persian in codes????
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    The only workaround that I can think of at this time is to put your script with Arabic/Persian in an external file and include it using the <script> tag.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • habili
      Senior Member
      • Jan 2018
      • 253
      • 4.2.x

      #3
      can you give me a link or guide to do that

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 73981

        #4
        W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • habili
          Senior Member
          • Jan 2018
          • 253
          • 4.2.x

          #5
          i did same way you mentioned but with out any result.

          my script :
          PHP Code:

          <script>
          var 
          div document.getElementById("footer");// footer جایگاه لینک
          var cookieName "currentTopPageIndex";//نام کوکی

          var data={
          0:{"title":" آموزش کامل دستورات ترمینال لینوکس (Linux) - مقدماتی تا پیشرفته","link":"http://linux-zone.org/forums/thread3413.html"},
          1:{"title":"فرآیند 6 مرحله ای پروسه Boot در Linux (بوت در لینوکس و جریانات Startup)","link":"http://linux-zone.org/forums/thread3297.html"},
          2:{"title":" 30 دستور مفید از دستورات لینوکس برای ادمین های سیستم","link":"http://linux-zone.org/forums/thread2192.html"},
          3:{"title":"فشرده سازی فایل ها در لینوکس با bzip2, gzip, zip, tar","link":"http://linux-zone.org/forums/thread2279.html"},
          4:{"title":"35 مثال عملی از دستور لینوکسی Find","link":"http://linux-zone.org/forums/thread1918.html"},
          5:{"title":" راهنمای کامل استفاده از دستور usermod به همراه 15 مثال عملی","link":"http://linux-zone.org/forums/thread2827.html"},
          6:{"title":" راهنمای کامل دستور useradd در linux به همراه 15 مثال عملی","link":"http://linux-zone.org/forums/thread2846.html"},
          7:{"title":" پیدا کردن Process های در حال اجرا که CPU و RAM زیادی در Linux مصرف میکنند","link":"http://linux-zone.org/forums/thread3041.html"},
          8:{"title":" مدیریت User ها و Group ها، Permission های فایل، Attribute ها و فعال کردن دسترسی sudo روی Account ها","link":"http://linux-zone.org/forums/thread3271.html"},
          9:{"title":" چطور از Command Line لینوکس Querie های MySQL/MariaDB را مستقیما اجرا کنیم؟","link":"http://linux-zone.org/forums/thread3299.html"},
          10:{"title":" چطور فایل ها و دایرکتوری هایی که در Linux فضای زیادی از Disk را مصرف کرده اند پیدا کنیم؟","link":"http://linux-zone.org/forums/thread3045.html"},
          11:{"title":" کاملترین آموزش دستور Awk در لینوکس جهت استفاده از عبارات خاص برای فیلتر کردن متن یا رشته های متنی در فایل ها","link":"http://linux-zone.org/forums/thread2855.html"},
          12:{"title":" 30 مثال از دستور TOP در Linux","link":"http://linux-zone.org/forums/thread2901.html"},
          13:{"title":" 25 نمونه از دستورات ضروری select در MySQL","link":"http://linux-zone.org/forums/thread2293.html"},
          14:{"title":" کاملترین آموزش پارتیشن بندی در لینوکس با lvm","link":"http://linux-zone.org/forums/thread1941.html"},

          };
          //لینک های مورد نیاز در این قسمت نمایش داده می شود

          var current=readCookie(cookieName);//خواندن کوکلی
          current++;//اضافه کردن به کوکی
          if(current >= Object.keys(data).length){
              
          current=0;//ریست شدن کوکی از سر خط
          }


          createCookie(cookieName,current);//بروز رسانی کوکی

          createElement();

          function 
          createElement(){
              var 
          result=getObjectKeyIndex(data,current);

              var 
          aTag document.createElement('a');//ساخت لینک
              
          aTag.setAttribute('href',result.link);
              
          aTag.setAttribute('style',"color: white;");

              
          aTag.innerHTML result.title;
              
          div.appendChild(aTag);
          }

          setInterval(function() {
              
          current++;
              
          createElement();
          }, 
          10000);


          function 
          createCookie(name,value) {
              
          document.cookie name "=" value;
          }

          function 
          readCookie(name) {
              var 
          nameEQ name "=";
              var 
          ca document.cookie.split(';');
              for(var 
          i=0;ca.length;i++) {
                  var 
          ca[i];
                  while (
          c.charAt(0)==' 'c.substring(1,c.length);
                  if (
          c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
              }
              return -
          1;
          }
          //پیدا کردن آبجکت مورد نظر درون ارایه
          function getObjectKeyIndex(objkeyToFind) {
              var 
          0key;

              for (
          key in obj) {
                  if (
          key == keyToFind) {
                      return 
          obj[key];
                  }
                  
          i++;
              }
              return 
          null;
          }
          </
          script>
          <
          script src="http://code.jquery.com/jquery-latest.min.js"
                  
          type="text/javascript"></script

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 73981

            #6
            You would put the inclusion script where you want it to appear in the footer template. Not in the file. The source code provided does not help me solve you issue except to say that Javascript files do not include the <script> tags.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            Related Topics

            Collapse

            Working...