Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in Programming. |
Acmlm's Board - I3 Archive - Programming - HTML Random Message | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
Raccoon Sam Boomerang Brother Custom Title Since: 11-20-05 From: Correct Last post: 6431 days Last view: 6430 days |
| ||
Just like the "tip of the day" thing on SMWCentral.
How does one work? Does it involve Something like, "get information from URL blablabla" or such? Thank you in advance! |
|||
Prince Kassad 320 As you wish. Since: 06-30-06 From: nowhere Last post: 6431 days Last view: 6431 days |
| ||
I think stuff like this is done with PHP. Though there is a way to do this with javas |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6431 days Last view: 6430 days |
| ||
I thnk you can do that with just about ANY active server technology.
I'm pretty sure you can also do that with ASP... and any other AST too, I'd imagine. |
|||
Raccoon Sam Boomerang Brother Custom Title Since: 11-20-05 From: Correct Last post: 6431 days Last view: 6430 days |
| ||
Originally posted by Sukasa + What is an ASP/AST? Definition appreciated. |
|||
DarkSlaya 930 Gamma Ray Since: 11-17-05 From: Montreal, Canada Last post: 6431 days Last view: 6430 days |
| ||
ASP is a programming language.
AST are.... well, beats me. Probably refers to server-side programming languages or something. |
|||
Ogre Paragoomba Since: 07-12-06 Last post: 6521 days Last view: 6521 days |
| ||
ASP is Microsoft's version of PHP in a way, they share several similarities. Except that PHP is free to use, last I checked (long ago) ASP servers had to be paid for.
As for random messages *points at my own* just go find a PHP script and toss it on a free server that allows PHP, there are tons. |
|||
Raccoon Sam Boomerang Brother Custom Title Since: 11-20-05 From: Correct Last post: 6431 days Last view: 6430 days |
| ||
Originally posted by Ogre Cmon dude, where's t3h script. |
|||
Deleted User Banned Since: 05-08-06 Last post: None Last view: 6431 days |
| ||
I'm not a big PHP person, but I think something like this may do what you want.
<?php
The second number depends on how many items you are going to have. Also, this will not work the same way as the SMW Central "Tip of the Day". Instead of the item changing everyday, it'll change on each refresh. Another way to do it is to set different variables to be output on different days. I'm not sure how to do that, though. As I said before, I don't know much PHP. If this helped you at all, you're welcome. (edited by Syn on 07-17-06 03:49 PM) |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6431 days Last view: 6430 days |
| ||
AST meant Active Server Technology, I just didn't feel like saying that. sorry.
Also, SMW central's tip changes on each refresh, not daily. Edit: I looked on google, I think that for ASP Randomize() rnd() Is the Random number generator, and this Is my try at a random content selector is ASP: <
Or something like that. Whoa, good thing I previewed that - the server here parsed it out... but didn't display anythign in it's palce. (edited by Sukasa + on 07-17-06 04:27 PM) |
|||
Ogre Paragoomba Since: 07-12-06 Last post: 6521 days Last view: 6521 days |
| ||
Although it goes against my better judgement, screw it. Here's my script, it's very simple to modify up. In the array after $quotes=array('1' => put any quote you want in single quotes 'blah blah blah', and add a comma after it if it's not the last one. You can see my quote roll for an example.
If you can't figure that out, I can't (won't.) help you. [edit]Forgot to mention, you need a \ before any quotation marks you use in a quote to escape breaking the line. (They are removed later by the script.) And WOW that's a bad setup for showing attachments, it broke the tables, haha. (edited by Ogre on 07-17-06 05:26 PM) |
|||
Deleted User Banned Since: 05-08-06 Last post: None Last view: 6431 days |
| ||
Originally posted by Sukasa + Then my way would be perfect for PHP format although Ogre's way works, too. EDIT: I made a file that has everything you need already setup, but I can't add it yet. I'll post the code here. <?php
This way removes backslashes from the quotes unlike my original code. Also, my way allows font editing. The way Ogre did it makes the text an image, so it's less customizable. Use whichever way you prefer. Another note, put the quotes where it says "Item #". To add more quotes, change the rand(1,10) to something further apart such as rand(1,20) and same goes for removing quotes. When you do this, you'll have to add more if($quote==#) depending on how many more quotes you've added. Another thing you can do if you want a quote to appear more than others is that you can set that quote to multiple numbers such as having numbers 1-5 being one quote and have 6-10 all be different quotes. These are just a few of the things you can do. I'm not going to bother going into it anymore because you probably get the idea by now. (edited by Syn on 07-17-06 06:23 PM) (edited by Syn on 07-17-06 06:35 PM) (edited by Syn on 07-17-06 06:37 PM) |
|||
Ogre Paragoomba Since: 07-12-06 Last post: 6521 days Last view: 6521 days |
| ||
Syn, your way gets very bloated with unnecessary code fast that way. By using an array everything is in a neat, orderly fashion. (Yay for streamlining.)
And less customizable how? =P Actually easier to apply color and size formating to my script. Change the color variables to effect the background and font colors(simple RGB format) $bg=ImageColorAllocate($img, 255,255,255); $textc=ImageColorAllocate($img,0,0,0); and if you want to change up the size, simply modify the two digits I've underlined. (The font size indignation. $width=ImageFontWidth('2') * strlen(stripslashes($str)); ImageString($img,2,0,0,$str,$textc); Easy as Pi. |
|||
DarkSlaya 930 Gamma Ray Since: 11-17-05 From: Montreal, Canada Last post: 6431 days Last view: 6430 days |
| ||
Also, Ogre's code renders it in a GD Image, so it can be used anywhere (you aren't limited to JUST your server).
Of course, it has it's downside (most people aren't bother to have paid hosting or don't know people that can give them, and free hosts don't always allow it), but it's useful. |
|||
Ogre Paragoomba Since: 07-12-06 Last post: 6521 days Last view: 6521 days |
| ||
If you need a host that allows the ImageGD, there is always Host.sk. They were good to me when I used them. Ignore the fact I'm not Slovokian. | |||
Zer0wned Koopa Since: 12-09-05 From: Torrance, ca Last post: 6588 days Last view: 6588 days |
| ||
just to clarify, ASP is an enableable option for windows 2k and up (doesn't even have to be a server edition, but have your setup disk available). it creates the directory C:\inetpub\wwwroot\ which is accessable by typing http://localhost/ into your web browser, or with the correct settings, by typing in your public IP address.
So in short, ASP doesn't cost any (extra) money, as long as you have a non-XP Home edition post 98 windows. http://www.w3schools.com/asp/asp_adrotator.asp just so I'm not too off topic, that's another way to pull that off in ASP And to accomplish this with the assumption that you're using some HTML-only type of service, you're stuck using javas This has the code you need If you'd like I can tell you what you need to run an ASP site entirely from your own windows box (ASTs are only for dynamic portions, as far as I know all dynamic web pages still use standard HTML for the static portions). http://zeedo.no-ip.org/eshop/ <--this is currently running off of my own computer (looks like crap, but it's for practice anyway) (edited by Zer0wned on 07-23-06 05:59 PM) |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6431 days Last view: 6430 days |
| ||
I have Windows 98 and Personal Web Server... That uses ASP.
And ASP is a tpe of active server technonlogy, as per what I know of it's definition. |
|||
Zer0wned Koopa Since: 12-09-05 From: Torrance, ca Last post: 6588 days Last view: 6588 days |
| ||
Originally posted by Sukasa + that's right, I forgot about personal web server... so make that windows 98 (with some help) and up. (and maybe 95, but as I recall that's not the case) |
|||
Sukasa Birdo Not quite as active as before. Xkeeper supporter Xk > ||bass I IP Banned myself! Twice! Since: 11-17-05 From: Somewhere over there Last post: 6431 days Last view: 6430 days |
| ||
I don't nelieve so... and what do you mean,'with some help'? | |||
Zer0wned Koopa Since: 12-09-05 From: Torrance, ca Last post: 6588 days Last view: 6588 days |
| ||
oh, I was just referring to the need to have personal web server in order to be able to use ASP on windows 98, whereas in newer windows versions (except for XP home), it's an included (but by default disabled) optional windows component (Internet Information Services, aka IIS).
So what I was trying to do was to fix my previous statement: "So in short, ASP doesn't cost any (extra) money, as long as you have a non-XP Home edition post 98 windows." which excluded windows 98 from ASP-capable windows versions, to a more correct: "So in short, ASP doesn't cost any (extra) money, as long as you have a non-XP Home edition windows 98 or newer (with personal web server for windows 98, and IIS enabled for NT and up)." because I had forgotten about personal web server until you mentioned it. I've been away from forums for a while, so I'm bound to make mistakes like that for a little while... |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - Programming - HTML Random Message | | |