+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: posted_by Icon in Listing.tpl ?

  1. #1
    Member
    Join Date
    Aug 2012
    Location
    Germany and Greece
    Posts
    88

    Question posted_by Icon in Listing.tpl ?

    Hello community,

    I want to show some logos as info in the search.

    The Info vehicle acciden works.
    See the example.

    Now I want to display a logo to distinguish the listings, dealer or private.

    I adapted the listing.tpl but unfortunately it does not work.
    The field in the database, posted_by remains empty.

    In the search field that exists and works.

    Who can help me please?

    Code:
    Only registered members can view the code.
    listing icons.jpgdatabase.jpgadvanced search.jpgfield posted_by.jpg


    Thanks!!!

  2. #2
    Im trying to place a icon on the listing my self to see if it's a dealer or a privat listing.

    Have you made a new field for the dealer icon ?

    isnt it possible to take it from the account info ?

  3. #3
    Dear Athanasios Christou,

    It's likely that posted_by field used only in the search forms, to make it working for listings grid view you have to add it to the function which gets listings:

    rlListings -> getListings for browse pages
    rlSearch -> search
    and some other functions as getListingsByPeriod

    find place where script builds sql query and add posted by as below

    Code:
    Only registered members can view the code.
    where `T7` is alias for the accounts table

  4. #4
    Quote Originally Posted by Peter Jonsson View Post
    Im trying to place a icon on the listing my self to see if it's a dealer or a privat listing.

    Have you made a new field for the dealer icon ?

    isnt it possible to take it from the account info ?

    if you have icon in the account you can get it using same logic as in my previous post:

    Code:
    Only registered members can view the code.
    and then access in the tpl as {$smarty.const.RL_FILES_URL}{$listing.Dealer_logo}

    Dealer_logo is just example of field, please use your accounts logo field for this

  5. #5
    How about if i have a icon that i wanna show that arent from the dealers account.
    I will have a icon at /images/dealers/dealericon.png that i want to use.

    But i dont really get how to do it :/
    I have added the code to rlListings.class.php and rlSearch.class.php an then the other tpl code where i wanted to show the logo from the dealer but all i get a broken image link because the image goes to "mywebsite.com/files" and nore more than this.

    Also should there be a if statement ? if the listing are owned by a dealer then show this image ?

  6. #6
    Member
    Join Date
    Aug 2012
    Location
    Germany and Greece
    Posts
    88

    Thanks Mike F.,

    it works fine.

    @ Peter Jonsson,

    i use this code in listing.tpl

    Code:
    Only registered members can view the code.
    I use a static Pic, haendler.png, in my tamplet-folder img.
    all dealer Listings display a static pic.

    haendler_works.jpg

  7. #7
    Quote Originally Posted by Athanasios Christou View Post
    Thanks Mike F.,

    it works fine.

    @ Peter Jonsson,

    i use this code in listing.tpl

    Code:
    Only registered members can view the code.
    I use a static Pic, haendler.png, in my tamplet-folder img.
    all dealer Listings display a static pic.

    Attachment 255
    Thanks, but where exactly did you place the:

    Code:
    Only registered members can view the code.
    I cant seem to get this to work :/.



    EDIT:
    Got it working now, just searched rlListings.class.php and rlSearch.class.php for "$sql .= "`T1`.*, `T3`.`Path` AS `Path`, `T3`.`Key` AS `Key`, `T3`.`Type` AS `Listing_type" and i just put "`T7`.`Type` as `posted_by`, " in that line.
    Last edited by Peter Jonsson; December 11, 2012 at 10:48 PM.

  8. #8
    Hi and happy new year!
    I installed this but doesn't seem to get it to work on New Listings page, anyone with a clue?

    //Morgan
    Free Advertising at Fyndklippet.se


  9. #9
    Quote Originally Posted by Morgan Bohman View Post
    Hi and happy new year!
    I installed this but doesn't seem to get it to work on New Listings page, anyone with a clue?

    //Morgan
    You probably have to add posted_by to the sql to the function getRecentlyAdded( in the rlListings class in addition to the getListings function

  10. #10
    Yepp you're right. BTW Mike, take a look at my site, there's a difference in the block headers width depending on if you are browsing with Safari, which shows the width and padding wrong, and FF, IE, Chrome which are right. You see it on the home page blocks left. The add above is 250 in lenght.

    //Morgan
    Free Advertising at Fyndklippet.se


+ Reply to Thread