Jump to content

dispayed images need to have 3 in row then make a new row


docJay

Recommended Posts

I've been torturing myself and can't come up with the right code. I want the images that come up to display only 3 and then move down to a new row. Here is my code so far. [code]<?php

if(count($awards)){

$output->Text(pnclansite_opentable());
$output->BoldText(_TITLE_MEDALS);
$output->Text(pnclansite_closetable());

$output->Text(pnclansite_opentable());

foreach($awards as $award){

$id = pnVarPrepHTMLDisplay($award[id]);
$medalname = pnVarPrepHTMLDisplay($award[medalname]);
$medalimage = pnVarPrepHTMLDisplay($award[medalimage]);
$givername = pnVarPrepHTMLDisplay($award[givername]);
$reasons = pnVarPrepHTMLDisplay($award[reasons]);
$awarded = pnVarPrepHTMLDisplay($award[awarded]);

if($awarded > 0)
{
$awarded = date("m/d/Y", $awarded);
}
else { $awarded = ""; }

if(pnSecAuthAction(0, 'pnclansite::awards', "$id::", ACCESS_READ))
{
$medal_url = pnModURL('pnclansite', 'awards', 'display', array('cs_id' => $id));
$output->URL($medal_url, "$medalname");
$output->Text(" ");

if((count($awards))>4))
{
$output->LineBreak(1);
$imageslimit = 1;
}
else
{
$imageslimit ++;
}
}

}
$output->LineBreak(2);
$output->Text(pnclansite_closetable());
}

$output->SetInputMode(_PNH_PARSEINPUT);
return $output->GetOutput();

}[/code] Any help is appreciated.

Thanks
doc

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.