Forum Replies Created

Viewing 5 replies - 31 through 35 (of 35 total)
  • Plugin Author i4nd90

    (@i4nd90)

    Hi there. You can define this in the options of the CLNDR instance like so (as seen in both the pre-packaged instances):

    doneRendering: function() {
    	var thisCLNDR = $(this)[0]["element"];
    	var thisMonthEvents = thisCLNDR.find(".event-item").length;
    	if (thisMonthEvents == 0) {
    		thisCLNDR.find(".event-listing").append(
    			"<div style='text-align:center;' class='event-item'>No events listed</div>"
    		);
    	}
    }

    Ian

    Plugin Author i4nd90

    (@i4nd90)

    I think simple BB code is a good idea for the description. I’ll implement and push an update in the next day or two.

    Agreed. I have warnings on while building a site. Most of us who have warnings on will know how to edit your code to get rid of them but it’s good practice to not have any warnings in the first place – they’re easy enough to avoid ??

    Just came across the same. Found the answer here: https://www.thenewsletterplugin.com/plugins/newsletter/newsletter-documentation/subscription-form-shortcodes

    The shortcode is [newsletter]

    Plugin Author i4nd90

    (@i4nd90)

    Glad it’s of use to you ??

    You can achieve what you’re after by adjusting the HTML template:

    Taking the pre-packaged “Full size calendar” instance as an example, you would change this section of the code from

    <% if (event.url) {  %><a target="_blank" href="<%= event.url %>" <% } else {  %><div <% }  %> class="event-item">
    	<span class="event-item-date">
    		<% if (event.end != event.start) {
    			startMY = moment(event.start).format("MM YY");
    			endMY = moment(event.end).format("MM YY");
    			if (startMY === endMY) { %>
    				<%= moment(event.start).format("D") %>–<%= moment(event.end).format("D MMMM") %>
    			<% } else { %>
    				<%= moment(event.start).format("D MMMM") %> – <%= moment(event.end).format("D MMMM") %>
    			<% }
    		} else {  %>
    			<%= moment(event.start).format("D MMMM") %>
    		<% } %>
    	</span>
    	<span class="event-item-name"><%= event.title %></span>
    	<% if (event.time) {  %>
    		<span class="event-item-time"><%= event.time %></span>
    	<% } %>
    	<% if (event.desc) {  %>
    		<span class="event-item-desc"><%= event.desc %></span>
    	<% } %>
    <% if (event.url) {  %></a><% } else {  %></div><% }  %>

    and replace it with

    <div class="event-item">
    	<span class="event-item-date">
    		<% if (event.end != event.start) {
    			startMY = moment(event.start).format("MM YY");
    			endMY = moment(event.end).format("MM YY");
    			if (startMY === endMY) { %>
    				<%= moment(event.start).format("D") %>–<%= moment(event.end).format("D MMMM") %>
    			<% } else { %>
    				<%= moment(event.start).format("D MMMM") %> – <%= moment(event.end).format("D MMMM") %>
    			<% }
    		} else {  %>
    			<%= moment(event.start).format("D MMMM") %>
    		<% } %>
    	</span>
    	<span class="event-item-name"><%= event.title %></span>
    	<% if (event.time) {  %>
    		<span class="event-item-time"><%= event.time %></span>
    	<% } %>
    	<% if (event.desc) {  %>
    		<% if (event.url) {  %><a target="_blank" href="<%= event.url %>"><% } %>
    		<span class="event-item-desc"><%= event.desc %></span>
    		<% if (event.url) {  %></a><% } %>
    	<% } %>
    </div>

    Ian

    • This reply was modified 8 years, 1 month ago by i4nd90.
    • This reply was modified 8 years, 1 month ago by i4nd90.
Viewing 5 replies - 31 through 35 (of 35 total)