Import address book v1.0

  • i am going through this plugin and adapting it to my theme.. i notice that you have left hardcoded english text in the exmaple.php file and one reference to your centillien domain in there.

    i am converting the labels to elgg labels and also have replaced the image file for the import button with a css text/image version.

    if you put this onto github i will add my changes, if you like.


  • i've been bugfixing this for about 5 hours.. i found 10-20 bugs.
    i have fixed the bugs i have found plus:
    replaced the open inviter style elements with elgg styles (such as buttons and icons).

    • removed extranious form elements (the button was duplicated).
    • replaced hard coded text with elgg language strings to allow multi-language support.
    • replaced import button image with css + text + images.
    • changed the colour of the 'ok' messages to green (from blue).
    • fixed the formatting of the email text that is sent (line breaks were incorrectly coded).
    • corrected the variables that are passed through to the emails, since they were incomplete /incorrect in places.
    • corrected some spelling errors in the language file.

    i found while testing that gmail blocked me from sending mails until i logged in to gmail directly to confirm that the sending was authorised. i haven't tested hotmail and yahoo since i deleted my accounts with them a while ago.

  • @Ura soul, it is now on Github, see code repository link. You can create a fork and submit your changes. Thanks in advance for the improvements  

  • ok thanks.. i am almost ready to push to github..
    one issue remaining is that the only way i am able to get open-inviter to accept my username and API key is if i enter them in the wrong fields in the admin panel of the plugin. (e.g. use key for name and vice versa). i looked through the plugin code and from what i have seen there is nothing wrong with the plugin code... so i am unsure what to do..

    have you seen this issue gerard?
    i need to put the username in the top field and the key in the bottom field.. yet the labels and variable names in the plugin are the other way around.

  • No, I don't have that issue. I also checked the code, but all fields and text areas are correct. I guess leave it be. The only thing I can imagine that this is doing, is memcache fooling around with you.

  • i have disabled memcache, so that's not the cause here.

  • strangey.. i now find that the plugin will only function if i have the fields in the 'correct' way round.
    i have no explanation for that.. the plugin was working fine with them reversed.

    oh well.. just another illogical day in the logical world of my pc.

  • wtf!?
    i just encountered the same login issue.. and was unable to login to retrieve emails until i reversed the open inviter credentials again in the admin panel.. lol

  • i am definitely looking at two installs here, both with the two admin values entered in opposite ways / orders..
    and both work (one of them initially caused a 'cannot find any email addresses' error - yet when run a 2nd time functioned correctly). 
    i have cleared the cache on both installs.

    so i can only conclude that this is relating to the way that the open inviter server code is functioning. thus i will conclude my coding and upload to github.

  • i have pushed my changes in github.. 

    i just saw that the mails that this plugin is sending are text format and contain no hyperlinks. 

    so i will look at plumbing this into the html format messages, the same as the other messaging plugins do.

  • Thanks Ura, after testing and review I'll publish an update tomorrow with you as co developer !

    About the emails, don't forget that they are sent out by the user account and not the site. But nice formatting is always better.

  • ok sure. :)
    hmm.. i see that the elgg_send_email function includes a from field.. though i am not currently seeing an obvious way of using that to send via an external webmail service.

    is there a reason that the plugin 'should' use the webmail service to send the mails out, instead of using the mail sending method of the elgg server? the only reason i can think of for that is to avoid spam folders and to catch the attention of the receiver.

  • It should be possible to use elgg email. We can register a hook: elgg_register_plugin_hook_handler("email", "system", importer_email_handler_hook) I never done that and I am  already fighting with hooks in a different plugin. I am only familiar with sending notifications using Elgg.


  • since open inviter uses the webmail server to send the mail, the main challenge is replacing that code with the use of the internal elgg mail function.. i think hooks are unneccesary in this case since there is no email event to hook into until one is created by the importer plugin code.

  • @ura soul, I like your new icons but they are not in line with fbnotify plugin. My initial icon was made similar, since they appear on the same page next to each other. Any ideas how to better fit them together and reuse your work ?

  • @gerard: ok, i will look at this soon. i prefer using css/text to a solid image since that is a more user-friendly method. most likely i can just resize the text/images via css.

  • I'v solved that now with a plugin setting, where the user can choose between your nicer images or the inline picture. If oke with you, I'll upload a new version

  • oh ok, sure..
    on a similar thread.. did you choose to only enable the 3 webmail providers since they were the only 3 of the many services that you could find that was functional? i can see roughly 100+ services listed on the open inviter site and i know that open inviter stopped being supported around 2 years ago - so maybe some of them need to be updated?

  • I did not test them all, since I do not have accounts on those 100 services. I selected the ones I have and tested them. These 3 where the ones that worked. Expanding can be done along the way, if we can test them and are working. I am not aware of them being stopped supporting. Site is still working, api request too. Latest software release is from jun 2012

  • ok, i just looked at the openinviter forum and there are indeed now many posts from this year and it is quite active.. last time i looked (months ago) i was confused since there was no activity and in a variety of ways the project appeared long since abandoned. 
    i think i am jumping between parallel universes again. ;)

  • Can you learn me how to do that ? Maybe I'll find a universe that I like better :-)


  • Category: Third Party integrations
  • License: GNU General Public License (GPL) version 2
  • Updated: 2020-12-31
  • Downloads: 1396
  • Recommendations: 8

Other Projects

View Gerard's plugins