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

Changing backgrounds, pictures, CSS or files on a fly

A couple of years ago I started  a project on Minds-eye.ning.com  that rotated backgrounds.  At first I thought it was great but then I noticed that the hits from switching created a massive delay actually Jen’s  from Jen Social pointed it out. I was quite puzzled how to overcome this time delay.  From my experience as a programmer (none Internet) I knew I could change the address of something by giving it a common address but I wasn’t sure how to do it.

A few weeks ago I was experimenting using my webhost “fatcow” and found I could use a common address and overwrite a file (using a common file)  Then I took it a step further and created a php file that listed all my backgrounds then used an if than statement to determine which background should be displayed.  Finally, I had to figure out how I was going to execute the php on a fly and then it all came together.

You can see this by on http://Minds-eye.ning.com in the morning and afternoon, which is when I call the php to change the background.

To make the backgrounds or files change you need to do the following steps.

  • Make sure the background or file works to begin with.
  • Pick a common name for the master file
  • Go to Jen Social and grab these files http://jensocial.com/group/socialnetworktips/forum/topics/scheduling-background-changes
  • Look how it is laid out and edit it to  meet your needs, If you have problems or don’t understand it email me at Ralph_us@hotmail.com I will help you
  • Have some way of running the php file.  If you webhost doesn’t have an auto execute then the next best thing is using http://www.setcronjob.com/ which is a free service to schedule a job.
  • Then add the master common to your CSS so it can switch on a fly and Ning would never know the difference.

Sometimes when you change the background you need to change the xg_body or Nav bar or sign in image this is all done in the same timed program. You just need to test for what background will be used and use a ref to select it and add it to the program.

I get a lot of my code from Jen Social, and if you haven’t joined, it would benefit you to.  Her code is well tested.  So, I have been working on a new CSS layout and grabbed some of her stuff and realized if I do backgrounds on a fly I can change a lot of stuff at once.  Little more advanced lol.

If you decide to use the code, you might want to donate a few dollars to Minds-eye.ning.com and definitely join our site to see talented artist at work. If not it’s okay, since Jen shares with me I will share with you.

 

Ralphy

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

Join Ning Creators Social Network

Votes: 0
Email me when people reply –
 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

Bizz replied to ⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜'s discussion
Friends Module
"Sometimes this happens because it's still in the cache of the browser, if you go to that friends…"
2 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ shared their discussion on Facebook
10 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ liked ⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜'s discussion Friends Module
10 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ posted a discussion
Friends module is not updating when a friend is removed or suspended from the network. In the admin…
10 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ shared their discussion on Facebook
18 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ liked ⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜'s discussion Groups on Creators
18 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ posted a discussion
I made a group for my themes, but its still in pending approval can someone please allow or…
18 hours ago
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ posted photos in Everyday Themes
Wednesday
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ posted a discussion in Everyday Themes
Specify what themes you are looking for and get themes for free.Let us help you find a graphic or…
Wednesday
Rosas † Negras posted a discussion
 textarea.input-full { border: 2px groove #FFF;padding:border: 0px solid rgba(100, 100, 100, 1);…
Tuesday
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ replied to ⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜'s discussion
Need help with CSS and HTML / CSS Code for layout
"I got my buttons coding going and changed on most layouts now. I like it when things glow lol "
Tuesday
⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜ replied to ⚜ 𝔏𝔲𝔠𝔦𝔞 𝔖𝔱 𝔊𝔢𝔯𝔪𝔞𝔦𝔫𝔢 ⚜'s discussion
Need help with CSS and HTML / CSS Code for layout
"I thought you may be an NC for Hire as well? My bad. You could probably be one tho if you wanted to…"
Tuesday
More…

Meanwhile, you can check our social media channels