Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Extension] WeightedWords 1.0

edited November 2006 in Vanilla 1.0 Help
I just uploaded my first extension. I ported a WordPress plugin called Weigthed Words hoping it will be a useful additon to the Vanilla Add-Ons. I got the idea from reading various discussions about tags and keywords. Let me know if you have any problems or have suggestions to make it better.


  • It will be nice, if only it doesn't reparse the database EVERY reload. It's a HUGE amount of CPU time even on my little forum with less than 5k comments...

    For programs like that you shoult consider as a MUST a caching of some sort. :)
  • One thing that might be a problem (as one person has indicated), if you don't have any Discussions or Comments, you'll get an array error. I will need to check for this scenario in the next version of the extension, as well as looking into caching. However, I would like those who have downloaded the ectension to tell me how it is performing on your forum and about how many discussions and comments you have. That would help me a lot. Thanks again for all your help with my first Vanilla extension.
  • theres a problem with öäü words. i cant put them in the overusedwords array
  • If you are using Windows, you can use the Character Map accessory. It should be in your System tools. Start it up. Select Times New Roman as the type style. Find the character. Press the Select button and then the Copy button. The in editting the default.php, you can paste the character. I think this should work.
  • edited July 2006
    Jimw, how often does this thing refresh? I'm thinking of adding it when I reinstall later for some Web 2.0 goodness.

    And how would I exclude certain words?
  • I'm still learning this stuff and how Vanilla works. I believe it will refresh each time you click on Discussions or Categories. But maybe someone smarter than me can advise how an extension is executed (especially with the checking of which page you're on before it goes through it's code). To add more words to exclude, you'll have to edit the default.php and add the words to the overusedwords array.
  • the extension adds a blank line to my atom feed. the öäü words works... thanks!
  • Glad you were able to enter your words. Concerning the feed problem, I don't use feeds at all and so am unfamiliar with how they work, especially in Vanilla. Maybe someone else can advise me so I can try and fix the problem.
  • anyone got a link so i can see this in action?
  • edited July 2006 öhm ... btw: the output of the extension is not valid :(
  • Has anyone who's using this noticed significant slowdowns due to increaded DB access by this extension? Thanks.
  • great ext this is probably aa css question, but my list of weightedwords is leaking off my forum sidebar somewhat (see here ). how can i keep them in the lines? cheers
  • As said, on about ~5.000 comments in the forum the script on my machine takes about 1/2 minutes to open a page, each time, while without it it takes less than 0.5 seconds.

    jimw, look at the RSSCache.class.php contained with my extension to see some code on how to cache things on the filesystem.
  • edited July 2006
    Obvious, I'm applying for membership to your forum so I can see the problem. folletto, thanks. I'll look at your code.
  • Thanks muchly... I hope your application comes through quickly ;)
  • Since this seems to be taking a while, can you email me a screenshot which shows your problem?
  • I've looked at the feedreader extension code and looked at how Vanilla executes things. This may take a little while for me to comprehend this. Since I've worked with WordPress for a lot longer than with Vanilla, I'm trying to understand the differences and why the time to generate the keywords isn't an issue in WP. One other item that I found is the the count when you hover over a word and the actual number of times the word is found in the comments is different. So, please don't use the hover count for anything important until I can figure out the difference.
  • As far as I know, each "cloud" generetor I've used (i.e. UltimateTagWarrior) uses a pre-generated list, stored in a database table, and that's queried only once when it is displayed. The table is refreshed each time a new post is added.
  • did you not apply? my forum shouldn't need a wait period... use this: username: test password: test
  • edited July 2006
    Sorry it took me so long. I used your test id. You need to do two things (which I will put in the next version). First you need to create a style.css file in the WeightedWord folder and put the following in it: p.weightedwordlist { width:180px; } Then edit the default.php in the WeightWord folder and add the $Head line below after the $Panel line (It's at the very end of the php file): $Panel->AddString($wwordsDisplay, 200); $Head->AddStyleSheet('extensions/WeightedWords/style.css'); That should do the trick. Although you may have to adjust the width in the css file. I set it to 180px which is the width of the Lussumo product info.
This discussion has been closed.