Tables in subcategories

Discussion in 'Templates, HTML, CSS, and Design Help' started by build, Apr 18, 2006.

  1. build Customer

    Hi

    Where do I alter the
    68Classifiedsv3/category.php?type=9

    I want to put some tables in BUT cannot find where and how to do this.

    I have looked in

    subcategories.tpl.php

    But that did not work
    To give you a idea something like this

    http://www.zfreeads.com/categories/27/28.html




  2. Eric Barnes Guest

    I believe he is just using the showlistings2.tpl.php template file. This can be changed through administration -> search settings. Then selecting the search results template to short description display.
  3. build Customer

    Hi Eric

    Hope you had a nice break.

    Yes I found that out BUT then it does not show all the details.

    In any case I want to alter it to how I want it with tables etc etc.

    So where do I go to start putting in some code for the tables etc.

    When I use debug it brought up the " subcategories.tpl.php" but no matter what I do in that it will not work.


  4. Eric Barnes Guest

    Honestly I am not sure what all changes he made to the template to get it show extra fields and so forth. But I am pretty sure that template file is showlistings2.tpl.php you may want to ask him about it though.
  5. John Snyder Staff

    this is the default showlistings2.tpl.php in use here, the colors have been changed (via css) and a few fields are not being displayed.

    Be sure you have chosen to display the fields that you may have turned off in the admin panel and that you are the right usergroup to view those fields.
  6. build Customer

    Hi John

    Yes all the above is correct BUT if I select the "short description display"

    it cuts out all the other info.

    Dose the "showlistings2.tpl.php" use a block insert or somthing for the listings?
    No matter what I do in that file ( like putting a table in it) it will not show.

    BTW when you select the "short description display" from admin where is that template file?

    If I can find that I might be able to see how it has put the table in it.
  7. John Snyder Staff

    hmm, haven't done the search settings switch in 3.1, I'll test it and see if I get the same results.
  8. John Snyder Staff

    The basic fields showed up for me. Remember that this uses the short description and not the descritption field. I made an edit and it appeared as it should. Just be sure what you are adding isn't within an {if} statement that isn't true, this would prevent any of your changes within that statement to display.
  9. build Customer


    I still do not get the details etc.

    John have you a snap shot on what you get so we are talking about the same thing here please.
  10. John Snyder Staff

  11. build Customer

  12. John Snyder Staff

    Mine is the unedited showlistings2.tpl.php with it changed via admin search settings.

    You may try and upload a fresh copy of showlisting2.tpl.php and see the results before modifications.
  13. build Customer

    Ok John

    I have put back the default showlisting2.tpl.php

    Here is what I get
    1) small details
    2) Long details

    Attached Files:

  14. John Snyder Staff

    Looks like you are just short a short-descritpion. Do these sample ads have short descriptions?
  15. build Customer

    John

    It is NOT the details etc that I want.

    If you look at yours you have a table layout with a border round all the box's

    Also if you look at this site you can see that it has table borders round the details etc

    http://www.zfreeads.com/categories/27/28.html

    This is what I did ask in my first post.

    "How to put a table in the listings"

    This has some what got side tracked.
  16. build Customer

    John

    I have found out how to do it see snap shot

    Thanks for all your help any way

    Attached Files:

  17. John Snyder Staff

    Sorry about that, I guess I was mistaken. I thought you wanted your showlistings2 to look like that one. At any case I'm glad you figured it out.
  18. Lagniappe Customer

    John (Build),
    Could you share your process.
    -Rory
  19. build Customer

    Yes no problem, Glad to help some one for a change

    Ok the file to alter is

    Alter
    viewlisting.tpl.php

    MAKE A COPY OF THE VIEWLISTING.TPL.PHP FIRST


    Look for
    {* Now show the main table *}

    Around line 33

    then replace it with the below
    Code:
    {* Now show the main table *}
    <table border="8" class="tableborder">
        <tr>
          <th colspan="2"><strong>{$listingtitle}</strong></th>
        </tr>
        <tr>
        <td valign="top" class="pformleft">
            <table width="100%" height="100%" border="1" cellpadding="0" cellspacing="1" class="norm">
                 {if $viewseller=="Y"}
                <tr> 
                    <td><strong>{$smarty.const.LANG_SELLER}:</strong></td>
                    <td><a href="viewmember.php?member={$ownerid}">{$ownername}</a></td>
                </tr>
                {/if}
                {if $viewaddress=="Y"}
                <tr>
                    <td><strong>{$smarty.const.LANG_ADDRESS}:</strong></td>
                    <td>{$owneraddress}</td>
                </tr>
                {/if}
                {if $viewcity=="Y"}
                <tr>
                    <td><strong>{$smarty.const.LANG_CITY}:</strong></td>
                    <td>{$ownercity}</td>
                </tr>
                {/if}
                {if $viewstate=="Y"}
                <tr>
                    <td><strong>{$smarty.const.LANG_STATE}:</strong></td>
                    <td>{$ownerstate}</td>
                </tr>
                {/if}
                {if $viewcountry=="Y"}
                <tr> 
                    <td><strong>{$smarty.const.LANG_COUNTRY}:</strong></td>
                    <td>{$ownercountry}</td>
                </tr>
                {/if}
                {if $viewphone=="Y"}
                <tr> 
                    <td><strong>{$smarty.const.LANG_PHONE}:</strong></td>
                    <td>{$ownerphone}</td>
                </tr>
                {/if}
                {if $viewprice=="Y"}
                <tr> 
                    <td><strong>{$smarty.const.LANG_PRICE}:</strong></td>
                    <td>{$listingprice}</td>
                </tr>
                {/if}
                {if $viewdate=="Y"}
                <tr>
                    <td><strong>{$smarty.const.LANG_DATE_ADDED}:</strong></td>
                    <td>{$dateadded|date_format:$dateformat}</td>
                </tr>
                {/if}
                {if $viewexpiration=="Y"}
                <tr> 
                    <td><strong>{$smarty.const.LANG_EXPIRATION}:</strong></td>
                    <td>{$listingexpiration|date_format:$dateformat}</td>
                </tr>
                {/if}
                {if $url<>""}
                <tr> 
                    <td><strong>{$smarty.const.LANG_EXT_URL}:</strong></td>
                    <td>{$url|linkurl:30}</td>
                </tr>
                {/if}
                {if $viewhits=="Y"}
                <tr> 
                    <td><strong>{$smarty.const.LANG_VIEWS}:</strong></td>
                    <td>{$listingviews}</td>
                </tr>
                {/if}
                {* Extra Fields *}
                {foreach from=$extra item=extras}
                <tr>
                    <td><strong>{$extras.title}:</strong></td>
                    <td>
                        {if isset($extras.value)}
                          {foreach key=key item=item from=$extras.value}
                            {$item}<br />
                          {/foreach}
                         {/if}
                    </td>
                </tr>
                {/foreach}
                {* End Extra Fields *}
                {if $description<>""}
                <tr> 
                    <td colspan="2"><strong>{$smarty.const.LANG_DESCRIPTION}: </strong><br />{$description}</td>
                </tr>
                {/if}
            </table>
    That should be it

Share This Page