Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12384
Latest: MildredGarrido
New This Month: 8
New This Week: 0
New Today: 0
Stats
Total Posts: 39888
Total Topics: 7022
Most Online Today: 65
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 41
Total: 41

Author Topic: About Layout Options  (Read 871 times)

0 Members and 1 Guest are viewing this topic.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14953
    • 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
3780 Views
Last post May 09, 2009, 02:28:47 am
by jacci
6 Replies
4768 Views
Last post May 18, 2009, 07:19:48 am
by propyl
8 Replies
5158 Views
Last post February 25, 2010, 01:45:37 pm
by SMFHacks
5 Replies
4972 Views
Last post August 30, 2013, 08:44:22 am
by SMFHacks
1 Replies
2572 Views
Last post June 25, 2014, 12:06:25 pm
by SMFHacks

+- Recent Topics

prettyurls - TroubleShooting.wiki by Rock Lee
October 10, 2019, 11:37:09 am

Some issues with adding and editing a listing by ajac63
October 07, 2019, 04:16:40 am

Problem update 1.1.21 to 2.0.15 by Rock Lee
October 06, 2019, 06:09:16 pm

[Mod]SMF 2.0.x PHP 7.2 Support by sah62
October 04, 2019, 01:46:00 pm

Ideas by shuban
October 03, 2019, 10:19:06 pm

How to space icons and multiple reacts? by shadav
October 03, 2019, 04:20:07 pm

PrettyUrls SEO Pro by Rock Lee
October 01, 2019, 09:09:38 am

How to get search preciser by SMFHacks
September 23, 2019, 10:09:56 am

How to AVOID SEO Hit when Implementing PrettyURLs by SMFHacks
September 12, 2019, 08:50:42 pm

theme by SMFHacks
September 12, 2019, 07:10:51 am

Powered by EzPortal