Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 12-22-2002, 08:25 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, this would be the only way to keep it less server intensive, but it wouldn't work for older posts....

ok you can run the intensive algorithm first to get the ammount for all old posts.
Reply With Quote
  #12  
Old 12-27-2002, 08:42 PM
zajako's Avatar
zajako zajako is offline
 
Join Date: Jan 2002
Location: a place not to far away
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have an idea that would make this more do able.

make a sql entry everytime a smily is parsed, it would ad multiple more queries per post, but if optimized sql wise should be able to get it down pretty low. the porblem woul dthen be remodling the smilie system to fit this.
Reply With Quote
  #13  
Old 12-28-2002, 11:42 AM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know about a Statistic (PHPBB) with that smiliething.
But there you have the Top10 Smilies.
Reply With Quote
  #14  
Old 12-28-2002, 03:46 PM
corsacrazy's Avatar
corsacrazy corsacrazy is offline
 
Join Date: May 2002
Location: london
Posts: 854
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

top 10 smilies is also good coz then i could break it down just to display top one smilie but u say thats 4 phbb
Reply With Quote
  #15  
Old 12-29-2002, 04:08 PM
fury's Avatar
fury fury is offline
 
Join Date: Oct 2001
Location: Indiana
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was thinking of doing something similar to this, except I would only count the amount of posts that contain each smilie, not how many times the smilie appears.
Reply With Quote
  #16  
Old 12-29-2002, 05:40 PM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is the smilie-code from PhbBB.
Maybe we could re-write this for vb?!?

PHP Code:
// DB queries for top Smileys: 

$query "SELECT * FROM smiles GROUP BY smile_url"

$all_smileys mysql_query($query$db); 

$topten = array(); 
$total_smiles 0

while (
$aktsmile mysql_fetch_array($all_smileys))  { 

     
$aktcount 0
     
     
    
$query2 "SELECT post_text FROM posts_text 
              WHERE post_text LIKE '%
$aktsmile[smile_url]%'"
               
    
$all_posts mysql_query($query2$db);           
    while (
$aktpost mysql_fetch_array($all_posts)) { 

         
$aktcount $aktcount substr_count ($aktpost[post_text], $aktsmile[smile_url]); 
    }   
     

    
$topten[$aktsmile[smile_url]] = $aktcount
    
$total_smiles $total_smiles $aktcount
     
    } 
Reply With Quote
  #17  
Old 12-29-2002, 06:15 PM
fury's Avatar
fury fury is offline
 
Join Date: Oct 2001
Location: Indiana
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made a query that does it. (counting how many posts contain each smilie)

select count(postid) as count,smilie.smilietext from post,smilie where post.pagetext like concat("%",smilie.smilietext,"%") group by smilie.smilietext order by count;

Warning, this query can take a few minutes and may cause your server to stop responding. Don't run it from phpMyAdmin.

It could possibly be run like once a week or so and the results put in its own table (but it would require being able to disable the exec time limit on a per-file basis) which could then be called in a fraction of a second each time the page is displayed
Reply With Quote
  #18  
Old 12-30-2002, 10:31 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@fury: sorry to say, but your query is wrong. it just count how many posts contain a special smilie, but not how ofter the smilie is in this post...

@Minifreunde: yes, this is the code i was thinking for.
On great boards this will be very intense, because it goes more than once through nearly the whole posttable
not a good idea if you have over a million posts
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 08:08 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.04987 seconds
  • Memory Usage 2,242KB
  • 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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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