Steemfriends.org new features: Find articles written with a combination of tags (not just 2) separated by space and in any order, for both written and voted articles

in #utopian-io5 years ago (edited)

Repository
https://github.com/Bulletproofmonk/MySteemitFriends

Merged Pull Request
https://github.com/Bulletproofmonk/MySteemitFriends/pull/25

http://steemfriends.org is a popular tool with approximately 20,000 hits per month.

New Features

You can test out the new feature I have added by getting to the Articles Voted or Articles Written section of Steem Friends.

Click on "User History" on the navigation bar, then click on "Written Articles". This will take you to the Article Search form. Alternatively, just go to this link: http://steemfriends.org/articlelist.php?mode=written

From here, you can see the change I have made to the form. It now allows you to enter a combination of tags into the form to search for the article you want, separated by space, as suggestion by @amosbastian.

Let's say you want to find articles that I have written for all of three tags "utopian-io development steemdev" in the last month, you can simply type exactly that into the textbox and the blue button, as shown below:

You can see that results will show up for these articles which match those 3 tags.

Note that the order of the tags is not important in this search, so they do not have to be typed in that order. You can type development utopian-io steemdev and still get the same result.

The same feature has also been applied to the Voted Articles Search. So if you want to find articles which you have voted in the same tag combinations (order doesn't matter), then simply go to the Voted Articles Search page, located here, also accessible from the navigation bar:

https://steemfriends.org/articlelist.php?mode=upvote

You can see below are the articles I have voted for under the tags Life and Nigeria.

How they were implemented:

articlelist.php:

Support for multiple tag separation in one array
After gathering the tag input from the user, the controller will separate the tags into an array using the PHP Explode function before passing it onto the model and view, removing the need for collecting a separate input for tag2.

articlelistview.php:

Remove tag2 input, lengthen tag1 textbox for multiple tag entry
The tag2 input box has been removed. This is because we will now allow users to enter multiple tags in the tag textbox, separated by space. Explanation to this also provided.

articlelistmodel.php:

searchtag() function written for searching multiple tags in database
Added a searchtag() function for use in both written and voted article modes. It searches through the database for multiple tags by using a for loop to add conditions to SQL. It uses the NEAR function to find matching tags in json_metadata so dApps storing info in json_metadata won't interfere with tag search.

GitHub Account
https://github.com/Bulletproofmonk

Sort:  
  • Good job on all the graphics,
  • Much better way than $tag,$tag2

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 very much helo!

Thank you for your review, @helo! Keep up the good work!

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 utopian!

Great project from Sir @magicmonk I just found this project some mins back. I wish to develop app on Steem one day too. You are appreciated!

thank you horpey! It's not easy, takes a lot of time but fun :)

I hope to find it fun too.

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

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 61726.60
ETH 3041.60
USDT 1.00
SBD 3.86