Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

simple/advanced search

2006-03-15
2013-05-28
  • Hi there!

    A few questions about the *search.php files:
    - why does the "publication" drop-down list only show items corresponding to records such that their type contains "journal" (refBase 0.8.0, simple_search.php, line 181)?
    - in "selectDistinct" (includes.php), when a user is logged in, $distinctQuery contains this:
    --
    LEFT JOIN $userDataTableName ON $refsTableP
    rimaryKey = $userDataTablePrimaryKey AND $userDataTableUserID = $userDataTableUserIDvalue
    --
    Want is this supposed to do?

    Thank you much in advance for your answer!
    Bye,
    Jean-Marc

     
    • Do you have records of any file type other than journal?  The drop down should list all and only those types you actually use.

       
    • Hi Jean-Marc,

      > - why does the "publication" drop-down list only show items
      > corresponding to records such that their type contains "journal"

      Your observation is correct. This was done in order to prevent the drop down from getting too wide (due to long book titles etc) - some browsers don't have a mechanism to strip parts of very long drop-down items and the drop-downs can easily get half a metre wide... But I understand that this restriction is somehow inconsistent and not fitting for everyone.

      You can remove this resrtiction by adjusting lines 180 and 181 in 'simple_search.php' from:

        "type",
        "\"journal\"",

      to this:

        "",
        "",

      Do the same for lines 357 and 358 in 'advanced_search.php'.

      > - in "selectDistinct" (includes.php), when a user is logged in, $distinctQuery
      > contains this:
      > --
      > LEFT JOIN $userDataTableName ON $refsTableP
      > rimaryKey = $userDataTablePrimaryKey AND $userDataTableUserID
      > = $userDataTableUserIDvalue
      > --
      > Want is this supposed to do?

      refbase stores user-specific fields within a separate table ('user_data'). When querying any of these user-specific fields, this table must be connected with the main table ('refs') via a JOIN. This is done in the SQL part you quote above.

      Matthias

       
    • Thanks for those replies; this is clearer now!

      JM