Author |
Topic  |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 07 November 2000 : 06:19:43
|
I'm pretty sure this was also Dave's code, appologies if it wasn't. This alows users to sort by, Topic, Author,Date, etc.. it turns the table header into a sort bar of sorts.
You can download the replacement forum.asp here,
You can either replace your existing forum.asp, or look in the file for the <font color=green>'############# SORTING ######################</font id=green> comments, and insert the changes into your own forum.asp
Demo SIte here,
<font color=blue>'Resistance is futile'</font id=blue>
Edited by - huwr on 07 November 2000 06:37:09 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 07 November 2000 : 10:48:49
|
It looks good HuwR. But couldn't get to test it on your site with more than 1 topic posted, because when i clicked on 'Configurable Member Fields' topic, which had more than 1 topics in it, I got this error: <pre id=code><font face=courier size=2 id=code>Microsoft JET Database Engine error '80040e57'
The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.
/forum.asp, line 115 </font id=code></pre id=code>
I'll try it on my server.
<center><font color=green>*----*----*----*----*----*----*----*----*----*----*----* <font size=2>"However, if you suffer as a Christian, do not be ashamed, but praise God that you bear that name."</font id=size2> 1 Peter 4:16</font id=green></center> |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 07 November 2000 : 11:01:41
|
Odd, does anyone else get this ? I don't.
<font color=blue>'Resistance is futile'</font id=blue>
Ignore that, I do aswell now, but only after posting a new topic, will investigate.
Edited by - huwr on 07 November 2000 11:03:05 |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 07 November 2000 : 12:47:36
|
Sorted it out, it was a problem with the minimise category, fixed it now.
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
tteal
Junior Member
 
USA
438 Posts |
Posted - 09 November 2000 : 20:51:23
|
All I have to say is <b>WOW!</b> That's some good stuff there and thanks for sharing!
Cheers, Tim
http://www.free-guestbook.com |
 |
|
infinity
New Member

New Zealand
90 Posts |
Posted - 19 November 2000 : 22:08:50
|
Hey thanks. Really nice mod. Certainly one to be recommended for the next official release.
I was thinking... I have something like this on my shopping cart system. But it has a slightly different way of displaying it which I think is more user friendly. Rather than clicking the actual Header Field (topic, date etc), it just has a little down-arrow and up-arrow icon next to the header fields. This has a number of advantages: 1) It is quite clear to the end user that a sort feature exists and how to use it 2) They have the immediate option of choosing if they sort a field in DESC or ASC order
Any chance of some code to carry out this function in this way? If someone manages to hack this I would be greatful. If we need the icons (pretty common ones though) then I will upload the ones off my other site that uses them.
Regards,
Infinity
Life is but a dream... and that dream is Here and Now. Therefore, Be here Now. |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 19 November 2000 : 22:33:57
|
Any idea how they did that, I tried but didn't succeed. On my [url="http://195.149.32.155/mushroomgrove/]site[/url] I have a sort up/down arrow in the left corner.
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
infinity
New Member

New Zealand
90 Posts |
Posted - 20 November 2000 : 15:36:09
|
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote> Any idea how they did that, I tried but didn't succeed. On my [url="http://195.149.32.155/mushroomgrove/]site[/url] I have a sort up/down arrow in the left corner.
<font color=blue>'Resistance is futile'</font id=blue> <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Actually, come to think of it. This is something I did on the Admin pages I created for my e-com site. I'll just take a look and see what I did... Okay... essentially there is some code at the top of the page as follows ------------ Dim RSCustomer__sort RSCustomer__sort = "DESC" if(Request.QueryString("sort") <> "") then RSCustomer__sort = Request.QueryString("sort")
------ The actual sort function takes place here.... .. <% set RSCustomer = Server.CreateObject("ADODB.Recordset") RSCustomer.ActiveConnection = "dsn=thyrodine2;" ' ######### SOME MORE HERE FOR SORTING RSCustomer.Source = "SELECT name, CUSTOMER_ID, ORDER_DATE, GRAND_TOTAL, CARD_NO FROM customer WHERE NAME IS NOT NULL ORDER BY " + Replace(RSCustomer__sortVar, "'", "''") + " " + Replace(RSCustomer__sort, "'", "''") + "" RSCustomer.CursorType = 0 RSCustomer.CursorLocation = 2 RSCustomer.LockType = 3 RSCustomer.Open RSCustomer_numRows = 0 %>
------------- The variable is set here... with the arrows...
td height="55" width="25%"> <div align="center"><b><font face="Arial, Verdana, Helvetica, sans-serif" size="2">Order ID <a href="customer_table.asp?order=CUSTOMER_ID&sort=ASC"><img src="../../../images/downarrow_blue.gif" width="13" height="20" border="0"></a><a href="customer_table.asp?order=CUSTOMER_ID&sort=DESC"><img src="../../../images/uparrow_blue.gif" width="13" height="20" border="0"></a></font></b></div> </td> <td height="55"> <div align="center"><b><font face="Arial, Verdana, Helvetica, sans-serif" size="2">Name <a href="customer_table.asp?order=NAME&sort=ASC"><img src="../../../images/downarrow_blue.gif" width="13" height="20" border="0"></a><a href="customer_table.asp?order=NAME&sort=DESC"><img src="../../../images/uparrow_blue.gif" width="13" height="20" border="0"></a> </font></b></div> </td> <td height="55"> <div align="center"><b><font face="Arial, Verdana, Helvetica, sans-serif" size="2">Date <a href="customer_table.asp?order=ORDER_DATE&sort=ASC"><img src="../../../images/downarrow_blue.gif" width="13" height="20" border="0"></a><a href="customer_table.asp?order=ORDER_DATE&sort=DESC"><img src="../../../images/uparrow_blue.gif" width="13" height="20" border="0"></a> </font></b></div> </td>
------- AND SO ON.
I can give you the whole file if you like,,, but this is in fact the guts of it... Let me know how this goes for ya.
Infinity <img src=icon_smile_big.gif border=0 align=middle>
Life is but a dream... and that dream is Here and Now. Therefore, Be here Now.
Edited by - infinity on 20 November 2000 15:37:12 |
 |
|
infinity
New Member

New Zealand
90 Posts |
Posted - 20 November 2000 : 18:49:09
|
Hi,
I have a small prob with this... I am pretty sure it came about after applying this mod. I then got it to go away (no sure how) and it has come back...
When I go to a topic I get this error... Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/forum.asp, line 657 ------------- I can not see why it wants another END statement. Have gone through much of the code and as far as I can tell all IF statements have a following end if statement... If I just through an END IF statement at the end of the code then the page loads with the header etc and the rest is blank. So that rough solution did not work.
Any ideas?
Thanks,
Infinity
Life is but a dream... and that dream is Here and Now. Therefore, Be here Now. |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 20 November 2000 : 18:56:03
|
from the line number, sounds like it is in the Topicpaging sub, which should look like this <pre id=code><font face=courier size=2 id=code> sub TopicPaging() mxpages = (rs("T_REPLIES") / strPageSize) if mxPages <> cint(mxPages) then mxpages = int(mxpages) + 1 end if if mxpages > 1 then Response.Write("<table border=0 cellspacing=0 cellpadding=0><tr><td valign=""center""><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & "><img src=""icon_posticon.gif"" border=""0""></font></td>") for counter = 1 to mxpages ref = "<td align=right bgcolor=" & strForumCellColor & "><font face=" & strDefaultFontFace & " size=" & strFooterFontSize & ">" if ((mxpages > 9) and (mxpages > strPageNumberSize)) or ((counter > 9) and (mxpages < strPageNumberSize)) then ref = ref & " " end if ref = ref & widenum(counter) & "<a href='topic.asp?" ref = ref & "TOPIC_ID=" & rs("TOPIC_ID") ref = ref & "&FORUM_ID=" & rs("FORUM_ID") ref = ref & "&CAT_ID=" & rs("CAT_ID") ref = ref & "&Topic_Title=" & ChkString(left(rs("T_SUBJECT"), 50),"urlpath") ref = ref & "&Forum_Title=" & ChkString(Request.QueryString("FORUM_Title"),"urlpath") ref = ref & "&whichpage=" & counter '############################################ if sortorder <> "" then ref = ref & "&sort=" & sortorder end if '############################################ ref = ref & "'>" & counter & "</a></font></td>" Response.Write ref if counter mod strPageNumberSize = 0 then Response.Write("</tr><tr><td> </td>") end if next Response.Write("</tr></table>") end if end sub
</font id=code></pre id=code>
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
infinity
New Member

New Zealand
90 Posts |
Posted - 20 November 2000 : 19:21:05
|
Thanks HawR
Our code is the same... I even tried replacing mine with yours. No go.
About an hour ago I took some action, for lack of a better solution in a throw of desperation, by dumping another forum.asp file in there from someone elses downloaded mods. I really thought it would screw the whole things up but quite supprisingly it works like a charm... Amazing actually... considering how many other things I had modified in there. A nice fluke.
Anyway,,, she's away and running..... thank's for the assistance.
Infinity
Life is but a dream... and that dream is Here and Now. Therefore, Be here Now. |
 |
|
HuwR
Forum Admin
    
United Kingdom
20587 Posts |
Posted - 20 November 2000 : 19:29:44
|
Glad your up and running<img src=icon_smile.gif border=0 align=middle>
<font color=blue>'Resistance is futile'</font id=blue> |
 |
|
|
Topic  |
|