Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4200
Latest: [chrisB]
New This Month: 4
New This Week: 1
New Today: 1
Stats
Total Posts: 42606
Total Topics: 7433
Most Online Today: 103
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 40
Total: 40

Author Topic: About Layout Options  (Read 4200 times)

0 Members and 1 Guest are viewing this topic.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16159
    • 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

  • 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
4835 Views
Last post May 09, 2009, 02:28:47 am
by jacci
6 Replies
5410 Views
Last post May 18, 2009, 07:19:48 am
by propyl
8 Replies
6295 Views
Last post February 25, 2010, 01:45:37 pm
by SMFHacks
5 Replies
5925 Views
Last post August 30, 2013, 08:44:22 am
by SMFHacks
1 Replies
3110 Views
Last post June 25, 2014, 12:06:25 pm
by SMFHacks

+- Recent Topics

Errors with SMF2WPBridge by [chrisB]
Today at 04:30:26 pm

"Notify all store admins of item purchase" Not Working in SMF 2.1.2 or 2.1.3 by SMFHacks
Today at 01:15:50 pm

Permissions query by SMFHacks
Today at 01:15:30 pm

Undefined index: id by Shades
Today at 12:15:20 pm

Additional Recommendations for SMF Store by Michael Vail
November 26, 2022, 12:49:58 pm

SMF Store 5.0 Beta Errors - Trying to access array offset on value of type null by Michael Vail
November 26, 2022, 12:07:42 pm

Modification: Subcategories total in main gallery view by VisiGod
November 26, 2022, 11:27:34 am

Change log for Downloads Pro 6.13 and 6.14 by Nicole
November 20, 2022, 08:24:34 am

Release date? by SMFHacks
November 20, 2022, 08:09:10 am

Can't install due to missing file? by SMFHacks
November 18, 2022, 06:55:45 pm

Powered by EzPortal