رفتن به مطلب

مشکل پس از انتقال هاست


ارسال‌های توصیه شده

با سلام :DD:

امروز طی مشکلاتی مجبور شدیم به یک هاستینگ جدید منتقل کنیم، پس از انتقال با ارورهایی مواجه شدیم.

در پنل مدیریت با ارور :

Capture.thumb.JPG.d815b2e516c9057723e678c9eea51c21.JPG

در بخش پشتیبانی :

UnexpectedValueException: DirectoryIterator::__construct(/home/persia30/public_html/g2d/forum/datastore): failed to open dir: No such file or directory (0)
#0 /home/game2download/public_html/forum/system/Data/Store/FileSystem.php(211): DirectoryIterator->__construct('/home/persia30/...')
#1 /home/game2download/public_html/forum/applications/core/modules/admin/support/support.php(180): IPS\Data\Store\_FileSystem->clearAll()
#2 /home/game2download/public_html/forum/applications/core/modules/admin/support/support.php(147): IPS\core\modules\admin\support\_support->_clearCaches()
#3 [internal function]: IPS\core\modules\admin\support\_support->_selfService(Array)
#4 /home/game2download/public_html/forum/system/Helpers/Wizard/Wizard.php(182): call_user_func(Array, Array)
#5 /home/game2download/public_html/forum/system/Theme/Theme.php(780) : eval()'d code(1533): IPS\Helpers\_Wizard->__toString()
#6 /home/game2download/public_html/forum/system/Theme/SandboxedTemplate.php(57): IPS\Theme\class_core_admin_support->support(Object(IPS\Helpers\Wizard), 11)
#7 /home/game2download/public_html/forum/applications/core/modules/admin/support/support.php(46): IPS\Theme\_SandboxedTemplate->__call('support', Array)
#8 /home/game2download/public_html/forum/applications/core/modules/admin/support/support.php(46): IPS\Theme\SandboxedTemplate->support(Object(IPS\Helpers\Wizard), 11)
#9 /home/game2download/public_html/forum/system/Dispatcher/Controller.php(97): IPS\core\modules\admin\support\_support->manage()
#10 /home/game2download/public_html/forum/applications/core/modules/admin/support/support.php(34): IPS\Dispatcher\_Controller->execute()
#11 /home/game2download/public_html/forum/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\admin\support\_support->execute()
#12 /home/game2download/public_html/forum/admin/index.php(14): IPS\_Dispatcher->run()
#13 {main}

همچنین در مسیر public_html/forum/uploads/templates/javascript_global فایل های js زیادی در هر ثانیه در حال ساخت است، محتویات این فایل ها به این گونه است :

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.sharelink',{initialize:function(){this.on('click','[data-role="shareLink"]',this.launchWindow);},launchWindow:function(e){e.preventDefault();var url=$(e.currentTarget).attr('href');if(!IPS.utils.url.getParam('url',url))
{url+="&url="+encodeURIComponent(location.href);}
if(!IPS.utils.url.getParam('title',url))
{url+="&title="+encodeURIComponent(document.title);}
window.open(url,'delicious','toolbar=no,width=550,height=550');},});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.statuses',{initialize:function(){this._hideReplyFields();this.on('click','[data-action="delete"]',this.deleteStatus);this.on('click','[data-action="lock"]',this.lockStatus);this.on('click','[data-action="unlock"]',this.unlockStatus);this.on('click','[data-action="reply"]',this.replyStatus);this.on('click','[data-action="loadPreviousComments"]',this.loadPrevious);this.on('blur','[data-role="replyComment"] input[type="text"]',this.blurCommentField);this.on('keydown','[data-role="replyComment"] input[type="text"]',this.keydownCommentField);this.on(document,'lockingStatus',this.togglingStatus);this.on(document,'lockedStatus',this.lockedStatus);this.on(document,'unlockingStatus',this.togglingStatus);this.on(document,'unlockedStatus',this.unlockedStatus);this.on(document,'deletingStatus deletingComment',this.deletingStatus);this.on(document,'deletedStatus deletedComment',this.deletedStatus);this.on(document,'loadingComments',this.loadingComments);this.on(document,'loadedComments',this.loadedComments);this.on(document,'addingComment',this.addingComment);this.on(document,'addedComment',this.addedComment);},_requestCount:{},_offsets:{},_hideReplyFields:function(){$(this.scope).find('[data-statusid]').not('.ipsComment_hasChildren').find('.ipsComment_subComments').hide().end().end().find('[data-role="submitReply"]').hide();},loadPrevious:function(e){e.preventDefault();var link=$(e.currentTarget),statusElem=link.parents('[data-statusid]'),statusID=$(statusElem).data('statusid');this._offsets[statusID]=(statusElem.find('[data-commentid]').length)*-1;this.trigger('loadComments',{statusID:statusID,offset:this._offsets[statusID]});},loadingComments:function(e,data){var status=$(this.scope).find('[data-statusid="'+data.statusID+'"]');status.find('[data-action="loadPreviousComments"]').html(IPS.templates.render('core.statuses.loadingComments'));},loadedComments:function(e,data){var status=$(this.scope).find('[data-statusid="'+data.statusID+'"]'),loadingRow=status.find('[data-action="loadPreviousComments"]');loadingRow.after(data.comments);var totalShown=status.find('[data-commentid]').length;if(data.total<=totalShown){loadingRow.remove();}else{loadingRow.html(IPS.templates.render('core.statuses.loadMore')).find("[data-role='remainingCount']").text(data.total-totalShown);}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
$(document).trigger('contentChange',[status]);},deleteStatus:function(e){e.preventDefault();var link=$(e.currentTarget),statusElem=link.parents('[data-statusid]'),commentElem=link.parents('[data-commentid]'),statusID=$(statusElem).data('statusid'),commentID=$(commentElem).data('commentid');if(commentElem){if(confirm(IPS.getString('confirmStatusCommentDelete'))){this.trigger('deleteComment',{statusID:statusID,commentID:commentID});}}else{if(confirm(IPS.getString('confirmStatusDelete'))){this.trigger('deleteStatus',{statusID:statusID});}}},deletingStatus:function(e,data){if(data.commentID){$(this.scope).find('[data-commentid="'+data.commentID+'"]').animate({opacity:0.5});}else{$(this.scope).find('[data-statusid="'+data.statusID+'"]').animate({opacity:0.5});}},deletedStatus:function(e,data){if(data.commentID){$(this.scope).find('[data-commentid="'+data.commentID+'"]').remove();}else{$(this.scope).find('[data-statusid="'+data.statusID+'"]').remove();}},lockStatus:function(e){e.preventDefault();var link=$(e.currentTarget),statusElem=link.parents('[data-statusid]'),statusID=$(statusElem).data('statusid');this.trigger('lockStatus',{statusID:statusID});},unlockStatus:function(e){e.preventDefault();var link=$(e.currentTarget),statusElem=link.parents('[data-statusid]'),statusID=$(statusElem).data('statusid');this.trigger('unlockStatus',{statusID:statusID});},lockedStatus:function(e,data){var status=$(this.scope).find('[data-statusid="'+data.statusID+'"]');$(status).find('[data-action="lock"]').first().replaceWith(IPS.templates.render('core.statuses.unlock'));this._finishedAction(e,data);},unlockedStatus:function(e,data){var status=$(this.scope).find('[data-statusid="'+data.statusID+'"]');$(status).find('[data-action="unlock"]').first().replaceWith(IPS.templates.render('core.statuses.lock'));this._finishedAction(e,data);},togglingStatus:function(e,data){var status=$(this.scope).find('[data-statusid="'+data.statusID+'"]'),loadingThingy=status.find('.cStatusTools_loading');if(!loadingThingy.length){status.find('.cStatusTools').first().append(IPS.templates.render('core.statuses.statusAction'));}else{loadingThingy.show();}
if(!this._requestCount[data.statusID]){this._requestCount[data.statusID]=1;}else{this._requestCount[data.statusID]++;}},_finishedAction:function(e,data){var status=$(this.scope).find('[data-statusid="'+data.statusID+'"]'),loadingThingy=status.find('.cStatusTools_loading');this._requestCount[data.statusID]--;if(this._requestCount[data.statusID]==0){loadingThingy.remove();}},replyStatus:function(e){e.preventDefault();var link=$(e.currentTarget),statusElem=link.parents('[data-statusid]');if(statusElem.find('[data-commentid]').length>0){statusElem.find('[data-role="replyComment"] input[type="text"]').focus();return;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
Debug.log(statusElem.find('.ipsComment_subComments').is(':visible'));if(!statusElem.find('.ipsComment_subComments').is(':visible')){IPS.utils.anim.go('fadeIn',statusElem.find('.ipsComment_subComments'));statusElem.addClass('ipsComment_hasChildren').find('[data-role="replyComment"] input[type="text"]').focus();}else{if(statusElem.find('[data-commentid]').length==0&&field.val()==''){statusElem.removeClass('ipsComment_hasChildren').find('.ipsComment_subComments, [data-role="submitReply"]').hide();}}},blurCommentField:function(e){e.preventDefault();var field=$(e.currentTarget),statusElem=field.parents('[data-statusid]'),replyButton=statusElem.find('[data-role="submitReply"]');if(statusElem.find('[data-commentid]').length==0&&field.val()==''){statusElem.removeClass('ipsComment_hasChildren').find('.ipsComment_subComments').hide();}},keydownCommentField:function(e){var field=$(e.currentTarget),statusElem=field.parents('[data-statusid]'),statusID=statusID=$(statusElem).data('statusid');if(e.keyCode==IPS.ui.key.ENTER){this.trigger('addComment',{content:field.val(),statusID:statusID});}},addingComment:function(e,data){var statusElem=$(this.scope).find('[data-statusid="'+data.statusID+'"]'),replyRow=statusElem.find('[data-role="replyComment"]');replyRow.find('input[type="text"]').prop('disabled',true).addClass('ipsField_disabled');},addedComment:function(e,data){var statusElem=$(this.scope).find('[data-statusid="'+data.statusID+'"]'),replyRow=statusElem.find('[data-role="replyComment"]'),subComments=statusElem.find('.ipsComment_subComments');if(replyRow.length){replyRow.before(data.comment);}else if(subComments.length){subComments.append(data.comment);}
statusElem.find('[data-role="replyComment"] input[type="text"]').val('').blur().prop('disabled',false).removeClass('ipsField_disabled');},});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.quickSearch',{_initialSize:0,_expanded:false,_blurTimeout:null,_focused:false,initialize:function(){this.on('focus','#elSearchField',this.focusSearch);this.on('blur','#elSearchField',this.blurSearch);this.on('menuItemSelected','#elSearchFilter',this.menuItemSelected);this.on(document,'menuOpened',this.menuOpened);this.setup();},setup:function(){this._expanded=false;},menuItemSelected:function(e,data){if(!data.selectedItemID){return;}
data.originalEvent.preventDefault();for(var i in data.selectedItems)
{var selectedItem=$('#'+i);}
var form=this.scope.find('form');var title=selectedItem.find('a').html();this.scope.find('[data-role="searchingIn"]').text(title);this.scope.find('[data-role="searchFilter"]').remove();if(data.selectedItemID!='all'){var options=selectedItem.attr('data-options');if(!options){form.append($('<input/>').attr('type','hidden').attr('name','type').attr('value',data.selectedItemID).attr('data-role','searchFilter'));return;}
try{options=$.parseJSON(options);_.each(options,function(val,i){form.append($('<input/>').attr('type','hidden').attr('name',i).attr('value',val).attr('data-role','searchFilter'));});}catch(err){Debug.log('Invalid search options json');return;}}},focusSearch:function(e){var self=this;var url=IPS.getSetting('baseURL')+'index.php?app=core&module=search&controller=search&do=globalFilterOptions&checked='+this.scope.attr('data-default');if(this._expanded){return;}
$('#elSearch').addClass('cSearchExpanded');IPS.utils.anim.go('fadeIn',$('#elSearchFilter'));if(this.scope.find('[data-role="globalSearchMenuOptions"]').length){IPS.getAjax()(url).done(function(response){self.scope.find('[data-role="globalSearchMenuOptions"]').replaceWith(response);});}
this._expanded=true;},blurSearch:function(){var self=this;this._blurTimeout=setTimeout(function(){self._cancelSearch();},500);},_cancelSearch:function(){if(IPS.utils.responsive.currentIs('phone')){IPS.utils.anim.go('fadeIn fast',$('#elHeaderNavigation'));}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
$('#elSearch').removeClass('cSearchExpanded');IPS.utils.anim.go('fadeOut fast',$('#elSearchFilter'));this._expanded=false;},menuOpened:function(e,data){Debug.log(data.elemID);if(data.elemID=='elSearchFilter'){clearTimeout(this._blurTimeout);}}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.rating',{initialize:function(){this.on('ratingSaved','[data-ipsRating]',this.ratingClick);var scope=this.scope;},ratingClick:function(e,data){var scope=$(this.scope);IPS.getAjax()(scope.attr('action'),{data:scope.serialize(),type:'post'}).done(function(response,textStatus,jqXHR){}).fail(function(){scope.submit();});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.reputation',{initialize:function(){this.on('click','[data-action="giveReputation"]',this.giveReputation);},giveReputation:function(e){e.preventDefault();var self=this;var url=$(e.currentTarget).attr('href');var thisParent=this.scope.parent();this.scope.css({opacity:0.5});IPS.getAjax()(url).done(function(response){var newHTML=$('<div>'+response+'</div>').find('[data-controller="core.front.core.reputation"]').html();self.scope.html(newHTML).css({opacity:1});}).fail(function(jqXHR,textStatus,errorThrown){if(jqXHR.responseJSON['error']){IPS.ui.alert.show({type:'alert',icon:'warn',message:jqXHR.responseJSON['error'],callbacks:{}});}else{window.location=url;}});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.pagination',{initialize:function(){this.on('paginationClicked paginationJump',this.paginationClick);},paginationClick:function(e,data){var self=this;if(!data.href){return;}
IPS.getAjax()(data.href).done(function(response){self.scope.hide().html(response);IPS.utils.anim.go('fadeIn',self.scope);if(IPS.getSetting('links_external')){this.scope.find('a[rel*="external"]').each(function(index,elem){elem.target="_blank";})}}).fail(function(){window.location=data.href;});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.mobileNav',{initialize:function(){this.on('click','[data-action="mobileSearch"]',this.mobileSearch);this.on(document,'notificationCountUpdate',this.updateCount);},updateCount:function(e,data){if(!_.isUndefined(data.total)){if(data.total<=0){this.scope.find('[data-notificationType="total"]').hide();}else{this.scope.find('[data-notificationType="total"]').text(parseInt(data.total));}}},mobileSearch:function(e){e.preventDefault();$('body').toggleClass('cSearchOpen');var url=IPS.getSetting('baseURL')+'index.php?app=core&module=search&controller=search&do=globalFilterOptions&checked='+this.scope.attr('data-default');if($('body').find('[data-role="globalSearchMenuOptions"]').length){IPS.getAjax()(url).done(function(response){$('body').find('[data-role="globalSearchMenuOptions"]').replaceWith(response);});}}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.navBar',{_defaultItem:null,_usingSubBars:true,initialize:function(){var debounce=_.debounce(this.resizeWindow,300);this.on(window,'resize',debounce);this.on('mouseleave',this.mouseOutScope);this.on('mouseenter',this.mouseEnterScope);if(!$('body').attr('data-controller')||$('body').attr('data-controller').indexOf('core.global.customization.visualLang')==-1){this.setup();}else{var self=this;$('body').on('vleDone',function(){self.setup();});}},setup:function(){this.scope.identify();if(this.scope.find('[data-role="secondaryNavBar"]').length<2){this._usingSubBars=false;}
if(this._usingSubBars&&this.scope.find('.ipsNavBar_secondary > li.ipsNavBar_active').length>1){$.each(this.scope.find('.ipsNavBar_secondary > li.ipsNavBar_active'),function(i,elem){if($(elem).find('a[data-ipsmenu]').length){$(elem).removeClass('ipsNavBar_active');}});}
if(!this._usingSubBars){this.scope.find('#elNavigationMore_dropdown').append(" <i class='fa fa-caret-down'></i>").after(this.scope.find('#elNavigationMore_more_dropdown_menu').attr('id','elNavigationMore_dropdown_menu'));}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
if(this._usingSubBars){if(IPS.utils.events.isTouchDevice()){this.on('click','[data-role="primaryNavBar"] > li > a',this.intentOver);}else{this.scope.hoverIntent(_.bind(this.intentOver,this),$.noop,'[data-role="primaryNavBar"] > li');}}
this._defaultItem=this.scope.find('[data-role="primaryNavBar"] > li > [data-navDefault]').attr('data-navitem-id');this._mushAllMenus();},mouseOutScope:function(){var self=this;if(IPS.utils.events.isTouchDevice()){return;}
this._mouseOutTimer=setTimeout(function(){self._makeDefaultActive();self.scope.find('[data-ipsMenu]').trigger('closeMenu');},500);},mouseEnterScope:function(){clearTimeout(this._mouseOutTimer);},intentOver:function(e){var li=$(e.currentTarget);var link=li.find('> a');var allItems=this.scope.find('[data-role="primaryNavBar"] > li');if(li.is('a')){li=li.closest('li');link=li.find('> a');}
if(IPS.utils.events.isTouchDevice()&&li.hasClass('ipsNavBar_active')){window.location=link.attr('href');return;}
if(IPS.utils.events.isTouchDevice()){e.preventDefault();}
this.scope.find('[data-ipsMenu]').trigger('closeMenu');allItems.removeClass('ipsNavBar_active').find('> a').removeAttr('data-active');li.addClass('ipsNavBar_active');link.attr('data-active',true);},resizeWindow:function(){this._mushAllMenus();},_makeDefaultActive:function(){var link=this.scope.find('[data-navitem-id="'+this._defaultItem+'"]');var list=link.closest('li');var allItems=this.scope.find('[data-role="primaryNavBar"] > li');allItems.removeClass('ipsNavBar_active').find('> a').removeAttr('data-active');list.addClass('ipsNavBar_active').find('> a').attr('data-active',true);if(link.closest('[data-role="secondaryNavBar"]').length){link.closest('[data-role="secondaryNavBar"]').closest('li').addClass('ipsNavBar_active').find('> a').attr('data-active',true);}},_mushMenu:function(bar,widthAdjustment){var self=this;var padding=parseInt(this.scope.css('padding-left'))+parseInt(this.scope.css('padding-right'));var availableSpace=this.scope.width()-widthAdjustment-padding;var moreItem=bar.find('> [data-role="navMore"]');var moreMenuSize=moreItem.outerWidth();var menuItems=bar.find('> li[data-role="navBarItem"]');var sizeIncrement=0;var dropdown=bar.find('[data-role="moreDropdown"]');if(!moreItem.is(':visible')){moreMenuSize=moreItem.removeClass('ipsHide').outerWidth();moreItem.addClass('ipsHide');}
menuItems.each(function(){var item=$(this);var itemSize=0;if(item.attr('data-originalWidth')){itemSize=parseInt(item.attr('data-originalWidth'));}else{var o=item.outerWidth()+parseInt(item.css('margin-right'))+parseInt(item.css('margin-left'));item.attr('data-originalWidth',o);itemSize=o;}
if((sizeIncrement+itemSize+moreMenuSize)>availableSpace){if(!item.attr('data-mushed')){var newLI=$('<li/>').attr('data-originalItem',item.identify().attr('id')).append(item.contents());if(self._usingSubBars){if(bar.is('[data-role="primaryNavBar"]')){bar.find('> [data-role="navMore"] > [data-role="secondaryNavBar"]').prepend(newLI);if(newLI.find('> [data-role="secondaryNavBar"] > li').length){var newA=newLI.find('> a');var newDropdown=$('<ul/>').addClass('ipsMenu ipsMenu_auto ipsHide').attr('id',newA.identify().attr('id')+'_menu').attr('data-mushedDropdown',item.identify().attr('id'));newLI.find('> [data-role="secondaryNavBar"] > li').each(function(){if($(this).is('[data-role="navMore"]')){return;}
var newMenuItem=$('<li/>').addClass('ipsMenu_item');if($(this).find('.ipsMenu').length){newMenuItem.addClass('ipsMenu_subItems');}
newDropdown.append(newMenuItem.append($(this).contents()).attr('data-originalItem',$(this).identify().attr('id')));});newA.attr('data-ipsMenu','').attr('data-ipsMenu-appendTo','#'+self.scope.identify().attr('id')).append("<i class='fa fa-caret-down' data-role='mushedCaret'></i>");newLI.append(newDropdown);}}else{newLI.addClass('ipsMenu_item');if(newLI.find('.ipsMenu').length){newLI.addClass('ipsMenu_subItems');}
dropdown.append(newLI);}}else{self.scope.find('#elNavigationMore_dropdown_menu').append(newLI.addClass('ipsMenu_item'));if(newLI.find('.ipsMenu').length){newLI.addClass('ipsMenu_subItems');}}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
var linkInList=newLI.children('a');if(linkInList.is('[data-ipsMenu]')){linkInList.attr('data-ipsMenu-appendTo','#'+newLI.identify().attr('id'));}
item.addClass('ipsHide').attr('data-mushed',true);}}else if(item.attr('data-mushed')){var mushedParent=null;var mushedItem=null;if(!self._usingSubBars){mushedParent=self.scope.find('#elNavigationMore_dropdown_menu');}else if(bar.is('[data-role="primaryNavBar"]')){mushedParent=bar.find('> [data-role="navMore"] > [data-role="secondaryNavBar"]');}else{mushedParent=dropdown;}
var mushedItem=mushedParent.find('[data-originalItem="'+item.identify().attr('id')+'"]');if(mushedItem.children('a').is('[data-ipsMenu]')){mushedItem.children('a').attr('data-ipsMenu-appendTo','#'+item.identify().attr('id'));}
if(mushedItem.length){item.append(mushedItem.contents()).removeClass('ipsHide');}
if(self._usingSubBars&&bar.is('[data-role="primaryNavBar"]')){var mushedDropdown=self.scope.find('[data-mushedDropdown="'+item.attr('id')+'"]');var secondaryMenu=item.find('> [data-role="secondaryNavBar"]');if(mushedDropdown.length){mushedDropdown.find('> .ipsMenu_item').each(function(){var originalItem=self.scope.find('#'+$(this).attr('data-originalItem'));originalItem.append($(this).contents());});mushedDropdown.remove();}
item.find('[data-role="mushedCaret"]').remove();}
mushedItem.remove();item.removeAttr('data-mushed');}
sizeIncrement+=itemSize;});if(bar.is('[data-role="primaryNavBar"]')){if(this._usingSubBars){moreItem.toggleClass('ipsHide',bar.find('> [data-role="navMore"] > [data-role="secondaryNavBar"] > li').length<=1);}else{moreItem.toggleClass('ipsHide',!this.scope.find('#elNavigationMore_dropdown_menu > li').length);}}else{moreItem.toggleClass('ipsHide',dropdown.find('> li').length<1);}
this._makeDefaultActive();},_mushAllMenus:function(){this._mushMenu(this.scope.find('[data-role="primaryNavBar"]'),this.scope.find('#elSearch').outerWidth());this._mushMenu(this.scope.find('[data-role="secondaryNavBar"]:visible'),0);}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.lightboxedImages',{_random:null,initialize:function(){this.on('initializeImages',this.initializeImages);this.setup();},setup:function(){this._random='g'+(Math.round(Math.random()*100000));this._initializeImages();},initializeImages:function(){this._initializeImages();},_initializeImages:function(){var self=this;this.scope.find('img').imagesLoaded(function(images){images.each(function(i,image){if(!_.isUndefined($(image).attr('data-emoticon'))||image.width>=image.naturalWidth&&!$(image).hasClass('ipsImage_thumbnailed')){return;}
image=$(image);image.addClass('ipsImage_thumbnailed');if(image.closest('a').length&&image.closest('a').hasClass('ipsAttachLink')&&image.closest('a').hasClass('ipsAttachLink_image')){if(['gif','jpeg','jpe','jpg','png'].indexOf(image.closest('a').attr('href').substr(image.closest('a').attr('href').lastIndexOf('.')+1).toLowerCase())!=-1){if(!IPS.utils.responsive.enabled()||!IPS.utils.responsive.currentIs('phone')){image.closest('a').attr('data-fullURL',image.closest('a').attr('src')).attr('data-ipsLightbox','').attr('data-ipsLightbox-group',self._random);}}}else{if(!image.closest('a').length){if(IPS.utils.responsive.enabled()&&IPS.utils.responsive.currentIs('phone')){image.wrap($("<a href='"+image.attr('src')+"' title='"+IPS.getString('enlargeImage')+"'></a>"));}else{image.wrap($("<a href='"+image.attr('src')+"' title='"+IPS.getString('enlargeImage')+"' data-ipsLightbox data-ipsLightbox-group='"+self._random+"'></a>"));}}}});});}});}(jQuery,_));;

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.markRead',{initialize:function(){this.on('click',this.markSiteRead);},markSiteRead:function(e){e.preventDefault();IPS.ui.alert.show({type:'confirm',icon:'question',message:IPS.getString('markAsReadConfirm'),subText:'',callbacks:{ok:function(){var url=IPS.getSetting('baseURL')+'index.php?app=core&module=system&controller=markread';IPS.getAjax()(url,{showLoading:true}).done(function(){$(document).trigger('markAllRead');}).fail(function(jqXHR,textStatus,errorThrown){window.location=ipsSettings.baseURL+url;});}}});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.messengerMenu',{initialize:function(){this.setup();this.on('click','#elMessengerPopup_compose',this.clickCompose);},setup:function(){if(IPS.utils.responsive.currentIs('phone')){this.scope.find('#elMessengerPopup_compose').removeAttr('data-ipsDialog');}},clickCompose:function(e){if(IPS.utils.responsive.currentIs('phone')){e.preventDefault();window.location=$(e.currentTarget).attr('href');}else{$('body').find('#elMobileDrawer .ipsDrawer_close').click();}}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.app',{initialize:function(){this.on('click','a[data-confirm],button[data-confirm]',this.confirmSomething);this.on(document,'contentChange',this._checkAndClearAutosave);this.setup();},setup:function(){this.scope.addClass('ipsJS_has').removeClass('ipsJS_none');if(!IPS.utils.events.isTouchDevice()){this.scope.addClass('ipsApp_noTouch');}
if(typeof jstz!=='undefined'){IPS.utils.cookie.set('ipsTimezone',jstz.determine().name());}
this._checkAndClearAutosave();if($('#elInlineMessage').length){var dialogRef=IPS.ui.dialog.create({showFrom:'#inbox',content:'#elInlineMessage',title:$('#elInlineMessage').attr('title')});setTimeout(function(){dialogRef.show();},800);}
if(IPS.getSetting('links_external')){this.scope.find('a[rel*="external"]').each(function(index,elem){elem.target="_blank";elem.rel=elem.rel+" noopener noreferrer";})}
prettyPrint();if(IPS.getSetting('memberID')&&IPS.utils.notification.supported&&IPS.utils.notification.needsPermission()){IPS.utils.notification.requestPermission();}
if(_.isUndefined(IPS.utils.cookie.get('hasJS'))){var expires=new Date();expires.setDate(expires.getDate()+1);IPS.utils.cookie.set('hasJS',true,expires.toUTCString());}},_checkAndClearAutosave:function(){if(IPS.utils.cookie.get('clearAutosave')){var autoSaveKeysToClear=IPS.utils.cookie.get('clearAutosave').split(',');for(var i=0;i<autoSaveKeysToClear.length;i++){IPS.utils.db.remove('editorSave',autoSaveKeysToClear[i]);}
IPS.utils.cookie.unset('clearAutosave');}},confirmSomething:function(e){e.preventDefault();var elem=$(e.currentTarget);var customMessage=$(e.currentTarget).attr('data-confirmMessage');var subMessage=$(e.currentTarget).attr('data-confirmSubMessage');IPS.ui.alert.show({type:'confirm',icon:'warn',message:(customMessage)?customMessage:IPS.getString('generic_confirm'),subText:(subMessage)?subMessage:'',callbacks:{ok:function(){window.location=elem.attr('href')+'&wasConfirmed=1';}}});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.autoSizeIframe',{_origin:IPS.utils.url.getOrigin(),_embedId:'',_iframe:null,initialize:function(){if(!this.scope.is('iframe')){return;}
this.on(window,'message',this.receiveMessage);this.setup();},setup:function(){var iframe=this.scope.get(0);iframe.style.overflow='hidden';iframe.scrolling="no";iframe.seamless="seamless";if(this.scope.height()>800){this.scope.css({height:'800px'});}
this._iframe=iframe.contentWindow;if(this.scope.is('[data-embedId]')){this._embedId=this.scope.attr('data-embedId');}else{this._embedId='embed'+Math.random()*(10000000000-1)+1;this.scope.attr('data-embedId',this._embedId);}
if(!window.postMessage||!window.JSON.parse){this.scope.css({height:'400px'});Debug.error("Can't resize embed: "+this._embedId);return;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
this._startReadyTimeout();},_startReadyTimeout:function(){this._readyTimeout=setInterval(_.bind(function(){this._postMessage('ready');},this),100);},_stopReadyTimeout:function(){clearInterval(this._readyTimeout);},destruct:function(){Debug.log('Destruct autoSizeIframe');this._stopReadyTimeout();this._postMessage('stop');},receiveMessage:function(e){if(e.originalEvent.origin!==this._origin){return;}
try{var pmData=JSON.parse(e.originalEvent.data);var method=pmData.method;}catch(err){Debug.log("Invalid data");return;}
if(_.isUndefined(pmData.embedId)||pmData.embedId!==this._embedId){return;}
this._stopReadyTimeout();if(method&&!_.isUndefined(this[method])){this[method].call(this,pmData);}},_postMessage:function(method,obj){Debug.log("Posting to iframe");this._iframe.postMessage(JSON.stringify(_.extend(obj||{},{method:method,embedId:this._embedId})),this._origin);},height:function(data){this.scope.css({height:parseInt(data.height)+10+'px'});},ok:function(){this._stopReadyTimeout();}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.comment',{_quoteData:null,_commentContents:'',_quotingDisabled:false,_quoteInterval:null,_isEditing:false,_clickHandler:null,initialize:function(){this.on('click','[data-action="editComment"]',this.editComment);this.on('click','[data-action="cancelEditComment"]',this.cancelEditComment);this.on('click','[data-action="deleteComment"]',this.deleteComment);this.on('click','[data-action="approveComment"]',this.approveComment);this.on('click','[data-action="quoteComment"]',this.quoteComment);this.on('click','[data-action="multiQuoteComment"]',this.multiQuoteComment);this.on('click','[data-action="rateReview"]',this.rateReview);this.on('submit','form',this.submitEdit);this.on('change','input[type="checkbox"][data-role="moderation"]',this.commentCheckbox);this.on('mouseup touchend','[data-role="commentContent"]',this.inlineQuote);this.on('click','[data-action="quoteSelection"]',this.quoteSelection);this.on('menuOpened','[data-role="shareComment"]',this.shareCommentMenu);this.on('setMultiQuoteEnabled.comment setMultiQuoteDisabled.comment',this.setMultiQuote);this.on('disableQuoting.comment',this.disableQuoting);this.on(document,'getEditFormLoading.comment saveEditCommentLoading.comment '+'deleteCommentLoading.comment',this.commentLoading);this.on(document,'getEditFormDone.comment saveEditCommentDone.comment '+'deleteCommentDone.comment',this.commentDone);this.on(document,'getEditFormDone.comment',this.getEditFormDone);this.on(document,'getEditFormError.comment',this.getEditFormError);this.on(document,'saveEditCommentDone.comment',this.saveEditCommentDone);this.on(document,'saveEditCommentError.comment',this.saveEditCommentError);this.on(document,'deleteCommentDone.comment',this.deleteCommentDone);this.on(document,'deleteCommentError.comment',this.deleteCommentError);this.on(document,'approveCommentLoading.comment',this.approveCommentLoading);this.on(document,'approveCommentDone.comment',this.approveCommentDone);this.on(document,'approveCommentError.comment',this.approveCommentError);this.setup();},setup:function(){this._commentID=this.scope.attr('data-commentID');this._clickHandler=_.bind(this._hideQuoteTooltip,this);},destroy:function(){},inlineQuote:function(e){var self=this;var quoteButton=this.scope.find('[data-action="quoteComment"]');if(this._isEditing||this._quotingDisabled||!quoteButton.length){return;}
clearInterval(this._quoteInterval);this._quoteInterval=setInterval(function(){self._checkQuoteStatus(e);},400);},_checkQuoteStatus:function(e){var selectedText=this._getSelectedText();var tooltip=this.scope.find('[data-role="inlineQuoteTooltip"]');var self=this;if($.trim(selectedText)==''){this._hideQuoteTooltip();return;}
if(!selectedText.startsWith('<')){selectedText='<p>'+selectedText+'</p>';}
this._selectedText=selectedText;this._showQuoteTooltip(e);},_getSelectedText:function(){var text='';var container=this.scope.find('[data-role="commentContent"]').get(0);var isChild=function(child,parent){if(child===parent){return true;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
var current=child;while(current){if(current===parent){return true;}
current=current.parentNode;}
return false;};if(window.getSelection||document.getSelection){var selection=(window.getSelection)?window.getSelection():document.getSelection();if(selection.rangeCount>0){var range=selection.getRangeAt(0);var clonedSelection=range.cloneContents().querySelector('[data-role="commentContent"]');if(clonedSelection){text=clonedSelection.innerHTML;}else{clonedSelection=range.cloneContents();var startNode=selection.getRangeAt(0).startContainer.parentNode;if(isChild(startNode,container)){var div=document.createElement('div');div.appendChild(clonedSelection);text=div.innerHTML;}}
return text;}}else if(document.selection){return document.selection.createRange().htmlText;}
return'';},_showQuoteTooltip:function(e){var tooltip=this.scope.find('[data-role="inlineQuoteTooltip"]');var clientX=e.clientX;var clientY=e.clientY;if(!_.isUndefined(e.originalEvent.changedTouches)&&!_.isUndefined(e.originalEvent.changedTouches[0])){clientX=e.originalEvent.changedTouches[0].clientX;clientY=e.originalEvent.changedTouches[0].clientY;}
if(!tooltip.length){this.scope.append(IPS.templates.render('core.selection.quote',{direction:IPS.utils.events.isTouchDevice()?'bottom':'top'}));tooltip=this.scope.find('[data-role="inlineQuoteTooltip"]');$(document).on('click',this._clickHandler);}
var scopeOffset=this.scope.offset();var lineHeight=IPS.utils.position.lineHeight(this.scope.find('[data-role="commentContent"]'));var documentScroll={top:$(document).scrollTop(),left:$(document).scrollLeft()};var tooltipSize={width:tooltip.show().width(),height:tooltip.show().height()};var tooltipPos={left:(clientX+documentScroll.left)-scopeOffset.left-(tooltipSize.width / 2)};if(IPS.utils.events.isTouchDevice()){tooltipPos=_.extend(tooltipPos,{top:(clientY+documentScroll.top)-scopeOffset.top+tooltipSize.height+lineHeight});}else{tooltipPos=_.extend(tooltipPos,{top:(clientY+documentScroll.top)-scopeOffset.top-tooltipSize.height-lineHeight});}
tooltip.css({position:'absolute',left:tooltipPos.left+"px",top:tooltipPos.top+"px",});if(!tooltip.is(':visible')){tooltip.hide().fadeIn('fast');}else{tooltip.show();}},_hideQuoteTooltip:function(){$(document).off('click',this._clickHandler);this.scope.find('[data-role="inlineQuoteTooltip"]').fadeOut('fast');clearTimeout(this._quoteInterval);},quoteSelection:function(e){e.preventDefault();this._getQuoteData();if(this._selectedText){this.trigger('quoteComment.comment',{userid:this._quoteData.userid,username:this._quoteData.username,timestamp:this._quoteData.timestamp,contentapp:this._quoteData.contentapp,contenttype:this._quoteData.contenttype,contentclass:this._quoteData.contentclass,contentid:this._quoteData.contentid,contentcommentid:this._quoteData.contentcommentid,quoteHtml:this._selectedText});}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
this._hideQuoteTooltip();},commentCheckbox:function(e){var checked=$(e.currentTarget).is(':checked');this.scope.closest('.ipsComment').toggleClass('ipsComment_selected',checked);this.trigger('checkedComment.comment',{commentID:this._commentID,actions:$(e.currentTarget).attr('data-actions'),checked:checked});},disableQuoting:function(){this._quotingDisabled=true;this.scope.find('[data-ipsQuote-editor]').remove();},rateReview:function(e){e.preventDefault();var self=this;IPS.getAjax()($(e.currentTarget).attr('href')).done(function(response){var content=$("<div>"+response+"</div>");self.scope.html(content.contents());$(document).trigger('contentChange',[self.scope]);}).fail(function(err){window.location=$(e.currentTarget).attr('href');});},shareCommentMenu:function(e,data){if(data.menu){data.menu.find('input[type="text"]').get(0).select();}},setMultiQuote:function(e,data){var selector='[data-commentApp="'+data.contentapp+'"]';selector+='[data-commentType="'+data.contenttype+'"]';selector+='[data-commentID="'+data.contentcommentid+'"]';if(this.scope.is(selector)){if(!_.isNull(e)&&e.type=='setMultiQuoteEnabled'){this.scope.find('[data-action="multiQuoteComment"]').removeClass('ipsButton_simple').addClass('ipsButton_alternate').attr('data-mqActive',true).html(IPS.templates.render('core.posts.multiQuoteOn'));}else if(_.isNull(e)||e.type=='setMultiQuoteDisabled'){this.scope.find('[data-action="multiQuoteComment"]').addClass('ipsButton_simple').removeClass('ipsButton_alternate').removeAttr('data-mqActive').html(IPS.templates.render('core.posts.multiQuoteOff'));}}},quoteComment:function(e){e.preventDefault();if(!this._getQuoteData()){Debug.error("Couldn't get quote data");return;}
var html=this._prepareQuote($('<div/>').html(this.scope.find('[data-role="commentContent"]').html()));this.trigger('quoteComment.comment',{userid:this._quoteData.userid,username:this._quoteData.username,timestamp:this._quoteData.timestamp,contentapp:this._quoteData.contentapp,contenttype:this._quoteData.contenttype,contentclass:this._quoteData.contentclass,contentid:this._quoteData.contentid,contentcommentid:this._quoteData.contentcommentid,quoteHtml:html.html()});},multiQuoteComment:function(e){e.preventDefault();if(!this._getQuoteData()){Debug.error("Couldn't get quote data");return;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
var button=$(e.currentTarget);var mqActive=button.attr('data-mqActive');var html=this._prepareQuote($('<div/>').html(this.scope.find('[data-role="commentContent"]').html()));this.trigger((mqActive)?'removeMultiQuote.comment':'addMultiQuote.comment',{userid:this._quoteData.userid,username:this._quoteData.username,timestamp:this._quoteData.timestamp,contentapp:this._quoteData.contentapp,contenttype:this._quoteData.contenttype,contentclass:this._quoteData.contentclass,contentid:this._quoteData.contentid,contentcommentid:this._quoteData.contentcommentid,quoteHtml:html.html(),button:button.attr('data-mqId')});if(mqActive){button.removeClass('ipsButton_alternate').addClass('ipsButton_simple').removeAttr('data-mqActive').html(IPS.templates.render('core.posts.multiQuoteOff'));}else{button.removeClass('ipsButton_simple').addClass('ipsButton_alternate').attr('data-mqActive',true).html(IPS.templates.render('core.posts.multiQuoteOn'));}},editComment:function(e){e.preventDefault();this._commentContents=this.scope.find('[data-role="commentContent"]').html();var url=$(e.currentTarget).attr('href');this.trigger('getEditForm.comment',{url:url,commentID:this._commentID});},cancelEditComment:function(e){e.preventDefault();var self=this;IPS.ui.alert.show({type:'verify',icon:'warn',message:IPS.getString('cancel_edit_confirm'),subText:'',buttons:{yes:IPS.getString('yes'),no:IPS.getString('no')},callbacks:{yes:function(){IPS.ui.editor.destruct(self.scope.find('[data-ipseditor]'));self.scope.find('[data-role="commentContent"]').html(self._commentContents);self.scope.find('[data-role="commentControls"], [data-action="expandTruncate"]').show();}}});},submitEdit:function(e){e.preventDefault();e.stopPropagation();var instance;var empty=false;for(instance in CKEDITOR.instances){CKEDITOR.instances[instance].updateElement();}
if(typeof CKEDITOR.instances['comment_value']!=='undefined'){var postBody=$.trim(CKEDITOR.instances['comment_value'].editable().getData().replace(/&nbsp;/g,''));if(postBody==''||postBody.match(/^<p?<p>|<\/p>|\s)*<\/p>$/)){IPS.ui.alert.show({type:'alert',icon:'warn',message:IPS.getString('cantEmptyEdit'),subText:IPS.getString('cantEmptyEditDesc')});return;}}
var form=this.scope.find('form');var url=form.attr('action');var data=form.serialize();form.find('[data-action="cancelEditComment"]').remove();form.find('[type="submit"]').prop('disabled',true).text(IPS.getString('saving'));this.trigger('saveEditComment.comment',{form:data,url:url,commentID:this._commentID});},commentLoading:function(e,data){if(data.commentID!=this._commentID){return;}
var commentLoading=this.scope.find('[data-role="commentLoading"]');commentLoading.removeClass('ipsHide').find('.ipsLoading').removeClass('ipsLoading_noAnim');IPS.utils.anim.go('fadeIn',commentLoading);},commentDone:function(e,data){if(data.commentID!=this._commentID){return;}
this.scope.find('[data-role="commentLoading"]').addClass('ipsHide').find('.ipsLoading').addClass('ipsLoading_noAnim');},getEditFormDone:function(e,data){if(data.commentID!=this._commentID){return;}
var self=this;var showForm=_.once(function(){self._isEditing=true;self.scope.find('[data-action="expandTruncate"], [data-role="commentControls"]').hide();self.scope.find('[data-role="commentContent"]').html(data.response);$(document).trigger('contentChange',[self.scope.find('[data-role="commentContent"]')]);});var elemPosition=IPS.utils.position.getElemPosition(this.scope);var windowScroll=$(window).scrollTop();var viewHeight=$(window).height();if(elemPosition.absPos.top<windowScroll||elemPosition.absPos.top?windowScroll+viewHeight)){$('html, body').animate({scrollTop:elemPosition.absPos.top+'px'},function(){showForm();});}else{showForm();}},getEditFormError:function(e,data){if(data.commentID!=this._commentID){return;}
window.location=data.url;},saveEditCommentDone:function(e,data){if(data.commentID!=this._commentID){return;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
IPS.ui.editor.destruct(this.scope.find('[data-ipseditor]'));this._isEditing=false;this.scope.find('[data-role="commentContent"]').replaceWith($('<div>'+data.response+'</div>').find('[data-role="commentContent"]'));this.scope.trigger('initializeImages');this.scope.find('[data-action="expandTruncate"], [data-role="commentControls"]').show();if(IPS.getSetting('links_external')){this.scope.find('a[rel*="external"]').each(function(index,elem){elem.target="_blank";})}
$(document).trigger('contentChange',[this.scope]);},saveEditCommentError:function(e,data){if(data.commentID!=this._commentID){return;}
IPS.ui.alert.show({type:'alert',icon:'warn',message:IPS.getString('editCommentError'),});},approveComment:function(e){e.preventDefault();var url=$(e.currentTarget).attr('href');this.trigger('approveComment.comment',{url:url,commentID:this._commentID});},approveCommentLoading:function(e,data){if(data.commentID!=this._commentID){return;}
this.scope.find('[data-role="commentControls"]').addClass('ipsFaded').find('[data-action="approveComment"]').addClass('ipsButton_disabled').text(IPS.getString('commentApproving'));},approveCommentDone:function(e,data){if(data.commentID!=this._commentID){return;}
var commentHtml=$('<div>'+data.response+'</div>').find('[data-controller="core.front.core.comment"]').html();this.scope.html(commentHtml).removeClass('ipsModerated').closest('.ipsComment').removeClass('ipsModerated');$(document).trigger('contentChange',[this.scope]);if(IPS.utils.db.isEnabled()){this.scope.find('[data-action="multiQuoteComment"]').removeClass('ipsHide');}
IPS.ui.flashMsg.show(IPS.getString('commentApproved'));},approveCommentError:function(e,data){if(data.commentID!=this._commentID){return;}
window.location=data.url;},deleteComment:function(e){e.preventDefault();var self=this;var url=$(e.currentTarget).attr('href');var commentData=this._getQuoteData();var eventData=_.extend(commentData,{url:url,commentID:this._commentID});IPS.ui.alert.show({type:'confirm',icon:'warn',message:IPS.getString('delete_confirm'),callbacks:{ok:function(){self.trigger('deleteComment.comment',eventData);}}});},deleteCommentDone:function(e,data){if(data.commentID!=this._commentID){return;}
var deleteLink=this.scope.find('[data-action="deleteComment"]');var toHide=null;var toShow=null;if(deleteLink.attr('data-hideOnDelete')){toHide=this.scope.find(deleteLink.attr('data-hideOnDelete'));}else{toHide=this.scope.closest('article');}
toHide.animationComplete(function(){toHide.remove();});IPS.utils.anim.go('fadeOutDown',toHide);if(deleteLink.attr('data-updateOnDelete')){$(deleteLink.attr('data-updateOnDelete')).text(parseInt($(deleteLink.attr('data-updateOnDelete')).text())-1);}
if(deleteLink.attr('data-showOnDelete')){toShow=this.scope.find(deleteLink.attr('data-showOnDelete'));IPS.utils.anim.go('fadeIn',toShow);}
this.trigger('deletedComment.comment',{commentID:this._commentID,response:data.response});},deleteCommentError:function(e,data){if(data.commentID!=this._commentID){return;}
window.location=data.url;},_prepareQuote:function(html){if(html.find('blockquote.ipsQuote')&&html.find('blockquote.ipsQuote').parent()&&html.find('blockquote.ipsQuote').parent().get(0)&&html.find('blockquote.ipsQuote').parent().get(0).tagName=='DIV'&&html.find('blockquote.ipsQuote').siblings().length==0)
{var div=html.find('blockquote.ipsQuote').closest('div');div.next('p').find("br:first-child").remove();div.remove();}
else
{html.find('blockquote.ipsQuote').remove();}
html.find('.ipsStyle_spoilerFancy,.ipsStyle_spoiler').replaceWith(IPS.templates.render('core.posts.quotedSpoiler'));html.find("[data-excludequote]").remove();html.find('.ipsQuote_citation').remove();html.find('[data-quote-value]').each(function(){$(this).replaceWith('<p>'+$(this).attr('data-quote-value')+'</p>');});return html;},_getQuoteData:function(){if(!this._quoteData){try{this._quoteData=$.parseJSON(this.scope.attr('data-quoteData'));return this._quoteData;}catch(err){Debug.log("Couldn't parse quote data");return{};}}
return this._quoteData;}});}(jQuery,_));;

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.commentFeed',{_overlay:null,_commentFeedID:0,_newRepliesFlash:null,_maximumMultiQuote:50,_pageParam:'page',_urlParams:{},_baseURL:'',_doneInitialState:false,_initialURL:'',_pollingEnabled:true,_pollingActive:false,_pollingPaused:false,_initialPoll:60000,_currentPoll:60000,_decay:20000,_maxInterval:300000,_pollingTimeout:null,_pollAjax:null,_pollOnUnpaused:false,_notification:null,_lastSeenTotal:0,initialize:function(){this.on('submit','[data-role="replyArea"]',this.quickReply);this.on('quoteComment.comment',this.quoteComment);this.on('addMultiQuote.comment',this.addMultiQuote);this.on('removeMultiQuote.comment deleteComment.comment',this.removeMultiQuote);this.on('click','[data-action="filterClick"]',this.filterClick);this.on('menuItemSelected','[data-role="signatureOptions"]',this.signatureOptions);this.on('editorCompatibility',this.editorCompatibility);this.on('checkedComment.comment',this.checkedComment);this._boundMQ=_.bind(this.doMultiQuote,this);this._boundCMQ=_.bind(this.clearMultiQuote,this);$(document).on('click','[data-role="multiQuote"]',this._boundMQ);$(document).on('click','[data-action="clearQuoted"]',this._boundCMQ);$(document).on('moderationSubmitted',this.clearLocalStorage);this.on('paginationClicked paginationJump',this.paginationClick);this.on(document,'addToCommentFeed',this.addToCommentFeed);this.on('deletedComment.comment',this.deletedComment);this.on(document,'click','[data-action="loadNewPosts"]',this.loadNewPosts);this.on(window,'statechange',this.stateChange);this.on(window,'anchorchange',this.anchorChange);this.setup();},setup:function(){var self=this;var replyForm=this.scope.find('[data-role="replyArea"] form');this._commentFeedID=this.scope.attr('data-feedID');this._urlParams=this._getUrlParams();this._baseURL=this.scope.attr('data-baseURL');this._initialURL=window.location.href;if(this._baseURL.match(/\?/)){if(this._baseURL.slice(-1)!='?'){this._baseURL+='&';}}else{this._baseURL+='?';}
if(replyForm.attr('data-noAjax')){this._pollingEnabled=false;}
if(!_.isUndefined(this.scope.attr('data-lastPage'))&&this._pollingEnabled){this._startPolling();}
$(document).ready(function(){self._setUpMultiQuote();self._findCheckedComments();});},clearLocalStorage:function(){IPS.utils.db.remove('moderation',$(document).find("[data-feedID]").attr('data-feedID'));},destroy:function(){$(document).off('click','[data-role="multiQuote"]',this._boundMQ);$(document).off('click','[data-action="clearQuoted"]',this._boundCMQ);this._stopPolling();},_getUrlParams:function(){var sort=this._getSortValue();var obj={sortby:sort.by||'',sortdirection:sort.order||'',};obj[this._pageParam]=IPS.utils.url.getParam(this._pageParam)||1
return obj;},_getSortValue:function(){return{by:'',order:''};},anchorChange:function(){var hash=History.getHash();var prevState=null;if(!hash.startsWith('comment-')){return;}
var currentIndex=History.getCurrentIndex()-1;for(var i=currentIndex;i>=0;i--){var tmpState=History.getStateByIndex(i);if(tmpState.url.indexOf('#'+hash)!==-1){prevState=tmpState;break;}}
if(!prevState){return;}
this._urlParams=prevState.data;this._getResults(prevState.url);},stateChange:function(){var state=History.getState();if((_.isUndefined(state.data.controller)||state.data.controller!=this.controllerID||state.data.feedID!=this._commentFeedID)){if(_.isUndefined(state.data.controller)&&state.url==this._initialURL){Debug.log("No controller state, but state URL matched initial URL");}else{return;}}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
this._urlParams=state.data;IPS.utils.analytics.trackPageView(state.url);if(this._initialURL==state.url){this._getResults(state.url);}else{this._getResults();}},_getResults:function(url){var self=this;var fetchURL=url||this._baseURL+this._getURL();this._setLoading(true);IPS.getAjax()(fetchURL,{showLoading:true}).done(_.bind(this._getResultsDone,this)).fail(_.bind(this._getResultsFail,this)).always(_.bind(this._getResultsAlways,this));},_getResultsDone:function(response){var tmpElement=$('<div>'+response+'</div>').find('[data-feedID="'+this.scope.attr('data-feedID')+'"]');var newContents=tmpElement.html();tmpElement.remove();this.cleanContents();this.scope.hide().html(newContents);IPS.utils.anim.go('fadeIn',this.scope);this._overlay.hide();if(IPS.getSetting('links_external')){this.scope.find('a[rel*="external"]').each(function(index,elem){elem.target="_blank";})}
this._setUpMultiQuote();$(document).trigger('contentChange',[this.scope]);this._findCheckedComments();},_getResultsFail:function(jqXHR,textStatus,errorThrown){if(Debug.isEnabled()){Debug.error("Ajax request failed ("+textStatus+"): "+errorThrown);Debug.error(jqXHR.responseText);}else{window.location=this._baseURL+this._getURL();}},_getResultsAlways:function(){},_setLoading:function(status){var scope=this.scope;var self=this;var commentFeed=this.scope.find('[data-role="commentFeed"]');if(status){if(!this._overlay){this._overlay=$('<div/>').addClass('ipsLoading').hide();IPS.getContainer().append(this._overlay);}
var dims=IPS.utils.position.getElemDims(commentFeed);var position=IPS.utils.position.getElemPosition(commentFeed);this._overlay.show().css({left:position.viewportOffset.left+'px',top:position.viewportOffset.top+$(document).scrollTop()+'px',width:dims.width+'px',height:dims.height+'px',position:'absolute',zIndex:IPS.ui.zIndex()});commentFeed.animate({opacity:0.5});var elemPosition=IPS.utils.position.getElemPosition(this.scope);$('html, body').animate({scrollTop:elemPosition.absPos.top+'px'});}else{}},paginationClick:function(e,data){data.originalEvent.preventDefault();if(data.pageNo!=this._urlParams[this._pageParam]){var urlObj=IPS.utils.url.getURIObject(data.href);var queryKey=urlObj.queryKey;if(_.isUndefined(queryKey[this._pageParam])){queryKey[this._pageParam]=data.pageNo;}
if(data.lastPage&&!this._pollingActive){this.scope.attr('data-lastPage',true);this._currentPoll=this._initialPoll;this._startPolling();}else if(!data.lastPage){this.scope.removeAttr('data-lastPage');this._stopPolling();}
this._updateURL(queryKey);}},_updateURL:function(newParams){_.extend(this._urlParams,newParams);var tmpStateData=_.extend(_.clone(this._urlParams),{controller:this.controllerID,feedID:this._commentFeedID});var newUrl=this._baseURL+this._getURL();if(newUrl.slice(-1)=='?'){newUrl=newUrl.substring(0,newUrl.length-1);}
History.pushState(tmpStateData,document.title,newUrl);},_getURL:function(){var tmpUrlParams={};for(var i in this._urlParams){if(this._urlParams[i]!=''&&i!='controller'&&i!='feedID'&&i!='bypassState'&&(i!='page'||(i=='page'&&this._urlParams[i]!=1))){tmpUrlParams[i]=this._urlParams[i];}}
return $.param(tmpUrlParams);},editorCompatibility:function(e,data){if(!data.compatible){this.triggerOn('core.front.core.comment','disableQuoting.comment');}},checkedComment:function(e,data){var dataStore=IPS.utils.db.get('moderation',this._commentFeedID)||{};if(data.checked){if(_.isUndefined(dataStore[data.commentID])){dataStore[data.commentID]=data.actions;}}else{delete dataStore[data.commentID];}
if(_.size(dataStore)){IPS.utils.db.set('moderation',this._commentFeedID,dataStore);}else{IPS.utils.db.remove('moderation',this._commentFeedID);}},_findCheckedComments:function(){if(!this.scope.find('input[type="checkbox"]').length){return;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
var dataStore=IPS.utils.db.get('moderation',this._commentFeedID)||{};var self=this;var pageAction=this.scope.find('[data-ipsPageAction]');if(_.size(dataStore)){_.each(dataStore,function(val,key){if(self.scope.find('[data-commentID="'+key+'"]').length){self.scope.find('[data-commentID="'+key+'"] input[type="checkbox"][data-role="moderation"]').attr('checked',true).trigger('change');}else{pageAction.trigger('addManualItem.pageAction',{id:'multimod['+key+']',actions:val});}});}},signatureOptions:function(e,data){data.originalEvent.preventDefault();if(data.selectedItemID=='oneSignature'){this._ignoreSingleSignature($(e.currentTarget).attr('data-memberID'));}else{this._ignoreAllSignatures();}},_ignoreAllSignatures:function(){var self=this;var url=IPS.getSetting('baseURL')+'index.php?app=core&module=system&controller=settings&do=toggleSigs';var signatures=this.scope.find('[data-role="memberSignature"]');signatures.slideUp();IPS.getAjax()(url).done(function(response){IPS.ui.flashMsg.show(IPS.getString('signatures_hidden'));signatures.remove();}).fail(function(){signatures.show();IPS.ui.alert.show({type:'alert',icon:'warn',message:IPS.getString('signatures_error'),callbacks:{}});});},_ignoreSingleSignature:function(memberID){var self=this;var url=IPS.getSetting('baseURL')+'index.php?app=core&module=system&controller=ignore&do=ignoreType&type=signatures';var signatures=this.scope.find('[data-role="memberSignature"]').find('[data-memberID="'+memberID+'"]').closest('[data-role="memberSignature"]');signatures.slideUp();IPS.getAjax()(url,{data:{member_id:parseInt(memberID)}}).done(function(response){IPS.ui.flashMsg.show(IPS.getString('single_signature_hidden'));signatures.remove();}).fail(function(){signatures.show();IPS.ui.alert.show({type:'alert',icon:'warn',message:IPS.getString('single_signature_error'),callbacks:{}});});},filterClick:function(e){e.preventDefault();var urlObj=IPS.utils.url.getURIObject($(e.target).attr('href'));var queryKey=urlObj.queryKey;this._updateURL(queryKey);},quoteComment:function(e,data){var editor=IPS.ui.editor.getObj(this.scope.find('[data-role="replyArea"] [data-ipsEditor]'));if(editor){editor.insertQuotes([data]);}},windowBlur:function(e){if(this._pollingEnabled){Debug.log('Window blurred, pausing polling...');this._pollingPaused=true;}},windowFocus:function(e){if(this._pollingEnabled&&this._pollingPaused){Debug.log('Window focused...');this._pollingPaused=false;if(this._pollOnUnpaused){this._pollOnUnpaused=false;this.pollForNewReplies();}}},_startPolling:function(){var self=this;this._pollingActive=true;Debug.log('Starting polling with interval '+(this._currentPoll / 1000)+'s');this._pollingTimeout=setTimeout(function(){self.pollForNewReplies();},this._currentPoll);},_stopPolling:function(){this._pollingActive=false;if(this._pollingTimeout){clearTimeout(this._pollingTimeout);}
Debug.log("Stopped polling for new replies in comment feed.");},pollForNewReplies:function(){var self=this;var replyForm=this.scope.find('[data-role="replyArea"] form');var commentsOnThisPage=this.scope.find('[data-commentid]');if(!commentsOnThisPage.length){return;}
var lastSeenId=$(commentsOnThisPage[commentsOnThisPage.length-1]).attr('data-commentId');var type=$(commentsOnThisPage[commentsOnThisPage.length-1]).attr('data-commentType');if(type.match(/-review$/)){Debug.log("Polling disabled for reviews");this._stopPolling();return;}
if(this._pollingPaused){Debug.log('Window blurred, delaying poll until focused...');this._pollOnUnpaused=true;return;}
if(this._pollAjax&&!_.isUndefined(this._pollAjax.abort)){this._pollAjax.abort();}
this._pollAjax=IPS.getAjax();this._pollAjax(replyForm.attr('action'),{dataType:'json',data:'do=checkForNewReplies&type=count&lastSeenID='+lastSeenId,type:'post'}).done(function(response){if(response.error&&response.error=='auto_polling_disabled'){self._stopPolling();return;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
if(parseInt(response.count)>0){self._currentPoll=self._initialPoll;self._buildFlashMsg(response);if(parseInt(response.totalCount)>parseInt(self._lastSeenTotal)){self._buildNotifications(response);self._playNotification();self._lastSeenTotal=parseInt(response.totalCount);}}else{if((self._currentPoll+self._decay)<self._maxInterval){self._currentPoll+=self._decay;}else{self._currentPoll=self._maxInterval;}}
if(!_.isUndefined(self.scope.attr('data-lastPage'))){self._startPolling();}});},_buildFlashMsg:function(response){var html='';var self=this;var itemsInFeed=this.scope.find('[data-commentid]').length;var spaceForMore=(parseInt(response.perPage)-itemsInFeed);if(parseInt(response.count)>spaceForMore){html=IPS.templates.render('core.postNotify.multipleSpillOver',{text:IPS.pluralize(IPS.getString('newPostMultipleSpillOver'),[response.totalNewCount]),canLoadNew:(spaceForMore>0),showFirstX:IPS.pluralize(IPS.getString('showFirstX'),[spaceForMore]),spillOverUrl:response.spillOverUrl});}else if(parseInt(response.count)===1&&!_.isUndefined(response.photo)&&!_.isUndefined(response.name)){html=IPS.templates.render('core.postNotify.single',{photo:response.photo,text:IPS.getString('newPostSingle',{name:response.name})});}else{html=IPS.templates.render('core.postNotify.multiple',{text:IPS.pluralize(IPS.getString('newPostMultiple'),[response.count])});}
if($('#elFlashMessage').is(':visible')&&$('#elFlashMessage').find('[data-role="newPostNotification"]').length){$('#elFlashMessage').find('[data-role="newPostNotification"]').replaceWith(html);}else{IPS.ui.flashMsg.show(html,{sticky:true,position:'bottom',extraClasses:'cPostFlash ipsPad_half',dismissable:function(){self._stopPolling();}});}},_buildNotifications:function(response){var self=this;var hiddenProp=IPS.utils.events.getVisibilityProp();if(_.isUndefined(hiddenProp)||!document[hiddenProp]||!IPS.utils.notification.supported){return;}
var notifyData={onClick:function(e){try{window.focus();}catch(err){}
self.loadNewPosts(e);}};if(self._notification){self._notification.hide();}
if(parseInt(response.count)===1&&!_.isUndefined(response.photo)&&!_.isUndefined(response.name)){notifyData=_.extend(notifyData,{title:IPS.getString('notificationNewPostSingleTitle',{name:response.name}),body:IPS.getString('notificationNewPostSingleBody',{name:response.name,title:response.title}),icon:response.photo});}else{notifyData=_.extend(notifyData,{title:IPS.pluralize(IPS.getString('notificationNewPostMultipleTitle'),[response.count]),body:IPS.pluralize(IPS.getString('notificationNewPostMultipleBody',{title:response.title}),[response.count])});}
self._notification=IPS.utils.notification.create(notifyData);self._notification.show();},_playNotification:function(){if(!IPS.getSetting('disableNotificationSounds')){IPS.loader.get(['core/interface/buzz/buzz.min.js']).then(function(){var sound=new buzz.sound(IPS.getSetting('baseURL')+'applications/core/interface/sounds/notification',{webAudioApi:true,formats:["mp3"]});sound.play();});}},_importNewReplies:function(){var form=this.scope.find('[data-role="replyArea"] form');var commentsOnThisPage=this.scope.find('[data-commentid]');var lastComment=$(commentsOnThisPage[commentsOnThisPage.length-1]);var _lastSeenID=lastComment.attr('data-commentId');var self=this;IPS.getAjax()(form.attr('action'),{data:'do=checkForNewReplies&type=fetch&lastSeenID='+_lastSeenID+'&showing='+commentsOnThisPage.length,type:'post'}).done(function(response){if(commentsOnThisPage.length+parseInt(response.totalNewCount)>response.perPage){if(response.spillOverUrl){window.location=response.spillOverUrl;}else{window.location.reload();}}else{if(_.isArray(response.content)){_.each(response.content,function(item){self.trigger('addToCommentFeed',{content:item,feedID:self._commentFeedID,resetEditor:false,totalItems:response.totalCount});});}else{self.trigger('addToCommentFeed',{content:response.content,feedID:self._commentFeedID,resetEditor:false,totalItems:response.totalCount});}}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
self._clearNotifications();});},_clearNotifications:function(){if(this._notification&&_.isFunction(this._notification.hide())){this._notification.hide();}
if($('#elFlashMessage').find('[data-role="newPostNotification"]').length){$('#elFlashMessage').find('[data-role="newPostNotification"]').trigger('closeFlashMsg.flashMsg');}},quickReply:function(e){var form=this.scope.find('[data-role="replyArea"] form');if(form.attr('data-noAjax')){return;}
e.preventDefault();e.stopPropagation();var self=this;var replyArea=this.scope.find('[data-role="replyArea"]');var submit=form.find('[type="submit"]');var autoFollow=this.scope.find('input[name$="auto_follow_checkbox"]');var commentsOnThisPage=this.scope.find('[data-commentid]');var _lastSeenID=$(commentsOnThisPage[commentsOnThisPage.length-1]).attr('data-commentId');var initialText=submit.text();submit.prop('disabled',true).text(IPS.getString('saving'));var page=IPS.utils.url.getParam(this._pageParam);if(!page){page=1;}
IPS.getAjax()(form.attr('action'),{data:form.serialize()+'&currentPage='+page+'&_lastSeenID='+_lastSeenID,type:'post'}).done(function(response){if(response.type=='error'){if(response.form){form.replaceWith($(response.form));$(document).trigger('contentChange',[self.scope]);}else{IPS.ui.alert.show({type:'alert',icon:'warn',message:response.message,callbacks:{}});}}
else if(response.type=='redirect'){self.paginationClick(e,{href:response.url,originalEvent:e});}else if(response.type=='merge'){var comment=self.scope.find('[data-commentid="'+response.id+'"]');comment.find('[data-role="commentContent"]').html(response.content);if(comment.find('pre.prettyprint').length){comment.find('pre.prettyprint').each(function(){$(this).html(window.PR.prettyPrintOne(_.escape($(this).text())));});}
IPS.ui.editor.getObj(self.scope.find('[data-role="replyArea"] [data-ipsEditor]')).reset();form.find("[data-role='commentFormError']").each(function(){$(this).remove();});var container=comment.closest('.ipsComment');if(container.length){IPS.utils.anim.go('pulseOnce',container);}else{IPS.utils.anim.go('pulseOnce',comment);}
IPS.ui.flashMsg.show(IPS.getString('mergedConncurrentPosts'));$(document).trigger('contentChange',[self.scope]);}else{self.trigger('addToCommentFeed',{content:response.content,totalItems:response.total,feedID:self._commentFeedID,scrollToItem:true});if(response.message){IPS.ui.flashMsg.show(response.message);}
form.find("[data-role='commentFormError']").each(function(){$(this).remove();});if(autoFollow.length){self.trigger('followingItem',{feedID:self.scope.attr('data-feedID'),following:autoFollow.is(':checked')});}}
self._clearNotifications();}).fail(function(){form.attr('data-noAjax','true');form.attr('action',form.attr('action')+((!form.attr('action').match(/\?/))?'?failedReply=1':'&failedReply=1'));form.submit();}).always(function(){submit.prop('disabled',false).text(initialText?initialText:IPS.getString('submit_reply'));});},loadNewPosts:function(e){e.preventDefault();this._importNewReplies();},addToCommentFeed:function(e,data){if(!data.content||data.feedID!=this._commentFeedID){return;}
var textarea=this.scope.find('[data-role="replyArea"] textarea');var content=$('<div/>').append(data.content);var comment=content.find('.ipsComment');var commentFeed=this.scope.find('[data-role="commentFeed"]');if(commentFeed.find('[data-role="moderationTools"]').length){commentFeed=commentFeed.find('[data-role="moderationTools"]');}
this.scope.find('[data-role="noComments"]').remove();commentFeed.append(comment.css({opacity:0.001}));if(comment.find('pre.prettyprint').length){comment.find('pre.prettyprint').each(function(){$(this).html(window.PR.prettyPrintOne(_.escape($(this).text())));});}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
var newItemTop=comment.offset().top;var windowScroll=$(window).scrollTop();var viewHeight=$(window).height();var _showComment=function(){comment.css({opacity:1});IPS.utils.anim.go('fadeInDown',comment);};if(!_.isUndefined(data.scrollToItem)&&data.scrollToItem&&(newItemTop<windowScroll||newItemTop?windowScroll+viewHeight))){$('html, body').animate({scrollTop:newItemTop+'px'},'fast',function(){setTimeout(_showComment,100);});}else{_showComment();}
if(_.isUndefined(data.resetEditor)||data.resetEditor!==false){IPS.ui.editor.getObj(this.scope.find('[data-role="replyArea"] [data-ipsEditor]')).reset();}
if(IPS.utils.db.isEnabled()){var buttons=comment.find('[data-action="multiQuoteComment"]');buttons.hide().removeClass('ipsHide');IPS.utils.anim.go('fadeIn',buttons);}
if(IPS.getSetting('links_external')){this.scope.find('a[rel*="external"]').each(function(index,elem){elem.target="_blank";})}
this._updateCount(data.totalItems);$(document).trigger('contentChange',[this.scope]);},deletedComment:function(e,data){data=$.parseJSON(data.response);var self=this;if(data.type=='redirect'){window.location=data.url;}
else{this._updateCount(data.total);}},_updateCount:function(newTotal){if(this.scope.find('[data-role="comment_count"]')){var langString='js_num_comments';if(this.scope.find('[data-role="comment_count"]').attr('data-commentCountString')){langString=this.scope.find('[data-role="comment_count"]').attr('data-commentCountString');}
this.scope.find('[data-role="comment_count"]').text(IPS.pluralize(IPS.getString(langString),newTotal));}},doMultiQuote:function(e){var mqData=this._getMultiQuoteData();var replyArea=this.scope.find('[data-role="replyArea"]');var editor=IPS.ui.editor.getObj(this.scope.find('[data-role="replyArea"] [data-ipsEditor]'));var output=[];var self=this;if(!_.size(mqData)||!replyArea.is(':visible')){return;}
_.each(mqData,function(value){output.push(value);});if(editor){editor.insertQuotes(output);}
this._removeAllMultiQuoted();},clearMultiQuote:function(e){e.preventDefault();this._removeAllMultiQuoted();},_removeAllMultiQuoted:function(){var mqData=this._getMultiQuoteData();var self=this;IPS.utils.db.set('mq','data',{});this._buildMultiQuote(0);if(!_.size(mqData)){return;}
_.each(mqData,function(value){self.triggerOn('core.front.core.comment','setMultiQuoteDisabled.comment',{contentapp:value.contentapp,contenttype:value.contenttype,contentcommentid:value.contentcommentid});});},addMultiQuote:function(e,data){var mqData=this._getMultiQuoteData();var key=data.contentapp+'-'+data.contenttype+'-'+data.contentcommentid;if(_.size(mqData)==this._maximumMultiQuote)
{IPS.ui.alert.show({type:'alert',icon:'warn',message:IPS.pluralize(IPS.getString('maxmultiquote'),this._maximumMultiQuote),callbacks:{ok:function(){$("button[data-mqId='"+data.button+"']").removeClass('ipsButton_alternate').addClass('ipsButton_simple').removeAttr('data-mqActive').html(IPS.templates.render('core.posts.multiQuoteOff'));}}});return false;}
mqData[key]=data;IPS.utils.db.set('mq','data',mqData);this._buildMultiQuote(_.size(mqData));},removeMultiQuote:function(e,data){var mqData=this._getMultiQuoteData();var key=data.contentapp+'-'+data.contenttype+'-'+data.contentcommentid;if(!_.isUndefined(mqData[key])){mqData=_.omit(mqData,key);IPS.utils.db.set('mq','data',mqData);this._buildMultiQuote(_.size(mqData));}},_getMultiQuoteData:function(){var mqData=IPS.utils.db.get('mq','data');if(_.isUndefined(mqData)||!_.isObject(mqData)){return{};}
return mqData;},_setUpMultiQuote:function(){if(!IPS.utils.db.isEnabled()){return;}

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
var buttons=this.scope.find('[data-action="multiQuoteComment"]');var self=this;var mqData=this._getMultiQuoteData();buttons.show();if(_.size(mqData)){this._buildMultiQuote(_.size(mqData));_.each(mqData,function(value){self.triggerOn('core.front.core.comment','setMultiQuoteEnabled.comment',{contentapp:value.contentapp,contenttype:value.contenttype,contentcommentid:value.contentcommentid});});}},_buildMultiQuote:function(count){var quoterElem=$('#ipsMultiQuoter');if(!quoterElem.length&&count){IPS.getContainer().append(IPS.templates.render('core.posts.multiQuoter',{count:IPS.getString('multiquote_count',{count:IPS.pluralize(IPS.getString('multiquote_count_plural'),[count])})}));IPS.utils.anim.go('zoomIn fast',$('#ipsMultiQuoter'));}else{quoterElem.find('[data-role="quotingTotal"]').text(IPS.pluralize(IPS.getString('multiquote_count_plural'),[count]));if(count&&quoterElem.is(':visible')){IPS.utils.anim.go('pulseOnce fast',quoterElem);}else if(count&&!quoterElem.is(':visible')){IPS.utils.anim.go('zoomIn fast',quoterElem);}else{IPS.utils.anim.go('zoomOut fast',quoterElem);}}}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.commentsWrapper',{initialize:function(){this.on(document,'addToCommentFeed',this.addToCommentFeed);this.on('deletedComment.comment',this.deletedComment);},addToCommentFeed:function(e,data){this._updateCount($(e.target).attr('data-commentsType'),data.totalItems);},deletedComment:function(e,data){this._updateCount($(e.target).closest('[data-commentsType]').attr('data-commentsType'),data.newTotal);},_updateCount:function(type,number){var langString='js_num_'+type;var elem=$('#'+$(this.scope).attr('data-tabsId')+'_tab_'+type);elem.text(IPS.pluralize(IPS.getString(langString),number));}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.model.register('core.comment',{initialize:function(){this.on('getEditForm.comment',this.getEditForm);this.on('saveEditComment.comment',this.saveEditComment);this.on('deleteComment.comment',this.deleteComment);this.on('newComment.comment',this.newComment);this.on('approveComment.comment',this.approveComment);},getEditForm:function(e,data){this.getData({url:data.url,dataType:'html',data:{},events:'getEditForm',namespace:'comment'},data);},saveEditComment:function(e,data){var url=data.url;this.getData({url:data.url,dataType:'html',type:'post',data:data.form||{},events:'saveEditComment',namespace:'comment'},data);},approveComment:function(e,data){this.getData({url:data.url,dataType:'html',data:data.form||{},events:'approveComment',namespace:'comment'},data);},deleteComment:function(e,data){this.getData({url:data.url,dataType:'html',data:data.form||{},events:'deleteComment',namespace:'comment'},data);},newComment:function(e,data){this.getData({url:data.url,dataType:'json',data:data.form||{},events:'newComment',namespace:'comment'},data);}});}(jQuery,_));;

Matin, [26.03.17 09:32]
[Forwarded from Morteza Golestani]
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.ignoredComments',{initialize:function(){this.on('menuItemSelected','[data-action="ignoreOptions"]',this.commentIgnore);},commentIgnore:function(e,data){switch(data.selectedItemID){case'showPost':data.originalEvent.preventDefault();this._showHiddenPost(e,data);break;case'stopIgnoring':data.originalEvent.preventDefault();this._stopIgnoringFromComment(e,data);break;}},_showHiddenPost:function(e,data){var ignoreRow=$(data.triggerElem).closest('.ipsComment_ignored');var commentID=ignoreRow.attr('data-ignoreCommentID');var comment=this.scope.find('#'+commentID);ignoreRow.remove();comment.removeClass('ipsHide');},_stopIgnoringFromComment:function(e,data){var ignoreRow=$(data.triggerElem).closest('.ipsComment_ignored');var userID=ignoreRow.attr('data-ignoreUserID');var self=this;var posts=this.scope.find('[data-ignoreUserID="'+userID+'"]');posts.each(function(){self.scope.find('#'+$(this).attr('data-ignoreCommentID')).removeClass('ipsHide');$(this).remove();});var url=IPS.getSetting('baseURL')+'index.php?app=core&module=system&controller=ignore&do=ignoreType&type=topics&off=1';IPS.getAjax()(url,{data:{member_id:parseInt(userID)}}).done(function(){IPS.ui.flashMsg.show(IPS.getString('ignore_prefs_updated'));}).fail(function(){window.location=IPS.getSetting('baseURL')+'index.php?app=core&module=system&controller=ignore&do=ignoreType&off=1type=topics&member_id='+userID;});}});}(jQuery,_));;
;(function($,_,undefined){"use strict";IPS.controller.register('core.front.core.instantNotifications',{_pollTimeout:20,_windowInactivePoll:0,_pollMultiplier:1,_messagesEnabled:null,_ajaxObj:null,_debugPolling:true,_browserNotifications:{},_paused:false,_interval:null,initialize:function(){this.on(document,IPS.utils.events.getVisibilityEvent(),this.windowVisibilityChange);this.on(window,'storage',this.storageChange);this.setup();},setup:function(){if(!IPS.utils.db.isEnabled()||!_.isFunction(JSON.parse)){Debug.warn("Sorry, your browser doesn't support localStorage or JSON so we can't load instant notifications for you.");return;}
this._messagesEnabled=this.scope.find('[data-notificationType="inbox"]').length;this._setInterval(this._pollTimeout);this._doInitialCheck();},storageChange:function(e){var event=e.originalEvent;if(event.key!=='notifications.'+IPS.getSetting('baseURL')){return;}
if(this._debugPolling){Debug.log('Notifications: updating instantly from storage event');}
try{var data=JSON.parse(event.newValue);var counts=this._getCurrentCounts();this._updateIcons({messages:parseInt(data.messages),notifications:parseInt(data.notifications)},counts);}catch(err){}},windowVisibilityChange:function(){var hiddenProp=IPS.utils.events.getVisibilityProp();if(!_.isUndefined(hiddenProp)&&!document[hiddenProp]){this._updateBrowserTitle(0);this._pollMultiplier=1;this._windowInactivePoll=0;if(this._paused){document.title=document.title.replace("❚❚ ",'');this._checkNotifications();this._setInterval(this._pollTimeout);}
if(this._debugPolling){Debug.log("Notifications: Resetting inactive poll.");}}},_setInterval:function(timeoutInSecs){clearInterval(this._interval);this._interval=setInterval(_.bind(this._checkNotifications,this),timeoutInSecs*1000);},_doInitialCheck:function(){var storage=IPS.utils.db.get('notifications',IPS.getSetting('baseURL'));var counts=this._getCurrentCounts();if(!storage||!_.isObject(storage)){return;}
if((this._messagesEnabled&&counts.messages>storage.messages)||counts.notifications>storage.notifications){if(this._debugPolling){Debug.log("Notifications: bubbles reporting higher counts for notifications or messages.");}
var dataToSend={notifications:storage.notifications};if(this._messagesEnabled){dataToSend=_.extend(dataToSend,{messages:storage.messages});}

Get Ready For IPS هم نصب کردیم :

http://forum.game2download.ir/ips4.php

همچنین در هنگام ارتقا با ارور زیر مواجه میشیم :

Please create a /home/persia30/public_html/g2d/forum/datastore directory and make it writeable. If you are not sure how to do this, contact your hosting provider.

این ادرس که در بالا ذکر شده، ادرس محل نصب IPS هاست قبلی هستش.

مصرف رم و سی پی یو نیز به شدت افزایش یافته.

ممنون میشم برسی کنید :DD:

لینک ارسال
به اشتراک گذاری در سایت های دیگر

سلام دوست عزیز

متن های زیر رو برای پشتیبانی بفرستید تا افزایش دهند

PHP setting suhosin.max_vars is set to . This can cause problems in some areas. We recommended a value of 4096 or above. You should contact your hosting provider or system administrator to ask for this to be changed.
PHP setting suhosin.request.max_vars is set to 1000. This can cause problems in some areas. We recommended a value of 4096 or above. You should contact your hosting provider or system administrator to ask for this to be changed.
PHP setting suhosin.get.max_value_length is set to 512. This can cause problems in some areas. We recommended a value of 2000 or above. You should contact your hosting provider or system administrator to ask for this to be changed.
PHP setting suhosin.request.max_varname_length is set to 64. This can cause problems in some areas. We recommended a value of 350 or above. You should contact your hosting provider or system administrator to ask for this to be changed.

ضمن اینکه مسیر دخیره سازی رو چک کنید و از بخش پشتیبانی > بررسی سیستم ، دسترسی فولدر هایی که نوشته شده رو بررسی کنید

لینک ارسال
به اشتراک گذاری در سایت های دیگر

بایگانی شده

این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.

  • کاربران آنلاین در این صفحه   0 کاربر

    • هیچ کاربر عضوی،در حال مشاهده این صفحه نیست.
×
×
  • اضافه کردن...