Announcement

Collapse
No announcement yet.

How to add a banner to the new posts search result?

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

  • How to add a banner to the new posts search result?

    title says it all, how to add a banner on the page result after clicking "new posts" but not on other kind of searches?

  • #2
    You must edit template search_results and insert following code in any place
    Code:
    <if condition="$action == 'getnew'">HERE_YOUR_BANNER</if>

    Comment


    • #3
      Thanks for your help!

      I'd like to put the banner in the header, is it possible to combine this conditional with a condition to check the script, something like:
      Code:
      <if condition="THIS_SCRIPT == 'search'" AND "$action == 'getnew'">HERE_YOUR_BANNER</if>

      would this work?

      Comment


      • #4
        yea but you must use this code:
        Code:
        <if condition="((THIS_SCRIPT == 'search') AND ($action == 'getnew'))">HERE_YOUR_BANNER</if>

        Comment


        • #5
          humm, I've tried this but it is not working yet, any idea why?

          Comment


          • #6
            Sorry I've just test this. It's don't work at header. You can put this code ($action == 'getnew') only in navbar and search_ templates

            Comment


            • #7
              so, there is no way to get the information on if the search page being displayed was from a normal search request of from a "get new" request?

              the search result of a "get new posts" is like any other search result, it just shows a searchid, is it possible to query or have a conditional that checks what generated this search id and by that way identify if the result is a "getnew" or not, so that the banner is only displayed in that page?

              Comment


              • #8
                There are a lot of things you cannot do in the header template. A lot of things aren't defined yet.

                Move your code into navbar and it should work.

                Comment


                • #9
                  it seems to work now, thank you both!

                  I didn't realize that it was already said in the previous post

                  The only problem now is taht in header I'm able to place the banner aligned with the logo (it it was were, it would be between vb logo and version info) while using navbar an additional space is always inserted for the banner.
                  Last edited by ChipTz; Wed 11th Apr '07, 2:42pm.

                  Comment


                  • #10
                    Humm, back to this topic... I've managed to place the banner as suposed, or at least almost as suposed.

                    The banner is now showing up in new posts but only if the search string is .../search.php?do=getnew however I also have one link in the main page excluding some of the forums from search, something like .../search.php?do=getnew&exclude=61,85

                    With the exclude I believe the condition ($action == 'getnew') doesn't seem to work properly. Any ideas?

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...
                    X