Page 3 of 3

Posted: Sat Dec 27, 2003 12:46 pm
by Den
example:

[php]<?php

function auto_link($text) {

RETURN eregi_replace("(http://([a-zA-z0-9_-]+[\.]{1})*[\.]{0,1}[a-z]{2,3})","<a href=\"\\1\" target=\"_BLANK\">\\1</a>",$text);

}

echo auto_link("blablabla normal text, but this is a hyperlink: http://forums.aq2world.net");

?>

[/php]



The rest u can do urself :) basic php



Just put the function on top of ur source.

Then after u get the data from the db, do the auto_link.

or before u add the data to ur db





---

Some help:

http://nl.php.net/manual/en/function.eregi-replace.php

Posted: Sat Dec 27, 2003 5:11 pm
by keffo
ok? so if i want to put it below the score i'll just add this in the table below the score (in report section) .. get it?



this is how it should be written our as a link?

Posted: Sat Dec 27, 2003 6:03 pm
by Den
have a look at the first page, added it there.

Posted: Sat Dec 27, 2003 6:14 pm
by keffo
i dunt get that much on the page.. but..

Posted: Sat Dec 27, 2003 9:19 pm
by keffo
oh, thought of one thingie.. it would be cool if you can select different pictures, in this case.. flags.



have a look here


Code: Select all

Type:<select name='type' size='1' id='type'><option>official</option><option>unofficial</option><option>eaql</option><option>naql</option></select><br> 


I wonder if you can do like this somehow, but using images instead?

and if.. how?! ;>

Posted: Sun Dec 28, 2003 6:33 am
by Den
if else statements..

Posted: Sun Dec 28, 2003 8:24 am
by keffo
you got any example or sum? ;>

Posted: Mon Dec 29, 2003 7:25 am
by Zonic
keffo, you should read some PHP manual.

Posted: Mon Dec 29, 2003 8:43 am
by keffo
whue? examples = good way too learn, then you read manuals outfrom the example..

Posted: Mon Dec 29, 2003 8:44 am
by Kurupt
examples? u basicly just ask them to make the script for you ;)

Posted: Mon Dec 29, 2003 7:11 pm
by keffo
oh, thats not my opinion.. i like examples, like.. well, read above, there some examples i've been building on.. :>