Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
306 views
in Q2A Core by

I found those line which they looks unfamiliar to me. So, please explain what do they mean, and what are there purposes. Thanks.

 

        'hot_weight_a_age' => 'Relative weight of last answer age for hotness:',
        'hot_weight_answers' => 'Relative weight of number of answers for hotness',
        'hot_weight_q_age' => 'Relative weight of question age for hotness',
        'hot_weight_views' => 'Relative weight of number of views for hotness',
        'hot_weight_votes' => 'Relative weight of votes for hotness',

2 Answers

0 votes
by

Without looking them up these 5 constants would be all be used in determining a hotness score which questions would be ranked by on the 'Hot' page.

Weights are typically multipliers. So:

hotness score = hot_weight_a_age × age of last answer +
                hot_weight_answers × number of answers +
                hot_weight_q_age × age of question +
                hot_weight_views × number of views +
                hot_weight_votes × number of votes

But remember I haven't looked at the code--this is just the typical way weights work.

0 votes
by
As gtp says they are used in the "hotness" calculation. Those text string though are only shown in the admin area so they are not vital for translation (except for yourself in admin).
...