OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Modify search form

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

Modify search form

Postby ajspadial » Tue May 06, 2014 5:57 am

Hi,

I'm starting to write some mods for OJS. I have managed to make some work like https://github.com/pkp/ojs/pull/177 although I think I did something wrong with the merges and commit, and the thread is a bit dirty.

The next task I want to accomplish is modify the search form (searching for a submission), to add a 'I feel lucky' checkbox that allow to list results even if I get only one result, or to move to the first submission listed even if many are founded.

I have no clue where to start modifying the form. Could anyone help, please?

Best regards,
ajspadial
 
Posts: 32
Joined: Tue May 06, 2014 5:16 am
Location: Madrid, Spain

Re: Modify search form

Postby asmecher » Tue May 06, 2014 8:12 am

Hi ajspadial,

Where are you getting stuck? Have you located the form's template file and the class that handles it on the PHP side? If not, we can start there.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm

Re: Modify search form

Postby ajspadial » Tue May 06, 2014 10:29 am

Hi Alec,

That's exactly what I'm looking for. Could you point them out for me, please?

Thank you, very much.
ajspadial
 
Posts: 32
Joined: Tue May 06, 2014 5:16 am
Location: Madrid, Spain

Re: Modify search form

Postby asmecher » Tue May 06, 2014 10:40 am

Hi ajspadial,

For the small search form on the sidebar, the template is implemented in plugins/blocks/navigation/block.tpl.

For the main search form, see templates/search/search.tpl.

The search submit is handled in pages/search/SearchHandler.inc.php.

Note that these are overridden if you're using the Lucene plugin, but I suspect that's not the case.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm

Re: Modify search form

Postby ajspadial » Fri May 09, 2014 3:01 am

I want to change the search form in the Editor Submission search (and probably the rest of submissions searchs)

It seems to be a different template that the one you showed me. Could you help with that one, please?

Thank you very much.
ajspadial
 
Posts: 32
Joined: Tue May 06, 2014 5:16 am
Location: Madrid, Spain

Re: Modify search form

Postby asmecher » Fri May 09, 2014 9:50 am

Hi ajspadial,

Ah -- yes, the editor search form is implemented separately from the public search area.

See templates/sectionEditor/index.tpl and templates/editor/index.tpl for the search templates; the search operations are implemented in pages/sectionEditor/SectionEditorHandler.inc.php and templates/editor/EditorHandler.inc.php in the "index" functions (respectively).

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron