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 by magicmonk

View this thread on steempeak.com
· @magicmonk · (edited)
$36.28
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
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.

https://steemitimages.com/0x0/https://cdn.steemitimages.com/DQmZWP3EvqLXaDGDq1AGTQEx1ADoERGLbJhK3cPRtpfE1Z7/image.png

## 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. 

![](https://cdn.steemitimages.com/DQmS3owL9f3ix45uZnU68TJvtHrf7K4tk8mxpwDTs8AWynU/image.png)

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:

![](https://cdn.steemitimages.com/DQmVNfRi1sUUBRXtUTLY9pZjeruSSKxE6gcAfpCx9yEX4uB/image.png)

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

![](https://cdn.steemitimages.com/DQmeJ8zSgvWJXvXdQzAp2o7NTJdENt6MGQSKhbbYU2WLdRp/image.png)

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. 

![](https://cdn.steemitimages.com/DQmYXf5qnk69PqkSNKyxTNd6meE6rzk14jmm9X3NEQA5dxJ/image.png)

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.
![](https://cdn.steemitimages.com/DQmbKP44uM4R1jPJHQq2itZG5wk83xZKZ4xGSCs1kBvjM3x/image.png)

## 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
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 34 others
properties (23)
post_id66,036,424
authormagicmonk
permlinksteemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order
categoryutopian-io
json_metadata{"format":"markdown","tags":["utopian-io","development","steemit","steemdev","steemfriends"],"users":["amosbastian"],"app":"steemit\/0.1","links":["https:\/\/github.com\/Bulletproofmonk\/MySteemitFriends","https:\/\/github.com\/Bulletproofmonk\/MySteemitFriends\/pull\/25","http:\/\/steemfriends.org","http:\/\/steemfriends.org\/articlelist.php?mode=written","https:\/\/steemfriends.org\/articlelist.php?mode=upvote","https:\/\/github.com\/Bulletproofmonk"],"image":["https:\/\/steemitimages.com\/0x0\/https:\/\/cdn.steemitimages.com\/DQmZWP3EvqLXaDGDq1AGTQEx1ADoERGLbJhK3cPRtpfE1Z7\/image.png"]}
created2018-11-14 20:12:03
last_update2018-11-14 20:12:30
depth0
children9
net_rshares53,202,013,925,398
last_payout2018-11-21 20:12:03
cashout_time1969-12-31 23:59:59
total_payout_value27.419 SBD
curator_payout_value8.864 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length3,376
author_reputation263,026,799,189,538
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (98)
@helo ·
$7.84
- Good job on all the graphics,
- Much better way than `$tag,$tag2`


Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/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](https://review.utopian.io/result/3/2301211).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , ,
properties (23)
post_id66,041,800
authorhelo
permlinkre-magicmonk-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181114t224605280z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https:\/\/join.utopian.io\/guidelines","https:\/\/review.utopian.io\/result\/3\/2301211","https:\/\/support.utopian.io\/","https:\/\/discord.gg\/uTyJkNm","https:\/\/join.utopian.io\/"],"app":"steemit\/0.1"}
created2018-11-14 22:46:06
last_update2018-11-14 22:46:06
depth1
children2
net_rshares11,620,114,551,684
last_payout2018-11-21 22:46:06
cashout_time1969-12-31 23:59:59
total_payout_value5.931 SBD
curator_payout_value1.912 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length559
author_reputation119,612,833,307,875
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (10)
@magicmonk ·
Thank you very much helo!
properties (22)
post_id66,043,082
authormagicmonk
permlinkre-helo-re-magicmonk-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181114t231839836z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit\/0.1"}
created2018-11-14 23:18:39
last_update2018-11-14 23:18:39
depth2
children0
net_rshares0
last_payout2018-11-21 23:18:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length25
author_reputation263,026,799,189,538
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
Thank you for your review, @helo! Keep up the good work!
properties (22)
post_id66,157,673
authorutopian-io
permlinkre-re-magicmonk-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181114t224605280z-20181117t071547z
categoryutopian-io
json_metadata{"app":"beem\/0.20.9"}
created2018-11-17 07:15:51
last_update2018-11-17 07:15:51
depth2
children0
net_rshares0
last_payout2018-11-24 07:15:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length56
author_reputation152,913,012,544,965
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@steem-ua ·
#### 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](https://discord.gg/KpBNYGz)**
properties (22)
post_id66,045,747
authorsteem-ua
permlinkre-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181115t003718z
categoryutopian-io
json_metadata{"app":"beem\/0.20.9"}
created2018-11-15 00:37:18
last_update2018-11-15 00:37:18
depth1
children0
net_rshares0
last_payout2018-11-22 00:37:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length288
author_reputation23,203,609,903,979
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@utopian-io ·
$0.10
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](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

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

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
πŸ‘  
properties (23)
post_id66,070,258
authorutopian-io
permlinkre-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181115t125737z
categoryutopian-io
json_metadata{"app":"beem\/0.20.9"}
created2018-11-15 12:57:39
last_update2018-11-15 12:57:39
depth1
children1
net_rshares153,826,142,295
last_payout2018-11-22 12:57:39
cashout_time1969-12-31 23:59:59
total_payout_value0.075 SBD
curator_payout_value0.025 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length591
author_reputation152,913,012,544,965
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@magicmonk ·
Thank you utopian!
properties (22)
post_id66,088,396
authormagicmonk
permlinkre-utopian-io-re-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181115t125737z-20181115t200901204z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit\/0.1"}
created2018-11-15 20:09:09
last_update2018-11-15 20:09:09
depth2
children0
net_rshares0
last_payout2018-11-22 20:09:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length18
author_reputation263,026,799,189,538
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@horpey ·
$0.02
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!
πŸ‘  
properties (23)
post_id66,189,490
authorhorpey
permlinkre-magicmonk-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181117t224753966z
categoryutopian-io
json_metadata{"app":"steemit\/0.1","users":["magicmonk"],"tags":["utopian-io"]}
created2018-11-17 22:47:57
last_update2018-11-17 22:47:57
depth1
children2
net_rshares39,943,781,894
last_payout2018-11-24 22:47:57
cashout_time1969-12-31 23:59:59
total_payout_value0.018 SBD
curator_payout_value0.006 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length140
author_reputation224,445,607,823,384
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@magicmonk ·
thank you horpey! It's not easy, takes a lot of time but fun :)
properties (22)
post_id66,196,878
authormagicmonk
permlinkre-horpey-re-magicmonk-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181118t031308488z
categoryutopian-io
json_metadata{"app":"steemit\/0.1","tags":["utopian-io"]}
created2018-11-18 03:13:12
last_update2018-11-18 03:13:12
depth2
children1
net_rshares0
last_payout2018-11-25 03:13:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length63
author_reputation263,026,799,189,538
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@horpey ·
I hope to find it fun too.
properties (22)
post_id66,206,759
authorhorpey
permlinkre-magicmonk-re-horpey-re-magicmonk-steemfriends-org-new-features-find-articles-written-with-a-combination-of-tags-not-just-2-separated-by-space-and-in-any-order-20181118t090218710z
categoryutopian-io
json_metadata{"app":"busy\/2.5.6","community":"busy","image":[],"users":[],"format":"markdown","tags":["utopian-io"],"links":[]}
created2018-11-18 09:02:21
last_update2018-11-18 09:02:21
depth3
children0
net_rshares0
last_payout2018-11-25 09:02:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length26
author_reputation224,445,607,823,384
root_title"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"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000