scottie35t Posted February 12, 2013 Share Posted February 12, 2013 i'm not sure how to make a break in this code, so the jaward images in this code below, shows multiple images in a vertical format (instead of showing them side by side horizontally). Because the images are wide, it takes up to much space if I show them horizontally? Should I use a page break, span or other? <br>, <p>, or somethiong else? My coding knowledge is basic, so if you can tell me the specific location to place it in the code below, it would be very helpful.. . // Hack for jAwards integration, displays some medals of the user for Kunena 1.6 $number_medals = 10; // number of medals to show $query = "SELECT b.image, b.name" . "\n FROM #__jawards_awards AS a" . "\n LEFT JOIN #__jawards_medals AS b ON b.id = a.award" . "\n WHERE a.userid=". $this->profile->userid . "\n ORDER BY RAND() LIMIT ".$number_medals; $database = &JFactory::getDbo(); $database->setQuery( $query ); $medals = $database->loadObjectList(); // URL links to the jAwards-Tab for Community Builder which displays all // medals of the user - change to another URL of needed $awards_url=JRoute::_('index.php?option=com_comprofiler&task=userProfile&user='.$this->profile->userid."&tab=getawardstab"); // CSS-class "ja_medals" allows individual styling of medal images and // container. "nobr" keeps the medals from breaking apart, display them // in one row. $msg_jawards = "<div class=\"ja_medals\"><nobr>"; foreach ($medals as $med){ $msg_jawards.= "<a href=\"$awards_url\" title=\"$med->name\">" . "<img style='border:0px;padding:0px;' src=\"".KUNENA_JLIVEURL."/images/medals/".$med->image ."\" alt=\"".$med->name."\" />" . "</a>"; } $msg_jawards.="</nobr></div>"; unset($medals); echo $msg_jawards; ?> Quote Link to comment https://forums.phpfreaks.com/topic/274378-how-to-edit-this-code-to-display-images-in-vertically-instead-of-horizontal/ Share on other sites More sharing options...
dmcglone Posted February 12, 2013 Share Posted February 12, 2013 If I understand you correctly, this sounds like a job for CSS to me. Quote Link to comment https://forums.phpfreaks.com/topic/274378-how-to-edit-this-code-to-display-images-in-vertically-instead-of-horizontal/#findComment-1411915 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.