Ning Developer Docs

I know that you can use a stylesheet to select the areas and font, color, etc.
I have received the information on how to do this.
My problem, I can't seem to get it to work.
The last time I made an attempt, it messed up other codes I have in place.
This is how I understand the process;
First Create a Stylesheet
Does the stylesheet need certain opening and closing tags?
Contains .noprint section
Formatting section

Then I needed to add this across my site, to the Head of each page, or to the main head section.
To do this I found the following code to be inserted in the Tracking;
This is what I added;

<?php
XG_App::addToSection("<link rel="stylesheet" href="/print.css" type="text/css" media="print" />");
?>

I then uploaded the print.css stylesheet to the root directory of my site.

<head>
<STYLE TYPE="text/css">
</head>
/* Remove unwanted elements */
#xg, #xn, .noprint
{
display: none;
}

/* Ensure the content spans the full width */
#xg_module_body
{
width: 100%; margin: 0; float: none;
}

/* Change text colour to black */
.lighttext
{
color: #000
}

/* Improve colour contrast of links */
a:link, a:visited, #xg_body a:,
{
color: #781351
}

All I want to print out is the Member content of the My Page, or just the notes text area, maybe both.
I can't even begin to think about doing 2 if I can't get one to work.
Maybe I missed a step or something...............

Is there a way to make this work?

I have followed everything the way it was laid out to me.
I am just trying to make it easier for me and my Members to get a print out.

I know, it is easy to do with the print preview and all, for some of us.
It would be better to just click a link and have it done for you.

Any ideas.
And please, none of this, do this and that crap. Explain what you mean if you comment, PLEASE!

Very frustrated!

Views: 2

Replies to This Discussion

Hi,

I'll try and answer your questions in the order you asked them.

1. Yes, stylesheets need opening and closing tags. Here's a great page that shows you how to setup a stylesheet: http://htmlhelp.com/reference/css/quick-tutorial.html

2. You can technically add a stylesheet anywhere you'd like on a page (it's perfectly fine to add your stylesheet to your network's site tracking code box).

3. CSS will not allow you to print specific variables and data to your pages. CSS controls the formatting of pages, not the actual content. To print out the member count for your network, you'll need to use PHP. You'll need to generate a query using our PHP API to generate a count of your members on your network and print this variable out somewhere. Checkout this page for more info on generating queries using our PHP API: http://developer.ning.com/notes/Querying_the_Ning_Content_Store.

Cheers!
Derrick
Please take another look
I need direction.
I do not get the requirement to receive all the elements and so forth.
Simply want to get rid of everything but the actual note entry
Thanks
I edited my post.

RSS

© 2026   Created by Ning Developer Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service