VBsupport перешел с домена .ORG на родной .RU
Ура!
Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей
Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже: Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота. Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
So this is petty standard feature of most sites today, load more by pressing a button. So what Im trying to do is make an ajax request to a duplicated modified forumdisplay.php to load the next page of threads automatically.
Heres the procedure.
In my forumdisplay template I have created an ajax script:
loadmore.php is essentially a modified duplicate of forumdisplay.php
the notable changes are:
I have included
Code:
$perPageNew = $_POST['perPageNew'];
and I have changed the eval template from FORUMDISPLAY to loadmore
the loadmore template ONLY includes $threadbits
loading loadmore.php in browser, this works exactly how I expect it to, with only showing the threadbits of each thread, un-styled due to not being rendered with the head or any other templates. That's ok though because once they are loaded where they are supposed to be, they should be styled.
@kerk, I saw yours, I'm just trying to create this myself. Too broke to be buying vb3 products lol. As you may have noticed over the years I tend to just play around with code myself and not ever really get my site functional LOL. I have 4 kids and this is just something I do in my down time.
Am I going about it the right way by duplicating the forum display page and using the portion that is for displaying threadbit?
Would you mind sharing your forum display version so I could reverse engineer and see where I'm going wrong? I have a feeling I'm going to need to pass through more information through the ajax call (security token, sort order, page number, and per page for sure)
kerk
k0t
Join Date: May 2005
Location: localhost
Posts: 28,802
Версия vB: 3.8.x
Пол:
Reputation:
Гуру 20310
Репутация в разделе: 8463
0
@DrCustUmz, I sent you link to download that script via PM
@DrCustUmz
Знаток
Join Date: Feb 2014
Posts: 63
Версия vB: 3.8.x
Reputation:
Knowing 103
Репутация в разделе: 41
0
Thank you kerk, I'm going to play around with this when I get done working tonight
DrCustUmz добавил 03-23-2022 в 01:35 AM
So just got a minute to actually look at it.
When I was making it from scratch my thoughts were if I could just duplicate the forumdisplay portion that calls threadbit I would be good to go. When that failed, I started looking at other products that functioned similarly. All I could find on vb.org was vBSocial infinite for vb4, when I downloaded it I saw they did pretty much exactly what I was doing. Duplicated the forumdisplay file. But they used YUI and I just got stuck trying to make it work with vB3.
Both of our methods (mine and vBsocial) seem like the right approach, but you go about this a totally different way relying almost purely on JS! This is an approach I never would have thought of had I not seen it. Way less code doing it your way too, your awesome kerk!
knowing the method you approached this, I'm going to attempt to ajaxify a few other things ;P
Last edited by DrCustUmz : 03-23-2022 at 05:35 AM.
Reason: Добавлено сообщение