Bloggers' Paradise Forum Index Bloggers' Paradise
The forum for personal bloggers to get help and share knowledge on all aspects of blogging.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   Join! (free) Join! (free)
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Announcements
Bloggers' Paradise Closing Down
July's Theme is Independence
June's Theme is Favourite Recipe
May's Theme is Childhood Sweets
April's theme is Three Wishes
Blog-a-long for March - My Best Holiday Ever!
Congratulations to Ruthjen!
PLEASE UPDATE ANY LINKS YOU HAVE TO THE OLD FORUM!
The idea of the Blogalong
Sticky Articles
The Button
Important Links
Blog-a-long
Welcome Pack
Latest Posts
Tracking with StatCounter
Adding a Picture to your Header
Hello from Dani
probably a dumb question, but
May's Theme is Childhood Sweets
"On the Blog" on BBC Radio 2
April's theme is Three Wishes
HTML Validation Service
Blogging Wikia
Blog-a-long for March - My Best Holiday Ever!

More fun WIPS!

 
Post new topic   Reply to topic    Bloggers' Paradise Forum Index -> Code Exchange
View previous topic :: View next topic  
Author Message
jacquie
Site Admin


Joined: 31 Jan 2007
Posts: 102


Location: Salt Lake City, Utah, USA

PostPosted: Sun Feb 04, 2007 12:35 am    Post subject: More fun WIPS! Reply with quote

Terri of http://terriknits.blogspot.com/ has kindly allowed us to use the progress script her DH wrote for her blog so here it is.

There are 4 steps involved in getting this on your blog.

1) You need to save these images and upload then to your photo host in the usual way.



2) Add an HTML side bar element to your blog and put this code in it:
Code:


<!-- Start - place holder where WIPS will be displayed -->
<div id="terriKnitsWIP"><h2 class="sidebar-title">CURRENT WIP'S</h2></div>
<!-- End - place holder where WIPS will be displayed --><script type="text/javascript">


You can change "CURRENT WIP'S" to the title of your choice if you like.

3) Add another HTML sidebar element under the first one and add the code below. Or if you can get to your template code add the code below just after the </body> tag.

Code:

<script type="text/javascript">

//Originally created for Terri Knits (http://terriknits.blogspot.com/)
function createWIP(intPercentComplete,strColor,strDescription){
            intPercentDone = (intPercentComplete * 0.6) + 20
            intBottomMargin = 100 - intPercentDone - 20         

            var str = ""
            str += '<table width="200">'
            str += '  <tr>'
            str += '              <td width="60">'
            str += '                          <div style="position:relative;background-color:'+strColor+';height:'+intPercentDone+'px;width:60px;margin-bottom:'+intBottomMargin+'px;">'
            str += '                                      <span style="position:absolute;">'
            str += '                                                  <img src="YOUR LINK TO needles.gif" style="display:block;"/>'
            str += '                                                  <img src="YOUR LINK TO garment.gif" style="display:block;" onclick="infoWin = window.open(\'\',\'newWindow\',\'width=200,height=100\');infoWin.document.write(\'<H4>WIP Progress:<br />Originally Created for <br /><a href=http://terriknits.blogspot.com target=blank>Terri Knits Blog</a></H4>\')"/>'
            str += '                                      </span>'
            str += '                          </div>' 
            str += '              </td>'
            str += '              <td>'
            str +=                                       strDescription + '<br />'
            str += '                          <span style="color:Red;">'+intPercentComplete+'%</span>'
            str += '              </td>'   
            str += '  </tr>'
            str += '</table>'           

            document.getElementById("terriKnitsWIP").innerHTML += str
}
<!-- Add WIPs here -->
<!--End of WIPs -->           
 </script>



Replace YOUR LINK TO needles.gif and YOUR LINK TO garment.gif with the URLs provided by your picture host for the images you uploaded in step 1).


4) Now for each WIP you want to display add the following line of code between the lines where it says '<!--Add WIPs here -->' and '<!-- End of WIPs -->'

Code:

           createWIP(percent,"colour","name")
 


replacing "percent" with a number 0-99, "colour" with the colour you want it displayed in and "name" with the name of the item you are making.
Here is an example:
Code:
          createWIP(99,"red","sweater")




_________________
Jacquie

Jacquie's Journal
Crafty Threads 'n' Yarns
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Becka



Joined: 07 Apr 2007
Posts: 13


Location: Southeastern USA

PostPosted: Sat Apr 07, 2007 1:37 am    Post subject: Reply with quote

Now, those are just too cute, too!



_________________
Becka
Addicted to the Knit

Whimsical Knitting
Whimsical Knitting Designs
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Bloggers' Paradise Forum Index -> Code Exchange All times are GMT
Page 1 of 1
  

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum
Free Credit Report|Find jobs|Insurance Quotes|Submit articles|Gavin Newsom