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 Social Network to add comments!

Join Ning Creators Social Network

Email me when people reply –

Search the Creators Network

Latest Activity

Brendon R Culliton replied to Yana Ning Support's discussion Product Plan Update
"Is anyone elses member chat not working at all right now? It just says "connecting..""
43 minutes ago
Brandyn Shepherd replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Did a hard refresh/cleared all my cache and it's still not loading the chat."
2 hours ago
Bizz replied to Naveen Jain's discussion How can I disable Ning Search in 3.0
"This should do the trick for you, add this to your design studio custom css section.
#xn_bar_menu_s…"
3 hours ago
Alex replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"We are not seeing this problem on our site."
3 hours ago
Martin Buzz replied to Kyryl_Ning_Support's discussion The long-awaited Search Option is now at your fingertips!
"Great Update!
Is there any options on the search field to appear in different places?"
3 hours ago
Kos replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"As I've posted before, it seemed random.  Not everybody was down.  I was fine on 2.0 and 3.0 and th…"
5 hours ago
Sandstorm20141 and Bizz joined Ning Creators Social Network
5 hours ago
Thisisbully replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Not true I've been on my site all day"
5 hours ago
Kos replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Pingdom said I came back up at 4:30.  Did a hard refresh and my Chat is posting as well.   Try a ha…"
5 hours ago
Brandyn Shepherd replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Network is back up... but, chat is no longer working."
6 hours ago
Kos replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Did a hard refresh = nothing here. Still waiting.  Glad they got you back up!"
6 hours ago
Brandyn Shepherd replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Any way you can tell us what is being worked on or updated? Like... what kind of changes should we…"
6 hours ago
Diego Boada replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"I'm happy to report that my Ning network is functional now. We have scheduled training sessions wit…"
7 hours ago
Kos replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Pingdom says we've been down since 9:45 this morning.  It's now 3:22 pm.  *sigh*  Come on Ning!  Th…"
7 hours ago
Kos replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Now' I've been kicked out too.  We are waiting........*tapping fingers*"
8 hours ago
Christopher Lyon replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Thanks for communicating about this, at least. That's huge. Still frustrating, but hearing somethin…"
8 hours ago
Diego Boada replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"I'm still waiting for my network to be up and running. We were in the middle of a training for our…"
9 hours ago
Tahíta replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"No funciona mi red  http://rioabierto.ning.com/ HELP ME!!!
"Network not launched yet"."
9 hours ago
Shamshir Rai Luthra replied to Kyryl_Ning_Support's discussion Our Efforts - Your Feedback
"Hehe! Brandyn - I Got the joke! This is blackmail! Hehe - but yes, 'Your Network Is Down' signs are…"
9 hours ago
George H. Compton IV replied to Kyryl_Ning_Support's discussion Network not launched yet issue
"Thank you Kyryl!!! :)"
10 hours ago
More…