ncarring
Forum Replies Created
-
Brilliant, that works! Thank you!
Would it be possible to add filter capabilities? I tried adding [event_search_form] above the other shortcode, and it works, sort of, except it then uses the normal events page to display the results, so we’re back to future events only.
- This reply was modified 1 year, 4 months ago by ncarring.
Thanks for your reply. I have established that the issue is not the Javascxript code but something else that is preventing it from running properly – I think I read somewhere that this plugin cannot play well with Buddypress, and since we are using that, perhaps that is the reason. Anyway, with the function disabled I have the attendee list (this is in the single event page under settings/formatting). I reverted the setting to default and I see the function is not part of the default code, so apologies if I’ve wasted your time.
Many thanks
Nick
I have now established that this anomaly is due to the sortlist() function embedded in the single event format. This function takes a list of attendees (which are there) and outputs an empty list. I’m now trying to work out why – maybe someone has already fixed this. Function:
<script type="text/javascript"> function sortList(ul){ var new_ul = ul.cloneNode(false); // Add all lis to an array var lis = []; for(var i = ul.childNodes.length; i--;){ if(ul.childNodes.nodeName === 'LI') lis.push(ul.childNodes); } // Sort the lis in descending order lis.sort(function(a, b){ var textA = a.innerText.toLowerCase(); var textB = b.innerText.toLowerCase(); if (textA < textB) return -1; if (textA > textB) return 1; return 0; }); // Add them into the ul in order for(var i = 0; i < lis.length; i++) new_ul.appendChild(lis[i]); ul.parentNode.replaceChild(new_ul, ul); } var attlist = document.getElementsByClassName('event-attendees'); var i; for (i=0; i < attlist.length; ++i) { sortList(attlist[i]); }Thanks for any advice. Obviously I’ve disabled the script for now, and have a working attendee list (albeit unsorted).
Nick
- This reply was modified 3 years, 8 months ago by ncarring.
Forum: Plugins
In reply to: [GD bbPress Tools] Sort order in latest topics viewPlease ignore this, I was using the wrong view.
Forum: Plugins
In reply to: [GD bbPress Tools] Views settingsOK I finally found how to use the views. By accident I clicked on the “Forums” menu item in the WP dashboard and there were the views!
I don’t understand what you mean by “the bbPress Topics Views widget” above, but anyway, I found a solution.
Many thanks.