HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Advanced - Custom search page

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#99407 (In Topic #19537)

Non-joined user

Forgive me if there is any info on this anywhere I can't find it.
I would like to be able to create an advanced search page with search fields based on custom profile fields, is there a way to do this without hacking please?
Back to the top
 
Posted
Rating:
#99408
Avatar

Community saint

You can use a main_search block.

From ocPortal Tutorial: Advanced custom pages of information - ocPortal.com :
Advanced feature. By default, you'd only have one search field on your search block (the "content" field, which will search everything). But if you're doing an advanced search (you've set "Limit To"), then you can allow the user to do more complex searches. Put all the field names you'd like to be searchable, separated with commas; after each add "=The Title The Field Should Have On Your Block". E.g. 'content=Search for,option_11=Favourite food' (this example is for a members search, where CPF ID#11 happens to store the member's food preference). You would find the field names by analysing the HTML on the corresponding full advanced search form. Default: 'content=Search for'.
CPF = Custom Profile Field.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#99409

Non-joined user

Thanks again temp1024, I never found that through all of my searching.
It is going to be extremely difficult for me to get my head around what to do and where and how to go about it, but I will try.
Back to the top
 
Posted
Rating:
#99412
Avatar

If you go to the search module, you'll find an advanced link next to members, and you can just use that. If you want to customise the form, grab the generated HTML, change it, and use it somewhere else.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#99413

Non-joined user

Thank you Chris, appreciated.
I just had a quick look and am struggling with a few Critical error - bailing out problems, just transfered site to Arvixe this week and have a fresh burst of doing what I should have a year ago.
1am now so will have a fresh look tomorrow
Back to the top
 
Posted
Rating:
#99418
Avatar

Ok, please report any errors (assuming they don't obviously match an issue in our bugs database for your version) – we will then look at what it could be.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#99427

Non-joined user

All is good with critical errors Chris, uploaded the hotfixes and that was the issue/s.
I am putting aside the next 3 days to try get my head around creating the type of search page I need, will let you know if I am successful.
Thanks again
Back to the top
 
Posted
Rating:
#99697

Non-joined user

I have got so far with this, by installing Firebug onto Firefox I copied the script so I now have a link in my main menu which takes you straight to an advanced search page where you can search members on their custom profile fields.

I am a bit lost now though, the results show up on a page with no header or side panels, address - my website/data/iframe.php?page=search&type=results&id=ocf_members etc etc etc

I am thinking do I need to create another page and direct the search results to that? or have I lost something in the copying of the script?
Back to the top
 
Posted
Rating:
#99700
Avatar

ocPortal loads some pages within frames, for performance reasons (doesn't have to load the header/footer/panels when grabbing results). Search is one of these. The code you got it from was itself the frame, so it was set to load the results into it's own frame.

If you go to http://yoursite/?keep_no_frames=1 it will temporarily disable frames. You can then grab the form 'action' attribute for search you wanted (one that doesn't load the iframe-friendly results).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#99712

Non-joined user

Thanks again Chris, a handy hint to remember, gave it a go but still have same issue, results landing on a frame with no navigation
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: