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

Forum

Well finally I have finished the code for sharing the Events Month Wrap, this will enable you to seperate each month with a month heading and now also be able to style each month if you so wish. For instance you may want to add different backgrounds for each or just for a specific month like Christmas or maybe you may want a specific background for events in a category. I won't go into to much detail about how to do it all but I have added some demos for you to see and the code I used for them so you can then see how I targeted the month.

Each month is wrapped in it's own id to make it easy to target them and the content within them. If you look at the custom code you will see the list of id's at the bottom and they look like this #JanWrap #FebWrap etc.

Here are the demo pages, the first is a standard event list page with the change to one of the months by giving it a different background and styling than the others below it.

http://bizzssite.ning.com/events-demo

Here is my other styled events page with that background as well

http://bizzssite.ning.com/eventsdemo2

Ok first we need to add our main custom code, this code goes in your SITE&PAGES CUSTOM CODE END OF PAGE SECTION

<script>
x$(document).ready(function(){
//Add the classes to the months
//Version(7.1) 22-02-17 John Bizley
//Add A Class To The Start Month In eventPage-detail in eventlistpage
var StartMonth = x$('.eventPage-details .span10 ul:nth-child(1) > li:nth-child(2) > a:nth-child(1)').addClass('startMonth');
var $January = x$('.eventListPage .startMonth:contains(Jan)').closest('article.entry').addClass('january').wrapAll('<div id="JanWrap" class="calendarGrid"></div>');
var $February = x$('.eventListPage .startMonth:contains(Feb)').closest('article.entry').addClass('february').wrapAll('<div id="FebWrap" class="calendarGrid"></div>');
var $March = x$('.eventListPage .startMonth:contains(Mar)').closest('article.entry').addClass('march').wrapAll('<div id="MarWrap" class="calendarGrid"></div>');
var $April = x$('.eventListPage .startMonth:contains(Apr)').closest('article.entry').addClass('april').wrapAll('<div id="AprWrap" class="calendarGrid"></div>');
var $May = x$('.eventListPage .startMonth:contains(May)').closest('article.entry').addClass('may').wrapAll('<div id="MayWrap" class="calendarGrid"></div>');
var $June = x$('.eventListPage .startMonth:contains(Jun)').closest('article.entry').addClass('june').wrapAll('<div id="JunWrap" class="calendarGrid"></div>');
var $July = x$('.eventListPage .startMonth:contains(Jul)').closest('article.entry').addClass('july').wrapAll('<div id="JulWrap" class="calendarGrid"></div>');
var $August = x$('.eventListPage .startMonth:contains(Aug)').closest('article.entry').addClass('august').wrapAll('<div id="AugWrap" class="calendarGrid"></div>');
var $September = x$('.eventListPage .startMonth:contains(Sep)').closest('article.entry').addClass('september').wrapAll('<div id="SeptWrap" class="calendarGrid"></div>');
var $October = x$('.eventListPage .startMonth:contains(Oct)').closest('article.entry').addClass('october').wrapAll('<div id="OctWrap" class="calendarGrid"></div>');
var $November = x$('.eventListPage .startMonth:contains(Nov)').closest('article.entry').addClass('november').wrapAll('<div id="NovWrap" class="calendarGrid"></div>');
var $December = x$('.eventListPage .startMonth:contains(Dec)').closest('article.entry').addClass('december').wrapAll('<div id="DecWrap" class="calendarGrid"></div>');
var cgTitle = x$('.calendarGrid').prepend('<div class="calendarGrid-Title"></div>');
var cgTitleName = x$('.calendarGrid-Title').append('<h3 class="monthHeader-name">Month</h3>');

x$('#JanWrap h3.monthHeader-name').html("January");
x$('#FebWrap h3.monthHeader-name').html("February");
x$('#MarWrap h3.monthHeader-name').html("March");
x$('#AprWrap h3.monthHeader-name').html("April");
x$('#MayWrap h3.monthHeader-name').html("May");
x$('#JunWrap h3.monthHeader-name').html("June");
x$('#JulWrap h3.monthHeader-name').html("July");
x$('#AugWrap h3.monthHeader-name').html("August");
x$('#SepWrap h3.monthHeader-name').html("September");
x$('#OctWrap h3.monthHeader-name').html("October");
x$('#Noverap h3.monthHeader-name').html("November");
x$('#DecWrap h3.monthHeader-name').html("December");
});
</script>

Next we need to add some css to style the month headings, you can alter the css as you need for colours etc.

TIP: The mesh background I added was one of nings backgound images and have used their url to point to the image so you can just copy this whole code without needing to change the url for the image. Of coursr you can use your own then replace the url for the image you are going to use.

/* CSS FOR EVENT LIST GOES IN YOUR DESIGN STUDIO CUSTOM CSS */

/***** START EVENT LIST CSS *************************************************************/

  /* NEW CALENDAR GRID This is the grid which will surround each of the months */
.calendarGrid{ border:solid 1px lightgray; border-radius:6px;padding:4px; margin-bottom:20px}
.calendarGrid-Title{ width:100%; float:left;clear:both;margin-bottom:20px }
.calendarGrid-Title{
background-image: url("http://api.ning.com/files/RnVdzGQ*fcK6zE5PqlOHudT3Dg-7en3BLgLocfWh9voRiOSNXziDoweRdZvKhnZcfX1qvTnHqZ-Qn242R1YAGhS0HI5xc1Ge/sports-mesh-10-blk.png");
background-position: center center;
background-size: initial;
background-repeat: repeat;
}
.monthHeader-name{  font-weight:bold;display:block;padding:10px 20px; color:white;background-color:royalblue;float:left; border-radius:6px 6px 0px 0px }

/***** EVENTS STANDARD ****/
/* Margin between each post */
/** Margin between each of the posts plus some padding**/
.eventListPage .entry{ margin-bottom:15px; padding:10px }
.section-eventBundle .entry {  margin-bottom: 15px; }

/*OPTIONAL Links In The Header Module ByLine For Inviting Members when creating an event */
.module-byline > a{ color:white; font-size:16px }
 .module-byline > a:hover{ color:antiquewhite; text-decoration:none }

/*OPTIONAL Make a button for the inivite members links*/
.module-byline{ margin-top:10px }
.module-byline > a{ background-color:royalblue; padding:3px 6px; border-radius:4px }
.module-byline > a:hover{ background-color:darkblue }

/* Add a border around each entry to make give them more seperation */
.eventListPage .span13 { border:solid 1px lightgray }
/*********** END EVENT LIST CSS **********************************************************/

That's it for adding the code, below is how I changed a particular months background and a little more styling.

Optional How To Styling For Month by Month

Again for the background image I used Nings one of Nings background images, I just added a background to my site first via the design studio then inspected the code of the body which is where the background image is added then copied the url for the image and used this in the code. Then I just removed the background image from my site. Now the image loads from Ning and not my file manager.

Adding a background to a month is shown below and if you notice the #FebWrap is used to style February. When adding an image you may find the other event details background is gone, this is because they are justing using the pages background colour so we can just bring them back by adjusting the colour of the entry and you can do that like this #FebWrap.entry{ background-color: white } or whatever colour you want.

/*Adding a background to a wrap*/
#FebWrap{background-image: url("http://api.ning.com/files/STHDuz-8NrVnc4*mk5QUDz8MF9xcM9*03Z83*kfERiwJoZrvFMCibF4683QayQ-u-F1RCINhB82ayZDEmoSAoBvJ*bNv49YN/grungy~-photoshop-patterns_3.jpg");}

/* Style the left part which holds the event date and day*/
#FebWrap .span3 {
    color: white;
    text-shadow: 0px 1px 1px black;
    font-weight: bold;
    background-color: #0006;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 5px;
    border-radius: 4px 0px 0px 4px;
}

/*Style the actual date and day parts*/
#FebWrap .span3 .eventListPage-startDate,#FebWrap .span3 .eventListPage-startDayOfWeek{
     background: darkgray;
    padding: 4px;
    border: solid 1px black;
    text-align: center;
}
#FebWrap .span3 .eventListPage-startDate{ border-radius:6px 0px 0px 0px }
#FebWrap .span3 .eventListPage-startDayOfWeek{border-radius:0px 0px 0px 6px;margin-top:2px;}

/*Style just the event details section not the whole entry*/
#FebWrap .eventPage-details{ background-color:white; border-radius:0px 6px 6px 6px }

That's it. 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 –

Replies

This reply was deleted.

Search the Creators Network

Latest Activity

Giovanni Cappai replied to Giovanni Cappai's discussion HTML under header not working :/
"Hi Kyryl, thanks for your reply. On firefox it works, on chrome still doesn't."
23 minutes ago
Philip Voice replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"I opened a private chat with one of my members yesterday. Nothing was typed in the chat by either o…"
43 minutes ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Paid Access demo version
"Hi there!
Thanks for your feedback it is highly appreciated.
I have updated already existing sugges…"
58 minutes ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Hi there!
Thanks for useful suggestions! Some of them were completely new and some I have already p…"
1 hour ago
Philip Voice replied to Kyryl_Ning_Support's discussion The long-awaited Search Option is now at your fingertips!
"If anyone is interested if you want to do an off-grid search of your network (or any site) it's eas…"
1 hour ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Hi there,
Unfortunately after the implementation of new chat, we are experiencing the high servers…"
1 hour ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Hi there!
I'm glad that I have been able to help :-) 
But I have posted your suggestion anyway to m…"
1 hour ago
Kyryl_Ning_Support replied to Giovanni Cappai's discussion HTML under header not working :/
"Hi Giovanni,
I have just checked and it seems to be working fine. As far as I can see you have adde…"
2 hours ago
Kyryl_Ning_Support replied to Fabricio Giugni's discussion Powered by Ning How to get it out?
"Hi there!
Unfortunately, at this point, it's forbidden to "Powered by Ning" logo from the footer of…"
2 hours ago
Brandyn Shepherd replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Please add...- Option to see who is online at first glance.- Add text to chat bar that lets users k…"
3 hours ago
J.Ayvar replied to Kyryl_Ning_Support's discussion The long-awaited Search Option is now at your fingertips!
"Yes, the advanced search is very important is a social community. 
When they said they were working…"
4 hours ago
Paul Corona replied to Dr. Krishna Kumari Challa's discussion I am unable to find discussions on my network when I search. Any solutions?
"2 points: 
1) it works


2) if it works does it matter if its Google if it's from Mars?"
5 hours ago
Thisisbully replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"I removed it it has a lot of bugs that needs to be fixed"
6 hours ago
Kos replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Here I thought it was just me.  Yeah, it's been down since late this afternoon............."
6 hours ago
Dr. Krishna Kumari Challa replied to Dr. Krishna Kumari Challa's discussion I am unable to find discussions on my network when I search. Any solutions?
"Thanks but this looks like google search."
6 hours ago
J.Ayvar replied to Kyryl_Ning_Support's discussion Paid Access demo version
"I totally agree with with Jords and Alex ! 
Our company has managed 15 Ning projects on the last fo…"
10 hours ago
Ceddy J replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"So it just dawned on me that you're a CSS Maestro! Impressed by your chops."
15 hours ago
Kyryl_Ning_Support replied to Kyryl_Ning_Support's discussion Chat Feature Update on Ning 3.0 is ready!
"Hi there!
Here is what I have been able to do. all the following code sould be put in custom CSS fi…"
16 hours ago
Ning via Facebook

#Ning #search #news The long-awaited Search Option on Ning 3.0 is here! We are happy to…

Kos replied to Kyryl_Ning_Support's discussion The long-awaited Search Option is now at your fingertips!
"We've been waiting for years................Thank you (new) Ning!  Keep those improvements coming. "
17 hours ago
More…