Announcement

Collapse
No announcement yet.

Conditional for search, language

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conditional for search, language

    1. What would the conditional be for showing something in the search page, except for when there are no search results?

    2. Is there a conditional for language id?

    Thanks
    Vote for these issues:

  • #2
    1) Use this conditional:

    Code:
    <if condition="THIS_SCRIPT == 'search'">
    
    </if>
    2) Use this conditional:

    Code:
    <if condition="$bbuserinfo[languageid] == X">
    
    </if>
    Where X is the languageid you want to check for.

    Comment


    • #3
      Many thanks for that.

      No problem with the language conditional, but the other one does not seem to work. I need some text to be seen when you first get at search.php, but not when the searchnoresultstext is used.

      Basically it's a message that tells users that the search for the old archived messages is located elsewhere. The searchnoresultsphrase also has that information, so I am trying for it not to be shown twice.
      Vote for these issues:

      Comment


      • #4
        Try editing that specific template for that page:

        Admin CP -> Styles & Templates -> Style Manager -> « » -> Search Templates -> search_forums

        Comment


        • #5
          Originally posted by Jake Bunce View Post
          Try editing that specific template for that page:

          Admin CP -> Styles & Templates -> Style Manager -> « » -> Search Templates -> search_forums
          That's what I was doing, but the conditional does not seem to work for what I need.
          Vote for these issues:

          Comment


          • #6
            I don't know of a conditional to differentiate between the search form and the search results. I would just edit the individual templates for those two pages instead of editing a template that is common to both.

            Comment


            • #7
              Originally posted by Jake Bunce View Post
              I don't know of a conditional to differentiate between the search form and the search results. I would just edit the individual templates for those two pages instead of editing a template that is common to both.
              I believe the template is the same, since a search with no results is just like the avanced search except the fact that it shows the searchnoresults phrase. The searchnoresults is not even in a template; from the php file it looks like the phrase is used like an error.
              Vote for these issues:

              Comment

              Loading...
              Working...
              X