mIRC Homepage
Posted By: sparta html question - 03/10/08 09:21 PM
I know this arent a mirc related question, but can't hurt to ask anyway wink

Someone that know how i can get a line to appear in the left bottom corner in a .html file? the text i trying to get there are this one:

<p align="left" style="margin-top: 0pt; margin-bottom: 0pt;"><font size="1">some text here </font></p>

i don't know how to solve that one, the margin-top dosent mather if it's renamed to margin-bottom , someone that know how i can solve it?
Posted By: deegee Re: html question - 03/10/08 09:59 PM
Like this perhaps?
Code:
  if $read(filename.html,w,*</body>*) {
    write -il $+ $readn filename.html <Your text to write>
  }
Posted By: sparta Re: html question - 04/10/08 08:24 AM
That wasnt what i was looking for, so i skip that one for now, any ideas on how i can create a TABLE in a html file with diffrent amount of columns? i trying to create a statistics page, and i got the row's, thats a standard one, same amount of them every time, but the columns will store the information, so if it's 10 users on a channel i need 10 columns, if it's 3 users i only need 3, and since a channel can have up to 1000 users i need it to be set after the amount of users. I created a page with a table, but it dosent store the amount of colums as a number anywhere, ideas on this one? smirk

I use $nick($1,0) to get how many columns i need.
Posted By: Darwin_Koala Re: html question - 04/10/08 09:44 PM
Why not flip the table? It is easier to create rows than create columns? Some psuedo code (for columns):

Code:
for each row_element
  set_text "<tr><td>", Row_Name, "</td>"
  for each user_ID
    set_text original_text & "<td>", Relevant_Data, "</td>"
  next user_ID
  set_text original_text & "<tr>"
next row_element


Noting that "relevant data" has to be extracted from some matrix

the same code for rows:
Code:
  set_text "<tr><td>", Names/Stats, "</td>","<td>", Stat_Name1, "</td>", "<td>", Stat_Name2, "</td>", "<td>", Stat_Name3, "</td><tr>",
  for each user_ID
    set_text "<tr><td>", User_Name, "</td><td>", User_Stat1, "</td><td>", User_Stat2, "</td><td>", User_Stat3, "</td><tr>"
  next user_ID
next row_element


The use of ASP (or equivalent) code to extract the data from a data source (database) would be even easier because you can then do it on the fly!

Totally untested and straight off the top of my head, but some food for thought.

Cheers,
DK



Posted By: sparta Re: html question - 04/10/08 09:55 PM
That add the information for the users on the same row, i wanted to separate the info in a table (or something simulare), it looks clean and easy to read. it looks cluttered if it's on a single row.
Code:
<style type="text/css">
<!--
body,td,th {
	color: #FFFF00;
}
body {
	background-color: #000000;
}
-->
</style>
<div align="center">
  <p>&nbsp;</p>
  <p>Stats for #none</p>
  <table width="439" border="1" cellpadding="3">
    <tr>
      <td width="97"><div align="center">User nick </div></td>
      <td width="173"><div align="center">User host </div></td>
      <td width="135"><div align="center">User status</div></td>
    </tr>
    <tr>
      <td><div align="center">Nick1</div></td>
      <td><div align="center">some@host.com</div></td>
      <td><div align="center">Oped ( @ )</div></td>
    </tr>
    <tr>
      <td><div align="center">Nick2</div></td>
      <td><div align="center">another@host.com</div></td>
      <td> <div align="center">Normal </div></td>
    </tr>
  </table>
</div>

looks realy clean. Something like this, but i need to be able to set the info on how many fields are needed.
Posted By: Darwin_Koala Re: html question - 04/10/08 10:19 PM
My code is only pseudo-code to illustrate the concept of how it can be completed, not intended to working out of the box.

What you have listed is the results of my second suggestion (data in rows in a table, not columns). I made a slight error, my closing </TR> forgot the "/"! I didn't put the <table> commands in for simplicity.

The question is: are you using some code to develop a HTML file, which you then upload to the server? If you are trying to write this as a dynamic table, you need to look at server-side scripting, in which case your resulting code would have some similarities to my pseudo-code.

Cheers,

DK
Posted By: sparta Re: html question - 04/10/08 10:25 PM
This will only be local, so i don't upload it anywhere. i havent played around that much with html, only know the basic of it. tested what you wrote, coldent get it to look good. smirk
Posted By: Darwin_Koala Re: html question - 04/10/08 11:05 PM
Quote:
tested what you wrote, coldent get it to look good.


lol, that is because it is only pseudo-code. Add the table string at the front and end (like you have with yours), you could even separate the creation of relevant strings onto separate lines (adding cr/lf as necessary). No reason why it can't look as good!
But making it look good by using columns instead of rows is a little bit more work.

Cheers,

DK
Posted By: sparta Re: html question - 05/10/08 09:20 AM
can't get it to work as it should. smirk thnx anyway
Posted By: Doqnach Re: html question - 05/10/08 04:57 PM
it's possible when working with either colspan/rowspan or tables in tables...
Posted By: sparta Re: html question - 05/10/08 06:16 PM
how come this one work?
Code:
<font size="2">I'm on Network: network - Server: <a href="irc://irc.server.com/testar">irc.server.com #testar</a><br>

and this arent?
Code:
<font size="2">I'm on Network: network - Server: <a href="irc://irc.server.com/#testar">irc.server.com #testar</a><br>

if i add the # sign it joins a channel called ##testar, and that's not right. removed the server i use cos it's my private, but put that in a html doc replace the server and test it, the last #testar with the # sign is only there for show. smile
Posted By: Strider Re: html question - 05/10/08 09:22 PM
Some of these generic HTML questions can be Googled with ease.

As for "irc://" hyperlinks, the "#" is a reserved character in URL's (as defined in RFC 3986), so I'm thinking that the best solution was to leave an implicit "#", instead of forcing everyone to use percent-encoding. Of course, there were losses: the "#" channel and local &channels are inaccessible due to this.
© mIRC Discussion Forums