jbx
Forum Replies Created
-
I don’t have any coupons or bookings or anything. I just use events and locations (to display the google map).
I have 163 events.
Yes on the original setup which is just a shared hosting the index page comes up in less than 2 seconds. On the index page (and all pages) I have the events widget.
Forum: Plugins
In reply to: [Attachments] Include/Exclude Attachments for specific page-ID'sI need this too. Is there any example of how I can achieve this with version 3.5 and later? Can’t find an example with this in the documentation.
Forum: Plugins
In reply to: [Attachments] Problem with new lines in caption textareasThanks, issue seems fixed now.
Cheers, looking forward so that I can keep up to date to the latest version with your plugin.
Thanks a million.
Hi Marcus,
The filter I am using at the moment was very convenient because it passes the number of pages, current page etc. all as separate arguments.
The other hook (at least the one I know of) just receives the string with the page links. My page links are substantially different and I don’t want to hack around with some messy solution of trying to parse the default link and extract the links from that, apart from the fact that it will be difficult to know whether there are more pages left to enable/disable the Next (or Prev) buttons.
If you want to introduce a new filter that provides the same information (base link, number of pages, number of items, current page etc.) so that one could structure it as needed I guess it would be fine. However I don’t really see why you should leave the old filter broken like that in the codebase honestly, especially when it was working fine up till a few versions ago. Isn’t there any way to use the new centralised
$page_link_templatefunction correctly in the old filter in some way?Forum: Plugins
In reply to: [Attachments] Problem with new lines in caption textareasHi,
How can I do that?
The \n is appearing in the administrator not just the output text.
How do I include this in the administrator side?Thanks.
Any idea if this fix was incorporated in version 5.5.1 just released? I don’t want to update and lose this fix.
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Pagination stylingNice solution, although you are depending on the string format of the links. Be careful if it changes in a future version of Events Manager
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Pagination stylingI used a different filter
em_events_output_pagination, notem_paginatebecause it gives you the total number of events, the limit of events per page, the current page and the number of pages to show in the pagination link.There is a small but in the current version of the Events Manager plugin, which is not passing the link template. So the reason it doesn’t work for you might be that?
In my case I don’t have the pages, but you can easily add those with a loop between the PREV and NEXT links, that iterates around the
$pagevariable to display some pages before the current page and some pages after the current page, up to$pagesToShowCheers! I think there are a couple of more places where the filter is being invoked, so might be a good idea to check them out.
I fixed it by changing the output line to the following in
events-manager/classes/em-events.php:$page_link_template = preg_replace('/(&|\?)pno=\d+/i','',$_SERVER['REQUEST_URI']); $page_link_template = em_add_get_params($page_link_template, array('pno'=>'%PAGE%'), false); //don't html encode, so em_paginate does its thing; $output .= apply_filters('em_events_output_pagination', self::get_pagination_links($args, $events_count, 'search_events', self::get_default_search()), $page_link_template, $events_count, $limit, $page);However, it will be lost the moment I update to a newer Events Manager version. Can it be included in the next version before a new update is issued?
thanks
Forum: Plugins
In reply to: [Events Manager - Calendar, Bookings, Tickets, and more!] Pagination stylingYou might want to look at this post, there are a couple of pastebin links of how I am doing it to style my pagination links.
http://wordpress.org/support/topic/broken-em_events_output_pagination-filter?replies=13
Beware there was a bug introduced, (check my latest post on the same thread), and the link template is being set to empty string. Hopefully a fix will be issued soon.
Hi,
I compared
events-manager/classes/em-events.phpof the latest version with the newest version, and I think the bug is in this line, in functionsoutput()andoutput_grouped().$output .= apply_filters('em_events_output_pagination', self::get_pagination_links($args, $events_count, 'search_events_grouped', self::get_default_search()), '', $events_count, $args['limit'], $args['page']);The
$link_templateparameter passed to the filter is explicitly being set to'', no wonder I am getting an empty string.In the old version when it worked it used to be:
$page_link_template = preg_replace('/(&|\?)pno=\d+/i','',$_SERVER['REQUEST_URI']); $page_link_template = em_add_get_params($page_link_template, array('pno'=>'%PAGE%'), false); //don't html encode, so em_paginate does its thing; $output .= apply_filters('em_events_output_pagination', em_paginate( $page_link_template, $events_count, $limit, $page), $page_link_template, $events_count, $limit, $page);The
$page_link_templatewas explicitly being set. Now it disappeared.Can you schedule a fix to bring this back to work properly?
OK, so I put some
echolines in my pagination hook function and I found that since one of the recent versions, the second parameter which should be the$linktemplate is completely empty. This used to have the link with the PAGE parameter.Did the order of parameters change or something?