2005
How to Combine CA-Credits with Random Words Plugin
Sponsored Links
Couple days ago, Ozh released a nice plugin called Random Words. This useful multi-purpose plugin is used to display random text (not words actually :p ) from a specified list. You can use it to display random quotes, random verse, random image, etc.
On Random Words post, RaynerTheApe commented on how to combine Random Words with my CA-Credits plugin. I think it’s a nice idea, although CA-Credits itself already support random credit displayed :p
So here’s how you do it (assumed that both plugins already installed):
- Create list for CA-Credits from Options - Random Words. Basically, you only need to create 2 list, one to replace $before parameter and another for $after parameter. But if you like, go ahead and also make a list for $zero, $one, and $more parameter. I named the list ‘credits_before‘, ‘credits_after‘, ‘credits_zero‘, and so on.
Sample for ‘credits_before‘ list:
Hello
Hi
Greetings
Ahoi
Hola
ExcellentSample for ‘credits_after‘ list:
. Thanks for leaving comment!
. Thank you very much.
. Please leave your comment too!Notice that you can also insert CA-Credits specific pseudo-keyword on Random Words list. - Now replace your CA-Credits function call, with:
[php]< ?php ca_credits_custom( wp_ozh_randomwords('credits_before',0) . ' ', wp_ozh_randomwords('credits_after',0) . ' ', ', ', ', and ', 3, 40, '%name%’, wp_ozh_randomwords(’credits_zero’,0) . ‘ ‘, wp_ozh_randomwords(’credits_one’,0) . ‘ ‘, wp_ozh_randomwords(’credits_more’,0) . ‘ ‘); ?>[/php]
If your CA-Credits version is less than v1.0 , simply replace ca_credits_custom() with ca_credits(). Also, if you only specify ‘credits_before’ and ‘credits_after’ list, just enter the first 2 parameter and ignore the rest. - Done! :))
Hope it helps :d
And while you're here, why don't you check out our other articles:
Pssst! Most people are coming to this page searching for: 




































