Email Field under Custom Fields not Working with Popular Post View Widget

This topic contains 13 replies, has 2 voices, and was last updated by  Paolo 8 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #40138

    doublefish
    Expired Member
    Post count: 53

    Hey Guys,

    2 issues regarding the email field under custom fields.

    1. How can I change the default “Send Inquiry | Send To Friend” anchor text when using the email custom field to either the actual email or some other text like “Email Me”? I’ve tried to enter text into the “default value” field within the custom fields email tab but it doesn’t change anything.
    I also want to do the same thing for the website. I would rather have control over the output text here as well.

    2. When I click on the “Send Enquiry | Send To Friend” link on the actual listings page it launches the pop up form for the user to send an inquiry but when I click it from from the home page (using the Popular Post View Widget in the Home Content section) it doesn’t do anything and I see the javascript:void(0); at the bottom of the browser where the URL should be.

    Thanks for the help guys!!

    #40208

    Paolo
    Site Admin
    Post count: 31206

    1) using translation file: http://docs.wpgeodirectory.com/translate-core/

    2) this is an error, there shouldn’t be an option to put those links in the listings page. It is not possible to call those forms from an archive page.

    Thanks

    #40211

    doublefish
    Expired Member
    Post count: 53

    Hey Paolo,

    Can you expand on 2 for me a little more?

    “Their shouldn’t be an option to put “Those Links” in the listings page”…

    So should I not try and output the email and website within the Popular Post View widget?

    Sorry if I’m misunderstanding…

    #40215

    Paolo
    Site Admin
    Post count: 31206

    Website yes, cause it’s a link, but the links to the enquiry forms and send to friend will only work on the listing detail page.

    It’s an oversight on our side and in the next version that option will be removed.

    Thanks

    #40218

    doublefish
    Expired Member
    Post count: 53

    Okay thanks for the quick response Paolo.

    So what’s my best option to display a members email in this section if that what’s going to output?…a simple text field? And if so, how might it work in the next version? When is the next version due to come out?

    You guys are doing a great job.

    Thanks again Paolo!

    #40225

    Paolo
    Site Admin
    Post count: 31206

    hi,

    to be honest with you, if i was one of your website potential advertisers and I noticed you’d put my email adddress available for any spammer to spam it, I would stay away with it.

    Email address should always be masked if made available so that can’t be automatically scraped.

    In case you want to hurt yourself and show the email address anyway, there is a hook for that and you can also get the email address with a simple function.

    Here you can read how the hook is used: https://wpgeodirectory.com/support/topic/adding-a-button-to-listings/#post-35309

    This is the code snippet to echo the email address as text:

    The snippet to echo the listing email as text is:

    
    
    echo $post->geodir_email;
    

    let us know how you went.

    Thanks

    #40226

    Paolo
    Site Admin
    Post count: 31206
    This reply has been marked as private.
    #40231

    doublefish
    Expired Member
    Post count: 53

    Hey Paolo,

    Just gave 5 star rating…

    In regards to your last comment. You’re right. I do NOT want member emails available to scrapers but my client wants member emails available. I’d rather not echo the email for the same reasons….I don’t see another option to make it work now…

    Do I just need to wait for the next version of GD in order to have a masked link to clients email?

    #40238

    Paolo
    Site Admin
    Post count: 31206

    Hi again and thanks for the review.

    Next minor release (today) will only fix a couple of bugs that were discovered yesterday in 1.4.6

    In the next after this we will remove the option to show the email custom field in listings because it only shows the links to the enquiry and send to friend forms, that will never work on an archive page.

    However we will not provide an alternative masked link. This is something that it has never been requested here.

    For something to be considered, it has to be requested there and become popular through users votes.

    Thanks

    #40272

    doublefish
    Expired Member
    Post count: 53

    Well Paolo,

    I don’t think that’s the right answer as the option is here and an oversight by your team. I think you should offer a viable solution since someone is trying to use the option you have available. I’m sure it;s not a difficult fix…

    Anyway, even if I add it to the feature request area based on what you’re saying I don’t see a solution happening before I have to release this project to my client so…

    I don’t really know what to say.

    Thanks for the help and honesty.

    #40274

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    yes and we are correcting the oversight by removing an option that wasn’t supposed to be there.

    I provided a solution to show the link or the text field, which is what your customer originally requested.

    I think I gave you an alternative, I’ve also told you why it’s a bad idea to present email addresses anywhere, I didn’t say we would have provided a custom solution for your customer’s unique need.

    We don’t see this as an option that could be useful to all members and presenting a different output in the detail page and listings page require much more work than you probably think.

    Thanks

    #40276

    Paolo
    Site Admin
    Post count: 31206

    UPDATE:

    I just discovered that wordpress offer a function for this that I didn’t know.

    Instead of :

    echo $post->geodir_email;

    use

    echo antispambot($post->geodir_email);

    Thanks

    #40282

    doublefish
    Expired Member
    Post count: 53

    Paolo,

    Looks like the

    echo antispambot($post->geodir_email);

    has been depreciated. Thanks for researching it a bit more for me.

    If you look at source code you’ll see scrambled code but if you use dev tools you can see the email. So I guess they felt that if dev tools can see the email on the fly then so can a spam bot.

    I do appreciate the other options you provided they just won’t work for me.

    Paolo, when I click on the default email option in the custom fields I see “Click Here to Email Me” in the default value section. So it looks like your team tried to have this function as a masked email originally. Correct?

    So I just want to clarify…not trying to piss you off…are you removing the whole email option or just the option to the inquiry forms (“Send Enquiry | Send To Friend”) since it was an over site.

    Thanks for your patience Paolo.

    #40354

    Paolo
    Site Admin
    Post count: 31206

    Hi Again,

    the function is not deprecated, where did you read that?

    https://codex.wordpress.org/Function_Reference/antispambot

    Obviously browser are able to read it, or it would make it impossible for anyone to send an email, but bots are not browsers, I would say that 99% of them will only see the encoded text.

    The default value of the email field after instal is empty, so “Click Here to Email Me” must be something you added?

    Thanks

Viewing 14 posts - 1 through 14 (of 14 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket