Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Show love!

Credits go to 23yrold3yrold, Archon, Avenger, BAF, Bob, Bruce Perry, Ceagon Xylas, CGamesPlay, crazy_k, Dennis, FMC, gnolam, Goalie Ca, GullRaDriel, HardTranceFan, HoHo, Inphernic, ixilom, Jakub Wasilewski, Johan Halmén, Karadoc ~~, Kibiz0r, Kikaru, le_y_mistar, LennyLen, madpenguin, manjula, Matt Smith, Matt Weir, Matthew Leverton, MiquelFire, miran, Mokkan, nonnus29, OICW, Onewing, Paul whoknows, Rampage, randilyn, ReyBrujo, Richard Phipps, Ron Ofir, Samuel Henderson, Sevalecan, SonShadowCat, Steve Terry, Steve++, Thomas Fjellstrom, and Trezker for helping out!
This thread is locked; no one can reply to it. rss feed Print
Show love!
BAF
Member #2,981
December 2002
avatar

It has 189 now. :P ... make that 190.

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

This thread has 188 smilies in it :-X

Does that skip quotes? Also, does it count all pages?

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Rampage
Member #3,035
December 2002
avatar

Quote:

.... you have a smiley counter?

Old news.

-R

Johan Halmén
Member #1,550
September 2001

>:(
This is a frownie. It counts as -1 smilies.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

Does that skip quotes? Also, does it count all pages?

It looks at all <img> tags on the page, no matter where they are. And I have paging disabled.

LennyLen
Member #5,313
December 2004
avatar

Quote:

It looks at all <img> tags on the page, no matter where they are.

Which means it also includes the ones below the quick reply box.

ImLeftFooted
Member #3,935
October 2003
avatar

Quote:

Which means it also includes the ones below the quick reply box.

Yep, but if I explained that it would make it seem less cool.

BAF
Member #2,981
December 2002
avatar

So it counts more than smileys, it will also count img tags.
[edit] What about avatars?

bamccaig
Member #7,536
July 2006
avatar

It actually only counts images in the /forums/smileys directory, or more specifically images whose src property contain the text "/forums/smileys" effectively counting only smileys. If it includes those 16 from the Post Reply section (and it appears to) then you could easily exclude them or subtract them when applicable.

For example:

1/*
2 * Name: csmiley
3 * Author: Dustin Dettmer
4 * Modded by: bamccaig
5 * Version: 0.31 ;)
6 * Notes: I think it works... :) Use at your own risk... ::)
7 */
8function csmiley_load()
9{
10 var strSmileyDirectory = "/forums/smileys";
11 var tblThreadTopic = null;
12 var imgImageTagArray = null;
13 var tdTitleBar = null;
14 var intCount = 0;
15 
16 // If the thread-topic table doesn't exist then we exit immediately.
17 if((tblThreadTopic = document.getElementById("thread-topic")) == null)
18 return;
19 
20 // If there are no <img> tags we exit immediately.
21 if((imgImageTagArray = document.getElementsByTagName("img")) == null)
22 return;
23 
24 /*
25 * Loop through the image array and add one to the smiley count for every
26 * image whose src property contains the text "/forums/smileys"
27 * (i.e. every image in the smileys directory).
28 */
29 for(var i=0; i<imgImageTagArray.length; i++)
30 if(imgImageTagArray<i>.src.indexOf(strSmileyDirectory) != -1)
31 intCount++;
32 
33 /*
34 * If the tr-smiley row exists we subtract 16 from the count to account for
35 * the "Add Reply" smileys.
36 */
37 if((document.getElementById("tr-smiley")) != null)
38 intCount -= 16;
39 
40 // Get a reference to the "title bar" cell.
41 tdTitleBar = tblThreadTopic.getElementsByTagName("td")[0];
42 
43 // Append our smiley count to the title bar cell.
44 tdTitleBar.innerHTML += ' <img src="/forums/smileys/lipsrsealed.gif" alt="csmiley v0.31" /> x' + intCount;
45}
46 
47// Register the csmiley_load function with the onLoad event of the... doc object... :-/???
48doc.add_onLoad(csmiley_load);

My initial attempts to dynamically count smileys in the "Add Reply" section failed so it's hard coded for now... :-/ There is the possibility that A.cc has other images in use from the forums/smileys directory, but that would just be illogical. ;)

wearetheborg
Queen of the Universe
June 2003

Will ya stop pooping on my thread? Talk about your nerdisms in another thread! This is a thread about love, friendship and affection.

I appreciate myself because without me, this whole forum would die die die. I am the best.

__________________
You!!... Off my planet!!

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Will ya stop pooping on my thread? ... This is a thread about love, friendship and affection.

If we love, are affectionate towards, and are friendly with, t3h poop, can we go back to that?

BTW, I love the artists around here who can actually make some creative media of some kind. That includes the modelers, the drawers, the musicians, etc. Games aren't nearly as good without cool media.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Richard Phipps
Member #1,632
November 2001
avatar

I agree with Diana (regarding her first sentence). Let's get back to some hippy love around this forum!

Bruce Perry
Member #270
April 2000

Diana, without these fine soldiers, your thread would be dead by now. Love gets boring after a while if there's nothing such as a healthy amount of geekiness to fuel it. ;)

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Richard Phipps
Member #1,632
November 2001
avatar

Bruce Perry
Member #270
April 2000

I said "a healthy amount", and I also said "such as" :P Now wet's take a dip in de stwawbewwy wiver~ YAAAAAY! <3

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Richard Phipps
Member #1,632
November 2001
avatar

Any amount of geekiness is undesirable.

Albin Engström
Member #8,110
December 2006
avatar

I love you..

wearetheborg
Queen of the Universe
June 2003

Richard said:

I agree with Diana (regarding her first sentence).

Um... What's wrong with my other sentence?? ???

__________________
You!!... Off my planet!!

Richard Phipps
Member #1,632
November 2001
avatar

Perhaps I should have said the first paragraph..

Quote:

I appreciate myself because without me, this whole forum would die die die. I am the best.

:D

wearetheborg
Queen of the Universe
June 2003

Exactly... What's wrong with the last part of my post ya hoser?? >:(

__________________
You!!... Off my planet!!

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

This is a thread about love, friendship and affection.

Quote:

What's wrong with the last part of my post ya hoser?? >:(

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Richard Phipps
Member #1,632
November 2001
avatar

ImLeftFooted
Member #3,935
October 2003
avatar

wearetheborg said:

ya hoser?? >:(

:-X What happened to all the love in the air?

Rampage
Member #3,035
December 2002
avatar

Love in this thread is defined as "what Diana wants it to be". She's the Queen of the universe, after all.

-R

MiquelFire
Member #3,110
January 2003
avatar

I love my kitty!

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo



Go to: