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

NC for Hire

Hi all,

Here's a quick and easy tip born out of a request from Kos to limit the number of characters that members can type into the title box on blog posts and forum discussions on Ning 3.0.

Kos's thinking was that Google prefers shorter titles for your content. In this example we set the character limit to 65 (this can be changed in the green instances below). I've also added a Twitter-like character countdown which wasn't in Kos's initial request but hey, slow day. :-)



There are two bits of code below, both of which can be put in your Social Site Manager > Custom Code > End of Page Code section:

BLOGS:

<!-- Character Count Limit Blog Titles www.SweetPotato.me.uk -->
<script>
x$('.entryEditPage-title.input-wide').attr( "maxlength", "65" );
x$('.entryEditPage-title.input-wide').after('<p id="SP_Char_Count"></p>');
x$('.entryEditPage-title.input-wide').keyup(function () {
    var SPleft = 65 - x$(this).val().length;
    if (SPleft < 0) {
        SPleft = 0;
    }
    x$('#SP_Char_Count').text('Characters left: ' + SPleft);
});
</script>

FORUMS:

<!-- Character Count Limit Forum Titles www.SweetPotato.me.uk -->
<script>
x$('.entryEditPage-title.input-full').attr( "maxlength", "65" );
x$('.entryEditPage-title.input-full').after('<p id="SP_Char_Count"></p>');
x$('.entryEditPage-title.input-full').keyup(function () {
    var SPleft = 65 - x$(this).val().length;
    if (SPleft < 0) {
        SPleft = 0;
    }
    x$('#SP_Char_Count').text('Characters left: ' + SPleft);
});
</script>

Notes: The selectors used for the text areas we are targeting here are .entryEditPage-title.input-full and .entryEditPage-title.input-wide which will also target other input areas like photos. The css gurus among you will be able to target sections of your site more specifically if you want to exclude photos or particularly content instances. In its rough and ready state this is a "catch all" solution.

Enjoy!

SP

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 –

Replies

  • Oh wow, how cool is that!  Thank you SP

  • NC for Hire
    :-)
  • Very nice tip!

  • Nice tip bro :)

  • ok you knew someone was going to be a pain in the arse - it may as well be me.  If you get a spare few minutes, could you adapt this for 2.0?  There are still a boatload of existing 2.0 sites which I'm sure could utilize this.  I fiddled around with .textfield but couldn't get it to work.  Yeah, I stink. *lol*  Thanks SP

  • Yahoo!  I got it.  I was missing a period.  This works for both forums and blogs in 2.0.  Thanks for teaching me a little more SP.   You rock!

    <script>
    x$('.textfield').attr( "maxlength", "65" );
    x$('.textfield').after('<p id="SP_Char_Count"></p>');
    x$('.textfield').keyup(function () {
        var SPleft = 65 - x$(this).val().length;
        if (SPleft < 0) {
            SPleft = 0;
        }
        x$('#SP_Char_Count').text('Characters left: ' + SPleft);
    });
    </script>

This reply was deleted.
 

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

Birthday Gift Network updated their profile
Thursday
Birthday Gift Network updated their profile photo
Thursday
Paul Corona replied to Donna MacShoe's discussion
Ning Support phone number for my 20 yr old site
"NING support is useless anymore...I have respnded three times asking questins to a message they…"
Jan 15
Alex - Rosas † Negras posted a discussion
due to personal problems I have not been online anymore, I apologize so much and I am happy to be…
Jan 14
Alex - Rosas † Negras replied to Kos's discussion
Help w/Chat. Ning Support A No Go
"IL PROBLEMA È SEMPRE LO STESSO, NING GLI OPERATORI... DEVONO ELIMINARE I COOKIE SUL VOSTRO SITO"
Jan 14
Vlada replied to Kos's discussion
Help w/Chat. Ning Support A No Go
"I'm no IT expert by any means, but out of curiosity have you tried entering the chat room from the…"
Jan 8
Vlada replied to Eva Libre's discussion
Update, Merry Christmas
"Then add the recent price hike email that Ning has notified to be taking effect soon, I'm not…"
Jan 8
Kos posted a discussion
In November we began to notice Chat "freezing up" and when we would refresh the page, it would…
Dec 27, 2024
Eva Libre posted a discussion
UpdateMerry ChristmasToday I woke up totally frustrated and determined to do something.At the end…
Dec 26, 2024
Eva Libre liked Eva Libre's discussion Ning 3.0 is antisocial!
Dec 25, 2024
Eva Libre updated their profile
Dec 25, 2024
Eva Libre replied to Eva Libre's discussion
Ning 3.0 is antisocial!
"Update
Merry Christmas
Today I woke up totally frustrated and determined to do something.
At the…"
Dec 25, 2024
More…

Meanwhile, you can check our social media channels