Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
344 views
in Q2A Core by
hello members .
i want to edit the hot section of my q2a website, so instead of showing the hot questions, it shows the questions that reach X number of votes... that way every time one question reaches that it gets automatically to that page, is that possible ? and what file should look for if i ever wanted to change that ?

1 Answer

+1 vote
by

There is no need to perform a core hack. Or at least you can perform a core hack by means of a plugin. Create an override plugin that overrides function qa_db_hotness_update in file qa-include/qa-db-hotness.php. I guess you could perform an update query that results in a boolean value to determine whether the question has more or less than X votes.

The downside is that I don't think this will only list the ones with more than X but rather this will list them first. Probably, that is enough for you and you don't need to filter the rest of the questions out. If it isn't you might need to modify how data is being selected in that page.

A different alternative, which is the one I would go for, is to disable the HOT section and create a new page plugin that filters only questions with more than X votes.

by
There is no coding associated to that. Just go to Admin -> Pages and remove the check from the Hot page. Save changes and that's it
by
haha , that i already did :p but the queries to calculate the 'hotness' still occur , which puts a load to my website , i meant how to completely remove it :p
by
You can't do that without a core hack. The process to do so is explained in the answer. Btw, I don't think you will get away with removing the update as I guess it is the one responsible of updating view counts and the last view IP for the question. Changing the core's logic to avoid just several additions and multiplications holds a huge risk compared to a few CPU cycles you can save
by
okey thank you ^^ looks like im not qualified enough to do this kind of modifications :p thank you alot for your answers again
...