Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Alignment Query
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Alignment Query

 Post Reply Post Reply
Author
Shayneh View Drop Down
Newbie
Newbie
Avatar

Joined: 29 March 2005
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Shayneh Quote  Post ReplyReply Direct Link To This Post Topic: Alignment Query
    Posted: 23 November 2005 at 4:12am
Hi all,
 
A real easy question for you gurus out there but i cant seem to figure it out. I have Top posters code installed as below but it displays the top posters vertically when i need it to be displayed horizontally.
 
Example. It displays as below
 
    Poster1 xx
    Poster2 xx
    Poster3 xx
    Poster4 xx
    Poster5 xx
 
I need it display as Poster1 xx, Poster2 xx, Poster3 xx, Poster4 xx, Poster5 xx
 
Quote
<script  language="JavaScript">
<!-- Hide from older browsers...
//Function to open pop up window
function openWin(theURL,winName,features) {
   window.open(theURL,winName,features);
}
// -->
</script>
<%
Dim rsTopPostersMod
Dim strSQLTopPostersMod
Dim strTopPostersModCon
Dim adoTopPostersModCon
Dim strTopPosterUsername
Dim strTopPostersModForumPath
'The path to the forum
strTopPostersModForumPath = " "
'Database connection
'-----------------------------
'-----------------------------
'Default connection
strTopPostersModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("admin/database/wwforum.mdb")
'Uncomment for a full phsyical path. Then change the path
'strTopPostersModCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:/yoursite/root/forum/admin/database/"
'Uncomment for a DSN connection
'strTopPostersModCon = "DSN=DSN_NAME"
'-----------------------------
'-----------------------------
Set adoTopPostersModCon = Server.CreateObject("ADODB.Connection")
adoTopPostersModCon.Open strTopPostersModCon
Set rsTopPostersMod = Server.CreateObject("ADODB.Recordset")
strSQLTopPostersMod = "SELECT TOP 5 tblAuthor.Author_ID, tblAuthor.Username, tblAuthor.No_of_posts FROM tblAuthor "
strSQLTopPostersMod = strSQLTopPostersMod & "ORDER BY tblAuthor.No_of_posts DESC;"
rsTopPostersMod.Open strSQLTopPostersMod, adoTopPostersModCon
Do WHILE NOT rsTopPostersMod.EOF
 If len(rsTopPostersMod("Username"))>18 then
  strTopPosterUsername = left(rsTopPostersMod("Username"),18)
 Else
  strTopPosterUsername = rsTopPostersMod("Username")
 End If
 Response.Write("<a href=""javascript:openWin('" & strTopPostersModForumPath & "pop_up_profile.asp?PF=" & rsTopPostersMod("Author_ID") & "','profile','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=590,height=425' )"">" & strTopPosterUsername & "</a> (" & rsTopPostersMod("No_of_posts") & ")")
rsTopPostersMod.MoveNext
If NOT rsTopPostersMod.EOF Then Response.Write("<br>")
Loop
rsTopPostersMod.Close
Set rsTopPostersMod = Nothing
adoTopPostersModCon.Close
Set adoTopPostersModCon = Nothing
%>
 
Appreciate the help!
 
 
Back to Top
Ali Bilgrami View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ali Bilgrami Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2005 at 8:35am
first of all this is a topic related to MODS you shud be posting this in the relative topic in which this mod was discussed originally AND in the relative MODS FORUM unless you had some other reason for making a new one.
ANYWAY
 
change this
 
Quote
If NOT rsTopPostersMod.EOF Then Response.Write("<br>")
Loop
 
to this
 
Quote
If NOT rsTopPostersMod.EOF Then Response.Write(":")
Loop
 
OR if you do not want a spacer
 
Quote
Loop
 
simply delete the IF statement above LOOP.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.