Patch in #2 applies nicely, thanks for the contribution !
By the way, to make it work, it requires to use global tokens and not views token replacements. For example, to display node title, use [node:title] instead of [title].I used method in #9 to hide the first/last inactive items, but a template php function would be better to entirely remove the elements. I'll share my code here if I managed to accomplish this.