Home | Join! | Help | Browse | Forums | NuWorld | NWF | PoPo   
dave's ultimate blog!
Recently Added
dave's Reading Room

NuTang Hacks
by: dave

For best viewing, use this url: http://www.nutang.com/articles.php?x=583

What's a NuTang hack? I'm using this term to define a clever trick used on a NuTang member page. These are usually just short, simple CSS or Javascript code. I hope some may be of use!

Any hack requests? Please leave them for me as comments to my weblog entries. Thanks.

Change the "About me" text in your profile.

"About me" is the title of your little autobiography section on your profile page. Changing it is as simple as copying and modifying the code below: <script> aboutme.innerHTML = "Walapalooza"; </script>

Put that into your "The bio! The bio!" textarea on the Profile admin page.

Change the navigation bar colours and such.

To do this, use any/all of the following javascript functions: <script> setNavColor("#006699"); setNavFontColor("white"); setMoonColor("orange"); setNutrolBarColor('white'); setNutrolBarFontColor('#006699'); setNavWidth('100%'); setBannerColor('#BDD1EA'); </script>

Now, just change the colours to those of your liking.
Note: For the setNavWidth function, you can pass either a percentage or a hard number [e.g. setNavWidth("780px")].

How to change the "Be it extremely emotional..." phrase for password-protected entries.

A lot of people have been asking about this. I finally decided to implement a hack for this, heh. It requires a one-liner javascript code and some work on your end.

In your footer, add:

<script> protected_<ENTRY ID #>.innerHTML = "phrase of your choice"; </script>

You will need to locate the . To do this, you can hover your mouse over the "comment!" link. It will be # in comment=#. If you overwrote your status bar message, you can view your source. Right above your password-protected entry, you should see:

<!-- #### ENTRY ID: number #### -->

Move your modules to the right of your entries.

This can be accomplished with some CSS positioning. Here's what you need to add to your .module_heading and .module_content classes: width:250px; position:relative; left:530px;

To your .nublog_title, .nublog_date, and .nublog_entry classes, add:

width:530px; position:relative; left:-250px;

Notes: You most likely already have the width parameter defined, so change the value there. Don't keep two of the same parameters in one class. Also, you may need to tweak the pixel values to fit your design.

Add background music to your page.

I found this code off EffinJOSELL's page. <bgsound src="http://www.foo.com/foo.mp3" loop="infinite">

Change "http://www.foo.com/foo.mp3" to the url of the song you want to play. Yes, this means the music file must already be uploaded somewhere on the Internet. If you don't want the song to be played continuously, you can change "infinite" to an integer value. For instance, change it to "1" if you want to play the song only once.

Change the text "Comment!" located below each weblog entry to a different phrase.

I discovered this ingenious trick on my man swis's page. All you need is a short Javascript snippet: <script> var links = document.getElementsByTagName ('a'); for (var l = 0; l < links.length; l++) { str = links[l].innerHTML; if (str.match (/comment/i)) links[l].innerHTML = str.replace (/comment/i, "Infest me"); } </script>

Copy that code into your footer. Change the phrase "Infest me" to one of your choosing.

Create scrollbars for your longer entries.

Err, not sure what I mean? You can see it in action on Orangepixistix's and Mari's pages. To create this effect, you will need to add parameters into your .nublog_entry style class: .nublog_entry {height: 150px; overflow:auto; ..... } Basically, first, you're adding the height parameter. Next, add the overflow parameter; by setting this to auto, when the height is exceeded, scrollbars will magically appear.
dave's Weblog Site • NuTang.com

NuTang is the first web site to implement PPGY Technology. This page was generated in 0.097seconds.

  Send to a friend on AIM | Set as Homepage | Bookmark Home | NuTang Collage | Terms of Service & Privacy Policy | Link to Us | Monthly Top 10s
All content Copyright 2003-2047 NuTang.com and respective members. Contact us at NuTang[AT]gmail.com.