Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 12361
Latest: nneocsoi
New This Month: 7
New This Week: 0
New Today: 0
Stats
Total Posts: 39803
Total Topics: 7013
Most Online Today: 54
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 35
Total: 35

Author Topic: About Layout Options  (Read 746 times)

0 Members and 1 Guest are viewing this topic.

Offline ajac63

  • SMF Classifieds Customer
  • Jr. Member
  • *****
  • Posts: 51
    • View Profile
    • "blag-it" Forum
About Layout Options
« on: May 16, 2019, 10:20:54 am »
What do I have to do in Layout Settings to enable three rows of four categories?  So, as follows:
Category 01  Category 02  Category 03  Category 04
Category 05  Category 06  Category 07  Category 08
Category 09  Category 10  Category 11  Category 12

The set-up option I went with is where you have the 'Classifieds' link at the top of the forum enabling visitors to get to the classifieds section that way.

Thanks if anyone can help.
« Last Edit: May 16, 2019, 10:24:16 am by ajac63 »

Offline ajac63

  • SMF Classifieds Customer
  • Jr. Member
  • *****
  • Posts: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #1 on: May 17, 2019, 12:31:50 am »
Can someone please answer the thread.  Layout Options isn't allowing me to do what I expected.  I've paid for this...

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14916
    • View Profile
Re: About Layout Options
« Reply #2 on: May 17, 2019, 11:09:22 am »
There are currently two layout options.
The default option is the categories are vertical rows the description, number of listings, image of classifieds category

The second option is found admin -> layout settings -> “Use simple main layout with recent listings as the focus”  which focuses on listings and puts classifieds categories as a small list on the left side.

For the changes you need would require you to make edits to themes/default/classfieds2.template.php function template_classifiedsmain  You would need to change the loop structure to make each category title inside a td in the table tag then stop after x amount of and add the closing tr tag. I do that in a few spots in the code as reference.

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: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #3 on: May 18, 2019, 07:22:19 am »
Many thanks for your help and sorry for late reply...  I think I was expecting some sort of wysiwyg layout editor - I guess that was wishful thinking ::). But I'm sure I'll work it out.

Offline ajac63

  • SMF Classifieds Customer
  • Jr. Member
  • *****
  • Posts: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #4 on: May 20, 2019, 04:11:22 pm »
Right, I'm getting there, but I now have one long column of 12 categories on the let-hand side, so I'm thinking I will have to go with your suggestion of - 'You would need to change the loop structure to make each category title inside a td in the table tag then stop after x amount of and add the closing tr tag.'

Thing is my html knowhow is not great, so if someone could show me the actual lines of html code, that would be great.  Thanks.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14916
    • View Profile
Re: About Layout Options
« Reply #5 on: May 20, 2019, 05:00:15 pm »
Which layout setting are you using right now?
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: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #6 on: May 21, 2019, 03:14:56 pm »
Many thanks.  I have 'simple layout settings...' deselected and then after that I also deselected any option to do with auctions as I only want straight listings.
See attached image showing one large column on the left. [ Guests cannot view attachments ]
-
BTW - why am I not authorised to view attachments? [ Guests cannot view attachments ]
« Last Edit: May 21, 2019, 06:42:45 pm by ajac63 »

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14916
    • View Profile
Re: About Layout Options
« Reply #7 on: May 21, 2019, 04:33:45 pm »
To access downloads/attachments enter your license key under https://www.smfhacks.com/index.php?action=license
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: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #8 on: May 21, 2019, 06:41:50 pm »
Thanks, that seemed to work.  After a browser refresh anyway...  So, what are the lines of html I need to use.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14916
    • View Profile
Re: About Layout Options
« Reply #9 on: May 21, 2019, 09:21:59 pm »
Change these in classifieds2.template.php
Find
Code: [Select]

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

$totallistings  = Classifieds_GetListingTotals($row['ID_CAT']);

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>
<td class="windowbg2">' . parse_bbc($row['description']) . '</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>
<td class="windowbg2">' . parse_bbc($row['description']) . '</td>';
}



// Show total listings in the category
echo '<td align="center" class="windowbg">', $totallistings, '</td>';

// Show Last Post
if (!empty($modSettings['class_set_show_cat_latest_listings']))
{
echo '<td class="windowbg">';
if (!empty($row['ID_LISTING']))
{

echo '<span class="smalltext">' .  $txt['class_last_post'], ' <a href="',$scripturl,'?action=profile;u=',$row['ID_MEMBER'],'"' . (!empty($row['online_color']) ? ' style="color: ' . $row['online_color'] . ';" ' :'' ) . '>',$row['real_name'],'</a><br />',

'<a href="' . $scripturl . '?action=classifieds;sa=view;id=',$row['ID_LISTING'],'">',shorten_subject($row['listingtitle'], 24) . '</a><br />',$txt['class_txt_on'],timeformat($row['datelisted']) . '</span>';
}

echo '</td>';
}


// Show Edit Delete and Order category
if ($g_manage)
{
echo '
<td class="windowbg2"><a href="' . $scripturl . '?action=classifieds;sa=catup;cat=' . $row['ID_CAT'] . '">' . $txt['class_text_up'] . '</a>&nbsp;<a href="' . $scripturl . '?action=classifieds;sa=catdown;cat=' . $row['ID_CAT'] . '">' . $txt['class_text_down'] . '</a></td>
<td class="windowbg"><a href="' . $scripturl . '?action=classifieds;sa=editcat;cat=' . $row['ID_CAT'] . '">' . $txt['class_text_edit'] . '</a>&nbsp;<a href="' . $scripturl . '?action=classifieds;sa=deletecat;cat=' . $row['ID_CAT'] . '">' . $txt['class_text_delete'] . '</a>
<br />
<a href="' . $scripturl . '?action=classifieds;sa=catperm;cat=' . $row['ID_CAT'] . '">',$txt['class_text_cat_permisisons'],'</a>

</td>';

}


echo '</tr>';

if ($subcats_linktree != '')
{
echo '
<tr class="windowbg3">
<td colspan="',$num_cols , '">&nbsp;<span class="smalltext">',($subcats_linktree != '' ? '<b>' . $txt['class_sub_cats'] . '</b>' . $subcats_linktree : ''),'</span></td>
</tr>';
}


}

change to
Code: [Select]
$maxrowlevel = 4;

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

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


echo '<td class="windowbg"><a href="' . $scripturl . '?action=classifieds;cat=' . $row['ID_CAT'] . '">' . parse_bbc($row['title']) . '</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: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #10 on: May 22, 2019, 03:05:15 am »
Once again many thanks for your help.  Thing is I can find a section of code beginning with:

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

         $totallistings  = Classifieds_GetListingTotals($row['ID_CAT']);
but not ending with:
<tr class="windowbg3">
            <td colspan="',$num_cols , '">&nbsp;<span class="smalltext">',($subcats_linktree != '' ? '<b>' . $txt['class_sub_cats'] . '</b>' . $subcats_linktree : ''),'</span></td>
         </tr>';
         }


      }

So, I didn't replace it just inn case.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14916
    • View Profile
Re: About Layout Options
« Reply #11 on: May 22, 2019, 07:33:47 am »
It starts on line 569 in that file.
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: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #12 on: May 22, 2019, 01:27:48 pm »
OK, it works. I now have the 12 categories arranged in 4 columns by 3 rows, but without the category images.  I know you told me already, but is there no way of showing the images?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 14916
    • View Profile
Re: About Layout Options
« Reply #13 on: May 22, 2019, 01:32:14 pm »
Well you could. Just depends on how you want it to show up.
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: 51
    • View Profile
    • "blag-it" Forum
Re: About Layout Options
« Reply #14 on: May 22, 2019, 06:02:51 pm »
I was thinking of having them to the left of category names.

 

Related Topics

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

+- Recent Topics

Getting an error while installing SMF Gallery Pro by SMFHacks
August 18, 2019, 06:54:37 pm

Hashtag Mod Install Error by SMFHacks
August 15, 2019, 08:17:45 am

Rotating Image URLs by SMFHacks
August 05, 2019, 04:26:57 pm

[Mod]Block Proxy VPN On Registration by SMFHacks
August 01, 2019, 10:42:37 pm

[Mod]Nofollow Signature Links by SMFHacks
July 30, 2019, 11:52:28 am

Thinking of getting Ad Seller Pro as well by ajac63
July 28, 2019, 04:46:34 am

Just some questions about Ad Management mod by ajac63
July 26, 2019, 12:12:26 pm

[Mod]Login Menu Button by SMFHacks
July 05, 2019, 03:26:24 pm

Update by SMFHacks
June 19, 2019, 10:58:25 am

About Comments Approval by ajac63
June 12, 2019, 07:48:52 pm

Powered by EzPortal