Current status of the Ning Platform is always available on the Ning Status Blog.

Forum

Here is a little project I have been working on for the Upcoming Events. We can add as normal a box using the add content option to display upcoming events which is fine but then each month you would have to change it again for that month. So here is something I created that you may like.

You add this code and it will then give you a box the same as if you where adding an add content box as normal but this time it will change the content depending on the Month we are in. Also it will display how many events are Upcoming for the month and if there are none it will say so in the title and not show any events.

You can see it working on my sites homepage in the top right.

DEMO: http://bizzssite.ning.com/

Before we get started I will just point out that this version is for one event page instance only, so if you have multiple ones you can only select which you want to display in the box. I am working on a multiple one but this may be a while as other projects will come before it.

IMPORTANT: The code is all setup for an event page which is called Events. So if you have just called your event page events then you can just copy the code, if nt and you have called it something else, for example mine is called events demo which in the url it will show as events-demo, so you would need to change just that one part for your own page name. This is the line you are looking for

x$('.eventsMonthWidget .module-body').load("/events .eventListPage .entry .media-frame.eventPage-details", function(){

And this is the part you would change

/events

So for mine it would look like this

/events-demo

and the complete line would look like this

x$('.eventsMonthWidget .module-body').load("/events-demo .eventListPage .entry .media-frame.eventPage-details", function(){

Ok let's get started and add a little css first, this goes in your design studio custom css. You can change the colours to suit your site and font sizes.

.eventsMonthWidget .entry-title > a{ font-size:1.3em }
.eventsMonthWidget .eventPage-detail{ font-size:0.8em }
.eventsMonthWidget .eventPage-detail > a{ font-size:1em }
.eventsMonthWidget .eventPage-detail > a{ font-size:1em }
.eventsMonthWidget .module-header::before{
content:"Upcoming Events This Month";
display:block;
padding-bottom:5px;
font-weight:normal;
text-align:center;
color:white;
 font-size:0.96em;
 }

Next we need to add some custom code into our site&pages custom code end of page box ( do not copy this line with the code )

<script>
/*Events Month List Widget Code, John Bizley 01-03-17 ver( 3.5 )*/
x$(document).ready(function(){
x$('.module-name:contains(eventsMonthWidget)').closest('.section-eventBundle').addClass('eventsMonthWidget');
x$('.eventsMonthWidget .module-name').text('Events This Month');
x$('.eventsMonthWidget .module-body').html('<h1 class="eventsMonthWidget-updating">Updating...</h1>');
//Change the load url for your own events page. If it's called events then no need to change anything
x$('.eventsMonthWidget .module-body').load("/events .eventListPage .entry .media-frame.eventPage-details", function(){
var WidgetClass = x$('.module-name:contains(eventsMonthWidget)').closest('.section-eventBundle').addClass('eventsMonthWidget');
var monthsDisplay = ['January','February','March','April','May','June','July','August','September','October','November','December'];
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var now = new Date();
var month = months[now.getMonth()];
var monthDisplay = monthsDisplay[now.getMonth()];
var monthselector = ".section-eventBundle.eventsMonthWidget ul:nth-child(1) > li:nth-child(2) > a:nth-child(1):contains("+ month +")";
var monthClass = x$(monthselector).closest('.media-frame').addClass(month);
var presentMonth = monthClass;
var notThisMonth = x$('.section-eventBundle.eventsMonthWidget .media-frame');
notThisMonth.not(presentMonth).remove();
var eventsPresentCount = presentMonth.length;
if(eventsPresentCount <=0){
x$('.section-eventBundle.eventsMonthWidget .module-name').text('No Upcoming '+monthDisplay+' Events');
}else if(eventsPresentCount === 1){
x$('.section-eventBundle.eventsMonthWidget .module-name').text(' '+monthDisplay+' ('+eventsPresentCount+') Event');
}else{
x$('.section-eventBundle.eventsMonthWidget .module-name').text(' '+monthDisplay+' ('+eventsPresentCount+') Events');
}
x$('.section-eventBundle.eventsMonthWidget .module-footer > a.pull-right').text('View All Events');
x$('.column-narrow .section-eventBundle.eventsMonthWidget .module-name').css('text-align','center');
x$('.eventsMonthWidget .span6.narrow16.tablet16.mobile16').hide();
});
});
</script>

Now we have added the code you only need to do that once and can now go ahead and add as many of the widgets to any pages you wish so here is how to add them.

  1. Go to your site&pages and click on a page you want to add it to
  2. Click on the add content button and choose your event page from the list
  3. add this title   eventsMonthWidget
  4. Display set to Titles Only
  5. From to upcoming
  6. Show 1 events
  7. Click Add and you are all finished move the widget to wherever you want it.

Demo images

Setup

How it looks on the page

Enjoy

John :-)

You need to be a member of Ning Creators Network to add comments!

Join Ning Creators Network

Email me when people reply –

Search the Creators Network

Latest Activity

Kyryl_Ning_Support replied to Ian's discussion Side Backgound Image keeps shrinking and orienting left & animated gif header isn't working
"Hi Ian,
In that case please sent the image to our email address support@ning.com so we could try to…"
1 hour ago
Kyryl_Ning_Support replied to Bryce Rubio's discussion A Follow-Up Message from our CEO
"Hi there,
As we have mentioned in the reply to the ticket that you have sent to us the issue with t…"
1 hour ago
Remy Arteaga is now a member of Ning Creators Network
2 hours ago
Shadow replied to Anna Ning Support's discussion 500 error on some Ning Networks
"Thank you for the update much appreciated.."
4 hours ago
Kyryl_Ning_Support replied to Anna Ning Support's discussion 500 error on some Ning Networks
"Hi there,
At this moment the tech team is working on this issue. It should be fixed approximately i…"
4 hours ago
Anam replied to Yana Ning Support's discussion Video Feature on Ning 3.0 is now available!
"I tried it out.

I am concerned for storage amounts...I think it would be different than what we ca…"
4 hours ago
Shadow replied to Anna Ning Support's discussion 500 error on some Ning Networks
"Hey btw uh am I missing something or is there a different creators now? activity post on homepage d…"
4 hours ago
TJ @ jQueryHelp replied to Yana Ning Support's discussion Video Feature on Ning 3.0 is now available!
"Very nice addition to Ning 3 sites, thanks!"
7 hours ago
Thisisbully replied to Bizz ( John )'s discussion Now We Have The Responsive Video We Can Know Adjust The Columns.
"perfect"
8 hours ago
Ian replied to Ian's discussion Side Backgound Image keeps shrinking and orienting left & animated gif header isn't working
"The image we've had in the 'side image' has been working fine, filling up the whole screen for year…"
9 hours ago
Shadow replied to Anna Ning Support's discussion 500 error on some Ning Networks
"Thank you Kos I did use this page earlier.  still waiting but all good Thank you :)"
9 hours ago
Kos replied to Anna Ning Support's discussion 500 error on some Ning Networks
"Shadow try to file a ticket online here http://hc.ning.com/contact/networkdown/index.php
Hope they…"
9 hours ago
Shadow replied to Anna Ning Support's discussion 500 error on some Ning Networks
"found an old post to reply on.. as NING status is not recent it seems.. nor current issues.. as my…"
10 hours ago
Bizz ( John ) replied to Bizz ( John )'s discussion Make Your Videos In The New Video Feature Responsive
"Your most welcome Kos :-)"
10 hours ago
Aurora replied to George H. Compton IV's discussion ( TIP N3 ) Allow your members to add CSS codes to the new profile text box.
"Actually the text boxes are a mess, I'm facing the same problem on my network, I hope they fix this…"
11 hours ago
Kos replied to Bizz ( John )'s discussion My Layout Adjustments For The New Video Feature - viewing the video
"Ning just hire him already.  LOL  Great work John - thank you!"
11 hours ago
Kos replied to Bizz ( John )'s discussion Make Your Videos In The New Video Feature Responsive
"Nice John.  Thank you!"
11 hours ago
Philip Voice replied to Yana Ning Support's discussion Video Feature on Ning 3.0 is now available!
"Hi John
Thanks for your response.
It looks as though all my settings are right."
18 hours ago
Kos replied to CZG's discussion Logging into ning site using Firefox not secure message
"If Ning obtains SSL, it will be for their domain name - not all of ours (who can afford that?) 
No,…"
18 hours ago
Suki Winthrop replied to Jeff Gilder's discussion Saying Goodbye To Ning After 9 Years
"Hi Jeff, couple months have gone by now.
I think there is already a lot of feedback here about what…"
18 hours ago
More…