SimplePortal
Customization => Custom Coding => Topic started by: stanyy on June 21, 2014, 05:00:41 AM
-
Hi,
I am mostly interested in the 'Article Block' and not the article index. The current available options for sorting articles on the article block is:
Latest: Articles are sorted by date post was made.
Random: Articles are sorted randomly
I would like to sort the articles based on the date it was added as an article, that is, the most recently added article would appear at the top of the list.
I am not sure how to go about this, so if anyone can help it would be great.
-
Can I bump this?..... oops :)
-
Have a look at the articles table. (You can use phpmyadmin to inspect it) I do not believe that the date something was made an article is saved.
And so, to make this happen you need to
1) save the date/time that a topic was made an article
2) then rewrite the code that gets the articles and orders them.
-
Your anti-lazybones manner of response was worth it after all :).
I have not been able to access phpmyadmin for a while (blank page), probably something to do with my browser or flash plugin. Anyway, i took a look into the portal files and luckily enough, there were queries for article id. I just changed the sorting from poster time to article id and it worked perfectly. Sweet.
-
That is another way to approach it!
Welcome to the wonderful world of SimplePortal customization!