Support » Plugin: LH Signing » export subscribers lh signing

  • Resolved rheajap

    (@rheajap)


    Hello,

    I really do like this plugin. It is exactly what I am looking for.

    I have one queston. I think in the netherlands when you want an official ammount of unique subscribers you need the ip address also.

    Is it possible for this script to grab the ip address of the visitor and add it to the export?

    I really hope this is possible because then I am almost ready with working out our idea.

    Kind regards

    jap

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter rheajap

    (@rheajap)

    Ok I did find a sollution myself.

    I installed the register ips plugin for single and multisite.

    Then I edited lh-signing.php on line 1578

    I have added:

    $var[$i]['signup_ip'] = get_the_author_meta('signup_id', $user->ID;

    Works like a charm.

    Thanks

    Plugin Author shawfactor

    (@shawfactor)

    Your solution is a biut stop gap and it will be invalidated by plugin upgrades (like the one I did today to help your other issue).

    Instead I have added a filter in that section:

    $var = apply_filters( ‘lh_signing_csv_loop_filter’, $var, $id, $user);

    you should be able to hook into it and added you IP addresses (or anything else you need) and it won’t break on upgrades.

    Pete

    Plugin Author shawfactor

    (@shawfactor)

    If there is any other functionality you need let me know, if it is reasonably core I’ll add for free, if it is specialist my rates are very reasonable

    Pete

    Thread Starter rheajap

    (@rheajap)

    Hello,

    I don’t know what to do with the filter you have added in that section. Is it like when i click export below the confirmed people I can choose what details will come in the export?

    Or how can I use this?

    When I export the list it should be nice as it printed the ipaddress also from the signup-ip section.

    Can you explain what you expect me doing??

    Thanks for this answer allready.

    Regards jap

    Plugin Author shawfactor

    (@shawfactor)

    Firstly my filter code has a minor error so please upgrade to the latest version 2.68

    Then you just need to add something like this to your child themes functions.php or a custom plugin:

    function your_function($var, $i, $user){

    $var[$i][‘signup_ip’] = get_the_author_meta(‘signup_id’, $user->ID);

    return $var;

    }

    add_filter( ‘lh_signing_csv_loop_filter’, ‘your_function’, 10, 3);

    In wordpress it is best to use filters and actions to alter the behavior of core, plugins and your theme. As it allows upgrades

    As I said a nice review would be appreciated and if you need custom work please contact me.

    Thread Starter rheajap

    (@rheajap)

    Hello,

    To be honest I am not good in writing functions… I start to understand why its formulated and how it works but my knowledge is to little. So thank you for your example i will look at it and play with it.

    I will update my files in a few minutes. I do have a point of the core files what I think has to change a littlebit. When you put the shortcode in a page or post you get 4 extra areas for the the settings. Thats very nice. But there is one thing you cannot influence.

    When people subscribed to the list and come back there is a message telling:

    ” You have already added your signature” I did find this code on line 545 of lh-signing.php.

    Now, I edited manually this to look better. I replaced that line with:

    <blockquote>Hoi, u bent weer bij het IK STEM NIET biljet uitgekomen. Het ziet ernaar uit dat uw stem al geregistreerd is. Alle stemmen samen zullen een grote groep vormen die echt verschil kunnen gaan afdwingen. U kunt natuurlijk nog wel de site delen!</blockquote>

    Sorry tekst is in Dutch. Now it looks better with the rest of my site style.

    So, it would be really nice and awesome if you can edit or change that text also. Like a fifth small box on the page or post with the shortcode. Some people want different things like me and then you can make it without changing during updates.

    And what I am wondering.. are there shortcodes to put in the mail or in the confirmed messages to put in and show name or email or whatever detail of the subscriber to make it more personal.

    About the documentation and explaination. In the 4 boxes where you can put in your personal text.. you should place a sort of plscehorder with a short description of the possibilities. But thats only a suggestion.

    I want to write a review for you. Where do you want me to write it?

    Jap

    Thread Starter rheajap

    (@rheajap)

    Hello,

    Updated the files. Put in your function… changed one typo

    $var[$i]['signup_ip'] = get_the_author_meta('signup_id', $user->ID);

    Into

    $var[$i]['signup_ip'] = get_the_author_meta('signup_ip', $user->ID);

    And it works fantastic..

    YOU are my hero!!

    Plugin Author shawfactor

    (@shawfactor)

    okay well you are in luck I have added the ability to change via the config fields those messages in version 2.69 (to be fair my client also asked for similar functionality).

    I also added a note to show the available placeholders (that will work like shortcodes) that you can put into any of the message fields. These now appear below the appropriate fields.

    Can I ask you write a nice review please?

    Thread Starter rheajap

    (@rheajap)

    I will look at the update later this afternoon.. and I will write a review…

    Thank you for all you did..

    Jap

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘export subscribers lh signing’ is closed to new replies.