vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Community Lounge (https://vborg.vbsupport.ru/forumdisplay.php?f=13)
-   -   Most popular smilies (https://vborg.vbsupport.ru/showthread.php?t=66721)

sonic3d 07-01-2004 08:31 PM

works for me. though dunno if its accurate.

http://www.rpgadvance.com/forum/smilies.php

l8er
sonic

Boofo 07-01-2004 08:45 PM

Quote:

Originally Posted by Xenon
try that one:

PHP Code:

<?php
require_once('./global.php');
$smilie_counts = array();
$posts $DB_site->query("
SELECT smilietext, pagetext 
FROM post, smilie 
WHERE pagetext like concat('%', smilie.smilietext, '%') 
"
);
while (
$post $DB_site->fetch_array($posts))
{
$smilie_counts["$post[smilietext]"] += substr_count($post['pagetext'], $post['smilietext']);
}
$output '';
foreach (
$smilie_counts AS $name => $val)
{
$output .= $name ' -> ' $val '<br />';
}
 
print_output($output);
?>


Tahnk you, sir. That seems to be a lot faster than the other query. ;)

The only strange thing is that in your query:

:p -> 218

and in the first query:

:p -> 228

That was the only one that was lower with your query.

Also, how would we order the listing from the highest count to the lowest?

Xenon 07-01-2004 08:59 PM

hmm, interesting...

ah well, just don't care ^^

Boofo 07-01-2004 09:01 PM

Quote:

Originally Posted by Xenon
hmm, interesting...

ah well, just don't care ^^

Nice attitude. :p

I added something to my last post about how we would list them according to count. How can we do that, sir?

Xenon 07-01-2004 09:04 PM

you mean sorting?

well asort() is your friend then ;)

btw, those whoe are intersted in vb.org stats:

Code:

:p -> 9666
;) -> 33380
:D -> 18562
:) -> 72293
:cool: -> 971
:rolleyes: -> 1799
:( -> 11810
:eek: -> 779
:confused: -> 2262
:dead: -> 291
:o -> 1106
:mad: -> 470
:laugh: -> 373
:up: -> 525
:paranoid: -> 308
:cry: -> 517
:pirate: -> 103
:ermm: -> 1368
:banana: -> 1258
:down: -> 20
:squareeyed: -> 220
:angry: -> 83
:surprised: -> 339
:cheeky: -> 224
:bored: -> 113
:beard: -> 62
:bandit: -> 146
:alien: -> 98
:tired: -> 253
:smoke: -> 207
:sleep: -> 68
:rambo: -> 270
:hurt: -> 55
:glasses: -> 162
:devious: -> 247
:classic: -> 478
:chinese: -> 71
:ogre: -> 84
:ninja: -> 199
:nervous: -> 770
:lick: -> 217
:knockedout: -> 195
:speechless: -> 192
:disappointed: -> 403
:cross-eyed: -> 120
:bunny: -> 621


Dean C 07-01-2004 09:10 PM

I would have thought the wink smilie would have been used more than that ;)

Boofo 07-01-2004 09:16 PM

I tried this but it wouldn't work. :(

asort($output, SORT_STRING);

colicab-d 07-01-2004 09:17 PM

hmm no one likes :hurt: or :beard: what a shame :(

Xenon 07-01-2004 10:15 PM

@Dean: me, too ;)

@coli: let's start the initiative to use differnt smilies ^^

@Bob: hmm, try just asort($smilie_counts); before the foreach loop :p

Boofo 07-01-2004 11:49 PM

Quote:

Originally Posted by Xenon
@Bob: hmm, try just asort($smilie_counts); before the foreach loop :p

Thank you, sir. That worked. But I changed it to:

arsort($smilie_counts);

so the highest number would show first. ;)


All times are GMT. The time now is 10:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01075 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete