search page paging -> It works! - Postet den (2083 Views)
Starting Member
ernieek
Innlegg: 21
21
Hello,

does anyone know how i can implementate the
"Simple paging mod"
http://www.snitzbitz.com/mods/details.asp?Version=All&mid=173 on the searche page. (search.asp)

now there is an combox in an form. I have tryit to replace with text but it goes wrong.
anyone an idea? or example?
thanks

<
   
 Sidestørrelse 
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Searching works wonders.

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=67361&SearchTerms=simple,paging<
Postet den
Starting Member
ernieek
Innlegg: 21
21
Hello Carefree

I have worked this on the topic.asp an forum.asp page.
but i want this now on the result page if your seach(search.asp) on the forum.
thanks erwin<
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Don't think anyone wrote this for search.asp (even though someone else requested it).
The code will be something like this, but the links aren't correct yet.
Code:

sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
response.write "<td bgcolor="""&strHeadCellColor&""" nowrap><strong>Page:</strong>"
if maxpages>1 then
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""search.asp?&whichpage=1"&SearchLink&""">#171;</a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""search.asp?whichpage="&counter&""&SearchLink&""">"& Counter &"</a>" else response.write " <strong>"&counter&"</strong>"
next
if MaxPageToShow<maxpages then response.write " <a href=""search.asp?whichpage="&maxpages&""&SearchLink&""">#187;</a>"
response.write " (of "&maxpages&")"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</td>"
top="0"
end sub

Instead of taking you to the pages, it's going back to search.asp with no data. If someone will point out the error, this is done.<
Postet den
Senior Member
leatherlips
Innlegg: 1838
1838
I'd like to know how to add this to my topic.asp and search.asp as well. Can you post how you did it for topic.asp?<
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
In topic.asp, search for dropdownpaging

Replace the entire sub-routine with the following:
Code:

sub DropDownPaging(fnum)
dim PagesToShow
PagesToShow=3
Response.Write(" <form name=""PageNum" & fnum & """ action=""topic.asp"">" & vbNewLine)
Response.Write(" <td class=header nowrap><font size=""" & strDefaultFontSize & """>" & vbNewLine)
if maxpages>1 then
response.write "Page "
if mypage-PagesToShow<1 then MinPageToShow=1 else MinPageToShow=mypage-PagesToShow
if mypage+PagesToShow>maxpages then MaxPageToShow=maxpages else MaxPageToShow=mypage+PagesToShow
if MinPageToShow>1 then response.write " <a href=""topic.asp?"&ArchiveLink&"TOPIC_ID="&Topic_ID&"&whichpage=1"&SearchLink&""">& #171;</a>"
for counter=MinPageToShow to MaxPageToShow
if counter<>mypage then response.write " <a href=""topic.asp?"&ArchiveLink&"TOPIC_ID="&Topic_ID&"&whichpage="&counter&SearchLink&""">"&counter&"</a>" else response.write " <strong>"&counter&"</strong>"
next
if MaxPageToShow<maxpages then response.write " <a href=""topic.asp?"&ArchiveLink&"TOPIC_ID="&Topic_ID&"&whichpage="&maxpages&SearchLink&""">& #187;</a>"
response.write " (of "&maxpages&")"
else
response.write " <strong>1</strong> (of 1)"
end if
response.write "</td>"
top="0"
end sub

Where the code is in red, remove the spaces between the symbols. Spaces were left in so the code wouldn't parse.<
Postet den
Senior Member
leatherlips
Innlegg: 1838
1838
Thanks Carefree. I'll work on that to make it more like on my forum.asp page. This gives me a great start!<
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
To get the single, small < and > (for use with next and previous), use & #139; and & #155;<
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
Or just &lt; and &gt;

<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Actually & lt; and & gt; are the full-size symbols and will not match the 171 & 187 symbols.<
Postet den
Starting Member
ernieek
Innlegg: 21
21
but how to implementate this to the search page.
when i do this, the searche wil wil now go back to the first search screen because there is no seach data anymore.
is there anyone that can help?<
Du må legge inn en melding