+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Anyway to assign meta picture?

  1. #1

    Anyway to assign meta picture?

    Hi Flynax,

    Is there anyway to assign meta picture for each page? Like: search-on-map, comparison, register?
    It would look better when sharing those page on social network.

    Thanks

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello Wei,

    If you use Social Meta Data plugin you can set it in Basic Settings > Social Meta Data > Logo name

  3. #3
    Quote Originally Posted by Rudi View Post
    Hello Wei,

    If you use Social Meta Data plugin you can set it in Basic Settings > Social Meta Data > Logo name
    Hi Rudi,

    I'm using it. But I want to assign different image for different pages. Just like featured image on wordpress.

  4. #4
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    You can try this:

    go to plugins > socialMetaData > rlSocialMetaData.class.php

    find:
    PHP Code:
    Only registered members can view the code
    change it like that:
    PHP Code:
    Only registered members can view the code
    replace YOUR_PAGE_KEY and YOUR_IMAGE with the names of your page and image respectively
    Last edited by Rudi; November 3, 2020 at 09:02 AM.

  5. #5
    Quote Originally Posted by Rudi View Post
    You can try this:

    go to plugins > socialMetaData > rlSocialMetaData.class.php

    find:
    PHP Code:
    Only registered members can view the code
    change it like that:
    PHP Code:
    Only registered members can view the code
    replace YOUR_PAGE_KEY and YOUR_IMAGE with the names of your page and image respectively
    Thanks Rudi. You're always helpful and generous to Flynax community

  6. #6
    Hi Rudi,

    Since the new update Social Meta Data version 1.2.6, the code is no longer work. From your previous solution in file rlSocialMetaData.class.php

    Instead of:
    Code:
    Only registered members can view the code.
    Now they have
    Code:
    Only registered members can view the code.
    So I made the change upon your previous suggestion to this

    Code:
    Only registered members can view the code.
    But it not working. Upon inspect social meta picture for page with key: house_for_sale, and car_for_sale
    The data still show the default setting at socialMetaData/{$config['smd_logo']}

    It seems that the plugin does not recognize if ($page_info['Key'] == 'car_for_sale')
    Could you please revise the code?

    Thank you so much

  7. #7
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello Wei,

    before the line if ($image) {

    add your code:
    PHP Code:
    Only registered members can view the code

  8. #8
    [QUOTE=Rudi;33001]Hello Wei,

    before the line if ($image) {

    add your code:
    PHP Code:
    Only registered members can view the code
    /QUOTE]

    That works great Rudi. Thank you so much.
    Can we also have it work for listing type page and category page like:

    Code:
    Only registered members can view the code.

  9. #9
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Put the condition for category to the first place like:

    PHP Code:
    Only registered members can view the code

  10. #10
    Hi Rudi seriously $category['Key'] and $listing_type['Key'] were just me making up. I thought the correct code were different? I tried it at the first time, too. But it not working. I have listing type key: for_rent, so I did try earlier

    Code:
    Only registered members can view the code.
    And it did not work, so I look at admincp > page and recalled that they have a page here for every listing type. And found that page for my listing type: for_rent, the page key is: lt_for_rent, so I used your code ealier

    Code:
    Only registered members can view the code.
    And it works, so for listing type page it is solved. But for category page, I'm still stuck ((
    I tried

    Code:
    Only registered members can view the code.
    But it not working. ((

+ Reply to Thread