Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12414
Latest: danilubrin
New This Month: 4
New This Week: 3
New Today: 0
Stats
Total Posts: 39956
Total Topics: 7034
Most Online Today: 42
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 30
Total: 30

Author Topic: About Layout Options  (Read 1100 times)

0 Members and 1 Guest are viewing this topic.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14982
    • View Profile
Re: About Layout Options
« Reply #15 on: May 22, 2019, 08:05:22 pm »
Try this instead
Code: [Select]
// Max Items per row
$maxrowlevel = 4;

$rowlevel = 0;
while($row = $smcFunc['db_fetch_assoc']($dbresult))
{

$totallistings  = Classifieds_GetListingTotals($row['ID_CAT']);
if ($rowlevel == 0)
echo '<tr>';


if($row['imageurl'] == '' && $row['imagefilename'] == '')
echo '<td colspan="2" class="windowbg"><a href="' . $scripturl . '?action=classifieds;cat=' . $row['ID_CAT'] . '">' . parse_bbc($row['title']) . '</a> ' . (!empty($modSettings['class_showrss_bycat']) ? '<a href="' . $scripturl . '?action=classifieds;sa=rss;cat=' . $row['ID_CAT'] . ';type=recent"><img src="' . $modSettings['class_url'] . 'rss.png" alt="rss" /></a>' : '') . '</td>';
else
{
if($row['imagefilename'] == '')
echo '<td class="windowbg2"><a href="' . $scripturl . '?action=classifieds;cat=' . $row['ID_CAT'] . '"><img src="' . $row['imageurl'] . '" border="0" alt=""  /></a></td>';
else
echo '<td class="windowbg2"><a href="' . $scripturl . '?action=classifieds;cat=' . $row['ID_CAT'] . '"><img src="' . $modSettings['class_url'] . 'catimgs/' . $row['imagefilename'] . '" border="0" alt=""  /></a></td>';


echo '<td class="windowbg"><a href="' . $scripturl . '?action=classifieds;cat=' . $row['ID_CAT'] . '">' . parse_bbc($row['title']) . '</a> ' . (!empty($modSettings['class_showrss_bycat']) ? '<a href="' . $scripturl . '?action=classifieds;sa=rss;cat=' . $row['ID_CAT'] . ';type=recent"><img src="' . $modSettings['class_url'] . 'rss.png" alt="rss" /></a>' : '') . '</td>
';
}


if($rowlevel < ($maxrowlevel-1))
$rowlevel++;
else
{
echo '</tr>';
$rowlevel = 0;
}
}

if($rowlevel !=0)
{
echo '</tr>';
}
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline ajac63

  • SMF Classifieds Customer
  • Jr. Member
  • *****
  • Posts: 66
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #16 on: May 23, 2019, 04:14:49 am »
Great, you certainly know your stuff!  Works exactly how I had it in mind and has also given me a good insight into how php works. 

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
3808 Views
Last post May 09, 2009, 02:28:47 am
by jacci
6 Replies
4791 Views
Last post May 18, 2009, 07:19:48 am
by propyl
8 Replies
5187 Views
Last post February 25, 2010, 01:45:37 pm
by SMFHacks
5 Replies
5025 Views
Last post August 30, 2013, 08:44:22 am
by SMFHacks
1 Replies
2588 Views
Last post June 25, 2014, 12:06:25 pm
by SMFHacks

+- Recent Topics

hashTags only used by admins, but visible to everyone? by Dwev
Today at 07:59:19 am

Install ad seller pro problem. by SMFHacks
December 13, 2019, 05:56:56 am

Contact Page Problem by emmebroke
December 11, 2019, 04:19:25 pm

Responsive Layout by Matthias
November 30, 2019, 03:05:57 pm

Secure connection failed Pretty Url Pro by Rock Lee
November 26, 2019, 10:44:23 am

Black Friday Sale Week 2019 by SMFHacks
November 23, 2019, 04:47:56 pm

German Translation missing in SMF 2.1R1 by SMFHacks
November 19, 2019, 02:38:42 pm

Unread items issue by SMFHacks
November 19, 2019, 10:07:32 am

Update detect mobile mode PHP5 to PHP7 by Rock Lee
November 16, 2019, 07:18:13 pm

PHP error by davejo
November 12, 2019, 12:09:47 pm

Powered by EzPortal