vinzzb
Forum Replies Created
-
Forum: Plugins
In reply to: [PhpList Subber] Parse error in init.phpHi,
First of all, sorry for the late response. I did not receive any notification email for your question. I have to check my settings on this site…
Nevertheless, I looked at your problem and could not find anything that would result in this error. Line 176 is the end of my Php script.
Could you tell me what version of PHP you are using? You must run PHP 5.3 or higher because the plugin is Object Oriented (OOP) written. I think this may be the problem? I should’ve mentioned that in the installation guide. I’ll change that on a next release.
Kind regards,
Vincenti’ve edited main.js and now the ‘read more’ button and infinite scroll are working together. I broke the other options, but i don’t need that. I’d like to see this implemented tho.
This is what i changed:
Replace:
mapLoading = function() { $('.malinky-ajax-pagination-loading[data-paginator-count="' + mymapPaginatorCount + '"]').show(), "load-more" != mymapPagingType && "infinite-scroll" != mymapPagingType || $('#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]').text(mymapLoadingMorePostsText) }, mapLoaded = function() { $('.malinky-ajax-pagination-loading[data-paginator-count="' + mymapPaginatorCount + '"]').hide(), "load-more" != mymapPagingType && "infinite-scroll" != mymapPagingType || $('#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]').text(mymapLoadMoreButtonText), clearTimeout(mymapLoadingTimer) }, mapFailed = function() { $('.malinky-ajax-pagination-loading[data-paginator-count="' + mymapPaginatorCount + '"]').hide(), clearTimeout(mymapLoadingTimer) }, mapInfiniteScroll = debounce(function() { if (!infiniteScrollRunning) { var a = ($(document).height() - $(window).scrollTop() - $(window).height(), $(mymapPostsWrapperClass + '[data-paginator-count="' + mymapPaginatorCount + '"]').offset().top), t = $(mymapPostsWrapperClass + '[data-paginator-count="' + mymapPaginatorCount + '"]').outerHeight(); $(window).height() + $(window).scrollTop() + mymapInfiniteScrollBuffer > a + t && (infiniteScrollRunning = !0, mapLoading(), mapLoadPosts()) } }, 250); "infinite-scroll" == mymapPagingType ? $(mymapNextPageSelector + '[data-paginator-count="' + mymapPaginatorCount + '"]').attr("href") && (mapAddLoader(), $(mymapPaginationClass + '[data-paginator-count="' + mymapPaginatorCount + '"]').remove(), window.addEventListener("scroll", mapInfiniteScroll)) : "load-more" == mymapPagingType ? $(mymapNextPageSelector + '[data-paginator-count="' + mymapPaginatorCount + '"]').attr("href") && ($(mymapPaginationClass + '[data-paginator-count="' + mymapPaginatorCount + '"]').last().after('<div class="malinky-load-more"><a href="' + mymapNextPageUrl + '" id="malinky-ajax-pagination-button" class="malinky-load-more__button" data-paginator-count="' + mymapPaginatorCount + '">' + mymapLoadMoreButtonText + "</a></div>"), mapAddLoader(), $(mymapPaginationClass + '[data-paginator-count="' + mymapPaginatorCount + '"]:not(:has(>a#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]))').remove(), $('#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]').click(function(a) { a.preventDefault(), $(this).addClass("malinky-load-more__button-disable"), mymapLoadingTimer = setTimeout(mapLoading, 750), mapLoadPosts() })) : "pagination" == mymapPagingType && (mapAddLoader(), $(document).on("click", mymapPaginationClass + '[data-paginator-count="' + mymapPaginatorCount + '"] a', function(a) { a.preventDefault(), mymapLoadingTimer = setTimeout(mapLoading, 750), mymapNextPageUrl = a.currentTarget.href, mapLoadPosts() }), window.addEventListener("popstate", function(a) { mymapNextPageUrl = document.URL, mapLoadPosts() })) }, setUp = function() {
With:
mapLoading = function() { $('.malinky-ajax-pagination-loading[data-paginator-count="' + mymapPaginatorCount + '"]').show(), "infinite-scroll" != mymapPagingType || $('#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]').text(mymapLoadingMorePostsText) }, mapLoaded = function() { $('.malinky-ajax-pagination-loading[data-paginator-count="' + mymapPaginatorCount + '"]').hide(), "infinite-scroll" != mymapPagingType || $('#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]').text(mymapLoadMoreButtonText), clearTimeout(mymapLoadingTimer) }, mapFailed = function() { $('.malinky-ajax-pagination-loading[data-paginator-count="' + mymapPaginatorCount + '"]').hide(), clearTimeout(mymapLoadingTimer) }, mapInfiniteScroll = debounce(function() { if (!infiniteScrollRunning) { var a = ($(document).height() - $(window).scrollTop() - $(window).height(), $(mymapPostsWrapperClass + '[data-paginator-count="' + mymapPaginatorCount + '"]').offset().top), t = $(mymapPostsWrapperClass + '[data-paginator-count="' + mymapPaginatorCount + '"]').outerHeight(); $(window).height() + $(window).scrollTop() + mymapInfiniteScrollBuffer > a + t && (infiniteScrollRunning = !0, mapLoading(), mapLoadPosts()) } }, 250); $(mymapNextPageSelector + '[data-paginator-count="' + mymapPaginatorCount + '"]').attr("href") && ($(mymapPaginationClass + '[data-paginator-count="' + mymapPaginatorCount + '"]').last().after('<div class="malinky-load-more"><a href="' + mymapNextPageUrl + '" id="malinky-ajax-pagination-button" class="malinky-load-more__button" data-paginator-count="' + mymapPaginatorCount + '">' + mymapLoadMoreButtonText + "</a></div>"), mapAddLoader(), $(mymapPaginationClass + '[data-paginator-count="' + mymapPaginatorCount + '"]:not(:has(>a#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]))').remove(), window.addEventListener("scroll", mapInfiniteScroll), $('#malinky-ajax-pagination-button[data-paginator-count="' + mymapPaginatorCount + '"]').click(function(a) { a.preventDefault(), $(this).addClass("malinky-load-more__button-disable"), mymapLoadingTimer = setTimeout(mapLoading, 750), mapLoadPosts() })) }, setUp = function() {
Set the option to ‘infinite scroll’ in the Ajax settings.
With these changes in place, the ‘read more’ button is visible and the infinite scroll works.
- This reply was modified 6 years, 8 months ago by vinzzb.