JBenH
  •  JBenH
  • 51.8% (Neutral)
  • YAF Forumling Topic Starter
2011-02-25T20:33:20Z
I'd like to modify the dropdown list
listResInPage
to set the number higher to like 50 and or have less items to choose

I've found in the english.xml the following lines. I
<Resource tag="RESULT10">10 results per page</Resource>
<Resource tag="RESULT25">25 results per page</Resource>
<Resource tag="RESULT5">5 results per page</Resource>
<Resource tag="RESULT50">50 results per page</Resource>
but changing these only messes up the dropdown list.

Ben
Sponsor
bbobb
  •  bbobb
  • 100% (Exalted)
  • YAF Developer
2011-02-25T23:31:05Z
You should modify this
search.aspx.cs
// Load result dropdown
      this.listResInPage.Items.Add(new ListItem(this.GetText("result5"), "5"));
      this.listResInPage.Items.Add(new ListItem(this.GetText("result10"), "10"));
      this.listResInPage.Items.Add(new ListItem(this.GetText("result25"), "25"));
      this.listResInPage.Items.Add(new ListItem(this.GetText("result50"), "50"));

It corresponds to that.
<Resource tag="RESULT10">10 results per page</Resource>
<Resource tag="RESULT25">25 results per page</Resource>
<Resource tag="RESULT5">5 results per page</Resource>
<Resource tag="RESULT50">50 results per page</Resource>
RichP714
2011-02-26T23:31:19Z
This is what I did for yaf 1.9.4

in file search.ascx.cs

make the following change

                // Load result dropdown
                this.listResInPage.Items.Add(new ListItem(this.GetText("result50"), "50"));
                this.listResInPage.Items.Add(new ListItem(this.GetText("result25"), "25"));
                this.listResInPage.Items.Add(new ListItem(this.GetText("result10"), "10"));
                this.listResInPage.Items.Add(new ListItem(this.GetText("result5"), "5"));



then recompile
Enjoy!

Running YAF 1.9.5.5 final at: http://thecarversite.com 

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved