We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Groups of users as a saved search on a specific page ? | Forum

Topic location: Forum home » Support » General Questions
Carsten
Carsten Dec 19 '16
Hi

Is it possible to have a group of users shown on a page permanently with a link in the menu ?

My setup is that the users are shops and i would like a search for a specific type of shops to be on its own page with a menu link, so that that page will always show the list of bakeries. Another one will show the list of grocery stores a.s.o.

All the best
Carsten
Aliya Team
Aliya Dec 22 '16
possible.

options:
- custom code modification
- third party plugin ( try browsing at Store and see whether you can modify any existing plugin to fit your needs).
- create a page manually in HTML ( either as .html file or as local page via Admin panel >> Pages >> Manage pages). In this case you will need to design whole content manually.
Carsten
Carsten Dec 23 '16
So in reality it's not possible be course i need to do a lot of coding to get it to work.

I'm new to Oxwall, have for many years bin using Wordpress. What is the best and/or easiest way to make it work ?

What is the call to the database when i tick off a search field for ex. Bakeries and how is the results page created. I figure that must be the way to go.
Carsten
Carsten Jan 1 '17
Isn't there anyone who can point me in the right direction, so that i can build those pages ?

I keep going through all the files and can't find where the search is done, and therefor can't find how it gets to the result page.
dave Leader
dave Jan 4 '17
Hi Carsten,

Since you need to have relational data from the database associated with this project your not going to be able to do this just by creating a page in admin.  Yes you will need to know some PHP and you will need to do a bit of coding both in PHP and also in HTML in order to get what you need. 


Its not a huge project and as long as you have a basic understanding of how plugins work you should be able to write your own plugin to do this yourself.  


The only thing i can even think of right now outside of doing a special plugin and to even be some kind of listing is maybe to have each store type as a group using the groups plugin.  A group for bakeries, a group for grocery stores and so on... 


As a follow up on this, and if you only need just very basic data, what about adding a profile question which asks each user what type of business they are, ie  grocery store, restaurant, bakery.   Then on that profile question config just check the box that says on search, which will make this a searchable value.  Then you should be able to search bakery and get a list of the bakery users. 


You will be limited to 31 values on the options list but if pressed you could just do one question for A-H and another one from I-Z  something like that. 


Hope that helps... If you need more clarity just ask :)

The Forum post is edited by dave Jan 5 '17
Carsten
Carsten Jan 5 '17
Thank you for your reply Dave :)

The setup is like that, that there's a profile question that defines shop/business type, bakery, grocery a.s.o. That's why i was interested in how the search was performed and the result page was made.

On my search through the files, i found the user list page. If i could use that code in an external page and set the output/result to ex. Bakeries, but i couldn't get it working. And in the customizing area i can only use html, so i can't put in all that php if i were to create an internal page.

The easiest way, as i see it, is to use the user list or the result page, but i haven't found the result page yet. I'm also trying to figure out how the pages are created, so i get the header and the footer and all, so just change the content(result of search).

I have read the post about creating a plugin so that the page get hidden for not logged in users, i don't need that. The pages needs to be visible for all users, guest a.s.o.
dave Leader
dave Jan 6 '17
Pages are created via smarty.  What happens is that the data is set to vars within php files, then those vars or arrays are assigned to a smarty var which is then used in the html file to build the output. 


You can build your little php script outside of oxwall and have it displayed as a page. You will need to let oxwall know its ok to use those files by adding the folder to your htaccess file. 


https://developers.oxwall.com/forum/topic/47116


I have done this process in the past with a financial pledge setup, the php is totally outside of oxwall and the results are displayed as a page within oxwall as a added page using an external page option.

Carsten
Carsten Jan 7 '17
Hmm, okay. Not at all like Wordpress this here ;-)

Is there a place where i can read about how it's used according to Oxwall, that Smarty thing ?

And do you know where the result page is created, so i can get my hands on the code that displays the search ?

And also, if the query comes from another file, where that is too ?
dave Leader
dave Jan 7 '17
I dont know of anything with Oxwall specifically but here is a basic video on smarty. 


https://www.youtube.com/watch?v=ITLx5lNMS-U


Have you watched these videos of mine as well 


https://developers.oxwall.com/forum/topic/48472  you will understand alot more once you watch those videos.


check 

ow_system_plugins/base/controllers/user_search.php 

 

there should be an html file in the views folder there too 

ow_system_plugins/base/views/contollers/user_search_result.html


So that means that the DB stuff should be in the users bol service file, user file, and dao file in the bol folder.



Carsten
Carsten Jan 7 '17
Thank you Dave :)

I'll watch the video on Smarty.

I've started watching your videos, so i'll finish them now. And thank you for the file placements, i'l go have a look :)
Carsten
Carsten Jan 9 '17
Well, i tried getting through the Youtube's, but he kills people. But on the second one there was another one in the list: https://www.youtube.com/watch?v=5xLfvY8upsQ

He speaks like a human being :)

Then there's this one here. He brings PHP to the table. He's a little fast, but it's useful in understanding Smarty: https://www.youtube.com/watch?v=j7IYU_XLpxc