Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Zetaboards Modifications
  • [SC] Hows My Post v1
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
  • Pages:
  • 1
  • 2
  • …
  • 7
[SC] Hows My Post v1; ZB Version
Tweet Topic Started: Jul 10 2008, 05:16 PM (3,609 Views)
HolySavior Jul 10 2008, 05:16 PM Post #1
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
Alrighty i have had some requests for this one to be converted so here it is

Hows My Post v1 for ZB!
I have changed it up alittle bit Currently it works for:
Add Reply
New Topic
Compose PM

One Small Error is the Quick Message Compose. which will hopefully be fixed soon.

Creator: HolySavior ( aka Dan T)
Preview: http://s1.zetaboards.com/howsmypost/index/

Instructions:

Add this to your CSS
Code:
 

/* Hows my Post */
.postbar {
border: 1px solid #e0e0e0;
background-color: #F5F5F5;
font-size: 8px;
color: #E0E0E0;
font-weight: bold;
width: 500px;
height: 30px;
background-image:url(http://img370.imageshack.us/img370/2441/testonecopy12ol1.gif);
overflow:hidden;
background-repeat:no-repeat;
text-align:left;
}

.innerbar {
font-size: 12px;
height: 27px;
padding:5px 15px 0px 5px;
background-color: #555555;
background-image:url(http://img370.imageshack.us/img370/6621/testonecopy2yj8.gif);
background-repeat:no-repeat;
overflow:hidden;
}

.howspost {
font-weight:bold;
color:#000000
}


Add this Above <-- Top Menu -->

Code:
 

<script type='text/javascript'>

/* Created by HolySavior of iFusion
Hows My Post v1 ZB
This may not be Edited at all!
*/
function word_count() {
var post_words = document.forms['posting'].post.value.split(/ /g); var count = 0;
for(i=0;i<post_words.length;i++) if(post_words[i].length > 2) count++;

var iObj = document.getElementById('count');
iObj.innerHTML = "<table><tr><td><div id='status_bar_holder' class='postbar'><div id='status_bar' style='width: "+count + "%;' class='innerbar'></div></div></td><td>"+ count+" words over 3 letters</td></tr></table>";
if(count >= 40){ iObj.innerHTML += "<span class='howspost'>Hows My Post? </span><span style='color:#308014'> Excellent Post!</span>";
}else if (count >=10){ iObj.innerHTML += "<span class='howspost'>Hows My Post? </span><span style='color:#308014'> Good Post!</span>";
} else if(count < 10){ iObj.innerHTML += "<span class='howspost'>Hows My Post? </span>You can do better than that!";
}
}

function check_count(){
var post_words = document.forms['posting'].post.value.split(/ /g); var count = 0;
for(i=0;i<post_words.length;i++) if(post_words[i].length > 2) count++;
if(count < 6){
return confirm("Post Length Alert!!\r\n\r\nYour post has only " + count + " words with over three letters. Are you sure you want to add it?");
}
}

var hows_my_post = {
init: function(){
if(location.href.match(/post/) || location.href.match("msg")){
document.getElementById("c_post").innerHTML += "<br/><div id='count'><span class='howspost'>Hows My Post? </span></div>";
}

if(document.forms['posting']){
if(document.getElementById('count') )

document.forms['posting'].post.onkeyup = function(){ word_count(); }
if(location.href.match("mode=")){
document.forms['posting'].post_submit.onclick = function(){ return check_count(); }
}
if(location.href.match("msg")) {
document.forms['posting'].submit.onclick = function(){ return check_count(); }
}
}
}
};

</script>


Add this after <--board -->
Code:
 

<script type='text/javascript'>
hows_my_post.init();
</script>
Edited by Reid, Jun 15 2009, 08:12 PM.
Offline Profile Goto Top
 
ninjawolf71 Jul 31 2008, 08:46 PM Post #2


Posts:
6
Group:
Member
Member
#388
Joined:
Jul 31, 2008
wow thanks
Offline Profile Goto Top
 
Kyaizen Aug 6 2008, 09:02 PM Post #3


Posts:
2
Group:
Member
Member
#486
Joined:
Aug 6, 2008
Coding language
ASP.Net
I like this one a lot, thank you.
Offline Profile Goto Top
 
GreNade Aug 19 2008, 07:01 AM Post #4


Posts:
1
Group:
Member
Member
#623
Joined:
Aug 16, 2008
Coding language
Ruby on Rails
nice code ^^
Offline Profile Goto Top
 
Kotton Dec 1 2008, 05:30 AM Post #5

Posts:
60
Group:
Banned
Member
#1,668
Joined:
Dec 1, 2008
freakn phenominal! thanks again-
Offline Profile Goto Top
 
HolySavior Dec 1 2008, 01:48 PM Post #6
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
thanks guys glad you enjoy it.
Offline Profile Goto Top
 
djjordie Dec 5 2008, 08:45 PM Post #7
Member Avatar
Djjordie

Posts:
57
Group:
Member
Member
#1,694
Joined:
Dec 5, 2008
Coding language
HTML/CSS
OMG thanks sooo much Holy Saviour your a legend no wait a Holy Saviour !!


In the second code you gave us it says
Quote:
 
This may not be Edited at all!
can we edit how many post equals excellent, good and you can do better e.s.t, not the copyright of course?
And if we are allowed would we change the blue text in the following code to do so?

<script type='text/javascript'>

/* Created by HolySavior of iFusion
Hows My Post v1 ZB
This may not be Edited at all!
*/
function word_count() {
var post_words = document.forms['posting'].post.value.split(/ /g); var count = 0;
for(i=0;i<post_words.length;i++) if(post_words.length > 2) count++;

var iObj = document.getElementById('count');
iObj.innerHTML = "<table><tr><td><div id='status_bar_holder' class='postbar'><div id='status_bar' style='width: "+count + "%;' class='innerbar'></div></div></td><td>"+ count+" words over 3 letters</td></tr></table>";
if(count >= 40){ iObj.innerHTML += "<span class='howspost'>Hows My Post? </span><span style='color:#308014'> Excellent Post!</span>";
}else if (count >=10){ iObj.innerHTML += "<span class='howspost'>Hows My Post? </span><span style='color:#308014'> Good Post!</span>";
} else if(count < 10){ iObj.innerHTML += "<span class='howspost'>Hows My Post? </span>You can do better than that!";
}
}

function check_count(){
var post_words = document.forms['posting'].post.value.split(/ /g); var count = 0;
for(i=0;i<post_words.length;i++) if(post_words.length > 2) count++;
if(count < 6){
return confirm("Post Length Alert!!\r\n\r\nYour post has only " + count + " words with over three letters. Are you sure you want to add it?");
}
}

var hows_my_post = {
init: function(){
if(location.href.match(/post/) || location.href.match("msg")){
document.getElementById("c_post").innerHTML += "<br/><div id='count'><span class='howspost'>Hows My Post? </span></div>";
}

if(document.forms['posting']){
if(document.getElementById('count') )

document.forms['posting'].post.onkeyup = function(){ word_count(); }
if(location.href.match("mode=")){
document.forms['posting'].post_submit.onclick = function(){ return check_count(); }
}
if(location.href.match("msg")) {
document.forms['posting'].submit.onclick = function(){ return check_count(); }
}
}
}
};

</script>
djjordie
Edited by djjordie, Dec 5 2008, 08:53 PM.
Posted Image
DJJORDIE
Offline Profile Goto Top
 
HolySavior Dec 5 2008, 10:56 PM Post #8
Member Avatar
Modifying The World Around You

Posts:
2,488
Group:
Distinguished Coder
Member
#7
Joined:
Jul 2, 2008
Coding language
Everything
sure just leave my copyright in
Offline Profile Goto Top
 
djjordie Dec 6 2008, 12:16 AM Post #9
Member Avatar
Djjordie

Posts:
57
Group:
Member
Member
#1,694
Joined:
Dec 5, 2008
Coding language
HTML/CSS
Cool Thx Holy Saviour This is gonna be awsome. And guess what????? This post is a "Hows My Post? Good Post!" Lol :wub: :) :D

Posted Image
DJJORDIE
Offline Profile Goto Top
 
Keanu Stryker Dec 6 2008, 09:49 PM Post #10


Posts:
6
Group:
Member
Member
#1,713
Joined:
Dec 6, 2008
This code is very good.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Zetaboards Modifications · Next Topic »
Locked Topic
  • Pages:
  • 1
  • 2
  • …
  • 7

Track Topic · E-mail Topic Time: 7:49 PM Jul 10
Hosted for free by ZetaBoards · Privacy Policy