Hi all,
I have a zen cart shop with a module called "News and Article Manager & Optional Sideboxes"
URL there
http://www.zen-cart.com/downloads.php?do=file&id=791
And my web site there
http://www.xtreme-production.com/xtremeup
The News is on the bottom....
I had change the key coding of the original module do, the files is in
/includes/modules/news_summary.php
Here are the coding what I changed on above files
////
<?php
// this query uses part of the original news query, just simplified, if you need different languages that coding needs adding, to alter the amount of stories shown change the limit 5 to number required
$comments = $db->Execute("select n.news_date_published, n.article_id, nt.news_article_name, nt.news_article_shorttext, n.news_image, nt.news_image_text from " . TABLE_NEWS_ARTICLES . " n left join " . TABLE_NEWS_ARTICLES_TEXT . " nt on n.article_id = nt.article_id where n.news_status = '1' order by n.article_id desc limit 5 ");
while (!$comments->EOF)
{
// article_id is used for testing comment out when you ready to send this live
//echo $comments->fields['article_id'];?><br /><span class="articleHeading"><?
echo $comments->fields['news_article_name'];?></span><br /><?
echo strtoupper(zen_date_long($comments->fields['news_date_published']))?> <br />
<?
// get the url for the article and attach to a simple read more link
$articleLink = zen_href_link(FILENAME_NEWS_ARTICLE, 'article_id=' . $comments->fields['article_id']);
// get image for story
if ((zen_not_null($comments->fields['news_image'])) && file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . $comments->fields['news_image'])) {
$articleImage = zen_image(DIR_WS_IMAGES . $comments->fields['news_image'], $comments->fields['news_image_text'], '', '', 'align="left"');
echo "<a href=" . $articleLink . ">" . $articleImage . "</a>" . "<p style=\"margin-left: 225px;\">" ;
}
echo $comments->fields['news_article_shorttext'];?></p><br /><?
?>
<div class="articleLinkList"><a href="<? echo $articleLink;?> ">Read more</a></div>
<?
// bit of space between articles, if you do this properly with css you can style this better
?><br /><br /><?
$comments->MoveNext();
}
// need to add link to rest of news here if required
?>
////
================================================
The problems is, I am not programmer, but know HTML and CSS and some PHP.
I want to re layout the output to UL, LI or by table, with two columns max, but can mutli row layout like below
From now
Title1
Content1
Title2
Content2
Title3
Content3
....
....
Change to this layout
Title 1 Title2
Content1 Content2
Title 3 Title4
Content3 Content3
Title 5 Title6
Content5 Content6
What do I can do with the /includes/modules/news_summary.php ??
Thank you very much of your time and help.