PDA

View Full Version : Help please..


Matt
06-01-2002, 01:40 PM
<?php
error_reporting(7);

require('./global.php');

$iconcount = 1;
while($iconcount < 103){

$iconcount = str_pad($iconcount, 3, "0", STR_PAD_LEFT);
eval("dooutput(\"".gettemplate('icons_bit')."\");");
$iconcount++;

}

?>

Icons_bit
<a href=aim:BuddyIcon?Src=http://www.thedailyplanet.net/downloads/$iconcount.gif><img src="http://www.thedailyplanet.net/downloads/$iconcount.gif" width="48" height="48" border="1" style="border-color:black;"></a>


I am trying to print 103 AIM icons on a page but it only brings up one, how do I do this? Also how do I make it so that uses the forum scheme?

Admin
06-01-2002, 04:42 PM
<?php
error_reporting(7);
require('./global.php');

$iconbits = '';
$iconcount = 1;
while ($iconcount < 103){
$iconcount = str_pad($iconcount, 3, '0', STR_PAD_LEFT);
eval('$iconbits .= "' . gettemplate('icons_bit') . '";');
$iconcount++;
}

dooutput($iconbits);

?>

Matt
06-01-2002, 06:24 PM
Thanks Chen! :D Works like a dream :)

One question though, how do I know get that to display with the header and everything?

<?php
error_reporting(7);
require('./global.php');

eval("dooutput(\"".gettemplate('headinclude')."\");");
eval("dooutput(\"".gettemplate('header')."\");");

$iconbits = '';
$iconcount = 1;
while ($iconcount < 103){
$iconcount = str_pad($iconcount, 3, '0', STR_PAD_LEFT);
eval('$iconbits .= "' . gettemplate('icons_bit') . '";');
$iconcount++;
}

dooutput($iconbits);

eval("dooutput(\"".gettemplate('footer')."\");");

?>

I tried that but it turned out like this :

http://www.thesmallvilletorch.com/icons.php

Matt
06-01-2002, 06:26 PM
I basically just want them to appear in a table in the middle of a page which uses the boards scheme. Its in the same directory and everything so if you could tell me how I would be very grateful :D

Admin
06-02-2002, 01:52 PM
<?php
error_reporting(7);
require('./global.php');

$iconbits = '';
$iconcount = 1;
while ($iconcount < 103){
$iconcount = str_pad($iconcount, 3, '0', STR_PAD_LEFT);
eval('$iconbits .= "' . gettemplate('icons_bit') . '";');
$iconcount++;
}

eval('dooutput("' . gettemplate('icons') . '");');

?>
Then create a template called icons, with $header, $headinclude, $footer and $iconsbits wherever you want them.

Matt
06-02-2002, 06:59 PM
Thanks again, much appreciated! :D

Admin
06-02-2002, 07:01 PM
No problem. :)