SteemFriends: Showing articles written by a user between 2 dates

in utopian-io •  20 days ago

Repository

https://github.com/Bulletproofmonk/MySteemitFriends

Merged pull request
https://github.com/Bulletproofmonk/MySteemitFriends/pull/20/files

Http://MySteemitFriends.Online is a popular tool with apporximately 20,000 hits per month. It has recently be renamed to Http://SteemFriends.org for simplicity.

New Features

  • What feature(s) did you add?
    Improved the website to include a new tool for finding and listing articles written by a user between two dates. It was becoming harder and harder to find articles written previously as Steemit only shows the latest articles and takes a long time to scroll back. With this tool, you can find articles you have written a long time ago instantly without waiting for a long time.

Here are the steps to use this tool:

  1. Click on User History button from the navigation bar to arrive at this page. Alternatively you can access this page directly using the URL https://steemfriends.org/articlelist.php
  2. Type in the name of a user. e.g. magicmonk
  3. Choose two dates you want to acquire the list of upvotes or articles. The Articles Written is the new functionality.
  4. Click the blue button saying "List Articles Written". You will see a list of articles written by this user between those two dates, with links to each of the articles for easy access.

  • How did you implement it/them?
    Here are the files I updated:

Articlelist.php
The controller now retrieves an additional input value called Mode. Using the mode, it will either retrieve list of articles written by the user or voted by the user.

Articlelistmodel.php
his file replaces the old upvotehistory.php as the model manages the data for both upvote history and written articles, it makes sense to rename this file. It can now retrieve data for both upvotes and written articles by this user between two dates.

Articlelistview.php
The view has also renamed from articlelist.php to articlelistview.php as it represents the view of the article list page. A new button has been created so that when the user clicks on it, they will get a list of articles they wrote between two dates. The table display will vary depending on which button the user clicked (upvotes or written articles).

GitHub Account

https://github.com/Bulletproofmonk

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thanks for the contribution, @magicmonk! That's definitely a cool feature to have and should be useful to people looking for some older posts - great work!

Some feedback: the indentation of your code seems pretty inconsistent in places. Sometimes it's 2, 4, 8 or even 0. I would recommend you stick to the best practices of each language (e.g. HTML would be 2 spaces).

Another thing I would like to remark is that some comments are not very useful.

if ($voter&&$mode=="upvote") {
// get list of results
$results = $articlelistmodel -> gethistory($date,$todate,$voter);

It should be pretty obvious what you are doing here, so there isn't much need to add a comment describing what is happening imo.

Finally, since you made a pull request (which is great) it would be nice if you could link it in the body of your contribution, but that's just for our convenience of course.

Good to see you back contributing and working on improving SteemFriends!


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

·

Thank you so much amosbastian. Your reviews are very useful and detailed as always. Much appreciated. Have linked the pull request in the article and will definitely watch the indenting and commenting in the future. Thank you very much.

·

Thank you for your review, @amosbastian!

So far this week you've reviewed 11 contributions. Keep up the good work!

Cool, I will check this out!

Hey, @magicmonk!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

·

Thank you so much utopian!

·
·

Now that's more like the kind of rewards your work on these tools should be getting!!

·
·
·

thanks again for your support :) It's good to hear my users speak up a bit.

Hi @magicmonk!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

帅哥/美女!你好!家中可愛的寵物照想要跟大家分享嗎?或是出去玩拍到一些可愛的動物,別忘了到@dpet分享,可以得到@dpet的獎勵喔!如果不想再收到我的留言,请回复“取消”。