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

Forum

Hello Creators!

I'm happy to finally provide my very first TIP, and it is HUGE!!

It's not fully functional at the moment, and hopefully by sharing this TIP with you, we will all benefit from it's awesomeness!

So what is the TIP you ask? Well, you're in luck, because I'm here to tell you! :)

How about giving your members the option of selecting style sheets? This will allow for multiple site designs, like for example, having a dark theme, a light theme, and a holiday theme.

Your members can select the appearance of your network that they most prefer, and best of all, a cookie is installed so that your network will always remember their choice of style sheet and load it all the time when they visit!

How freakin AWESOME would that be?

Well, it's possible, I've had it working (somewhat)

I have two things on my own network that are conflicting with this style sheet switching ability.... We'll call it Styleswitcher from here on out, since that's what the creator of this script has called it!


The first conflict, my ningbar. My ningbar is fixed to the top of the screen, (stays in sight always)
but when styles 2 and 3 are selected, the ningbar will not stay fixed, and everything I have in my ningbar scatters.

The second conflict, my jquery tabs. If the page takes too long to load, the jquery script and the styleswitcher script have conflicts, and the jquery tabs will fail.

These above issues will effect many of us that will use this TIP, so in order for it to be complete, we need to work together to figure out how these two conflicts can be solved, so that all of us may benefit from it's greatness.

OK, first off, let's start by linking to the original source of this script. I came across it and many other awesome sites while doing research on the matter.

CLICK HERE to see where I found the scripts.

So the first thing you want to do, is save the two .JS files, and the .CSS files. (view page source of the link above) Call them what you want, and save to your "File Manager."
This is so that everything is hosted by you, and you won't lose function should that guys script source be deleted.

Second, you want to put this into your custom code. (I currently put it at the very bottom, so it loads last, however if the page takes too long, my jquery tabs will not load properly and malfunction)

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
<link rel="stylesheet" type="text/css" href="styles1.css" title="styles1" media="screen" />
<link rel="alternate stylesheet" type="text/css" href="styles2.css" title="styles2" media="screen"
/>
<link rel="alternate stylesheet" type="text/css" href="styles3.css" title="styles3" media="screen"
/>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="styleswitch.js"></script>

Make sure you change the 3 style sheets to your own style sheets,
and change the two .js files to the ones in your file manager.

Then we want to call to the script, and place links somewhere on our network,
so we need to paste this into a text box or ad box somewhere...

<p>Choose a different stylesheet:</p>    
<ul>

<li><a href="serversideSwitch.html?style=style1" rel="styles1" class="styleswitch">styles1</a>

</li>
<li><a href="serversideSwitch.html?style=style2" rel="styles2" class="styleswitch">styles2</a>

</li>

<li><a href="serversideSwitch.html?style=style3" rel="styles3" class="styleswitch">styles3</a>

</li>
</ul>

the only things you want to change with that code (calling to the scripts) is the names
of the links, "style1" and "style2" can be "light" "dark".

That should just about do it... there are conflicts with other javascripts, such as Ningbar
scripts, and jquery tab scripts, so it's not flawless. If you aren't using any other scripts
or jquery, you will likely not have many problems.

Lets work together to work out the kinks, as this my first TIP, please help me to complete it.

Thank you and good luck everyone!

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

Terry Henderson replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"I was on this thread before and started getting the new email - I tried my login and it worked - wh…"
6 minutes ago
Terry Henderson replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"All I know is they contacted me and told my I HAD to upgrade to renew - I told them I didn't want t…"
9 minutes ago
Solael replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"I am not supporting anyone here on this, however there are two sides to every story. No one will di…"
19 minutes ago
Scott Bishop replied to Allison Leahy's discussion What are you most excited about?
"I'm most exited about George H. Compton IV responsive design for N2. Works much better than N3 and…"
33 minutes ago
soaringeagle replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"and to clarify you have a year to a year and 1/2 after stage 3 migration tools aree in place so far…"
35 minutes ago
soaringeagle replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"impossible you absolujtely missunderstood i have both 2.0 and 3.,0 i reneweed both they cannot and…"
37 minutes ago
Strumelia replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"Steve, they were saying that thing about the one year deadline...about a year ago.  But then when t…"
46 minutes ago
steve replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"wow, thats rough terry, they should have at least given you the option to continue on N2.
Thats jus…"
1 hour ago
Donna Mac replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"That is HORRIBLE!  I switched to "monthly" last June because I did not want to get blindsided.  Oth…"
1 hour ago
steve replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"I wish i could remember where i saw this, and i dont know if it still holds true but i read a ning…"
1 hour ago
Terry Henderson replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"I was force out.  When my time came to pay for another year they refused to renew my site as a 2.0…"
1 hour ago
Randy L. Vollett replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"Thank you for the info. :)"
1 hour ago
Strumelia replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"Ok, well just to be clear so people don't panic then:
There is currently NO date given by Ning as a…"
2 hours ago
Randy L. Vollett replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"Sorry, that was the last info I got from my creator some time ago. I have not been here that much t…"
2 hours ago
Solael replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"Since the 3.0 did not come online in August 2014, I doubt we will be forced to do anything this mon…"
2 hours ago
Strumelia replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"Randy where on earth did you hear that?  I think there's no way Ning would 'force' us all to migrat…"
2 hours ago
Randy L. Vollett replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"No, why?"
2 hours ago
Perrie Halpern replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"OMG!"
2 hours ago
Strumelia replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"Randy are you joking?"
3 hours ago
Randy L. Vollett replied to Allison Leahy's discussion Changes to Ning 3.0 Based on Your Feedback
"The last I heard we would be forced to migrate to 3.0 this month. Is this true or did they extend i…"
3 hours ago
More…