Go Back   vb.org Archive > Community Central > Community Lounge
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 07-01-2004, 08:31 PM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works for me. though dunno if its accurate.

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

l8er
sonic
Reply With Quote
  #22  
Old 07-01-2004, 08:45 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

-> 218

and in the first query:

-> 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?
Reply With Quote
  #23  
Old 07-01-2004, 08:59 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, interesting...

ah well, just don't care ^^
Reply With Quote
  #24  
Old 07-01-2004, 09:01 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenon
hmm, interesting...

ah well, just don't care ^^
Nice attitude.

I added something to my last post about how we would list them according to count. How can we do that, sir?
Reply With Quote
  #25  
Old 07-01-2004, 09:04 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #26  
Old 07-01-2004, 09:10 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would have thought the wink smilie would have been used more than that
Reply With Quote
  #27  
Old 07-01-2004, 09:16 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this but it wouldn't work.

asort($output, SORT_STRING);
Reply With Quote
  #28  
Old 07-01-2004, 09:17 PM
colicab-d's Avatar
colicab-d colicab-d is offline
 
Join Date: Dec 2002
Location: Glasgow
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm no one likes :hurt: or :beard: what a shame
Reply With Quote
  #29  
Old 07-01-2004, 10:15 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Dean: me, too

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

@Bob: hmm, try just asort($smilie_counts); before the foreach loop
Reply With Quote
  #30  
Old 07-01-2004, 11:49 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenon
@Bob: hmm, try just asort($smilie_counts); before the foreach loop
Thank you, sir. That worked. But I changed it to:

arsort($smilie_counts);

so the highest number would show first.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:35 AM.


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.04280 seconds
  • Memory Usage 2,268KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete