Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions #1

Closed
rohit1290 opened this issue Jan 31, 2016 · 9 comments
Closed

Suggestions #1

rohit1290 opened this issue Jan 31, 2016 · 9 comments

Comments

@rohit1290
Copy link
Contributor

  1. Why have you uploaded the entire elgg folder when you are just editing web_services folder. People have to download the entire elgg setup just to get that one folder.
  2. Why are you editing the core files? Once a new version of elgg is available like 1.12.x to 1.12.y the entire folder will be replaced with the original core source code and people using this will have to again upload your code. This will be very complicated to maintain.
@manlui
Copy link
Owner

manlui commented Jan 31, 2016

thanks I will just keep the web_services folder only.

@rohit1290
Copy link
Contributor Author

Is this finalized? can I use it on my server?

@rohit1290
Copy link
Contributor Author

In the readme file its written elgg 1.0-1.8 but in the mainfest file its mentioned elgg release 1.9. Which one is correct?

@manlui
Copy link
Owner

manlui commented Feb 3, 2016

No, is not finalized, I still adding features to it. I test it on 1.10, but I think will work on >= 1.9.

@rohit1290
Copy link
Contributor Author

I was following your instruction file
https://docs.google.com/document/d/1ZJEEu5otdpjHVPNc0au9tbaUTY9jzB3CBEGfzYYUQpo/edit

There is no instruction on how to obtain the Google API Key?
What services to select. How to get the API key?

@rohit1290
Copy link
Contributor Author

and 2nd things was, by what time will this app be ready to use. Even I want to use the app for my user. This is going to be awesome. Thank you for your hard work.

@manlui
Copy link
Owner

manlui commented Feb 11, 2016

Yes, you can create a Google API Key in link: https://developers.google.com/cloud-messaging/android/client
This is for Google Cloud Messaging, if you following following their instruction it will enable the right service for you. Is not a require thing for the app to work, only if you want to see the push notification on your phone for the message.

You will also need to edit the file in: mod/messages/start.php
on line 320 add following line
push_notification_message($sender->name, $sender->username, $recipient->name, $recipient->username, $message_sent->title, $message_sent->description);

then also add the following function on the the bottom of that page.

//send gcm to phone
function push_notification_message($sender_name, $sender_username, $recipient_name, $recipient_username, $message_sent_title, $message_sent_description)
{
$path = elgg_get_plugins_path();
include_once $path.'web_services/lib/GCM.php';
$gcm = new GCM();
$result = $gcm->setup_message($sender_name, $sender_username, $recipient_name, $recipient_username, $message_sent_title, $message_sent_description);
if ($result) {
echo "Message success sent";
} else {
echo "Fail send message";
}
}

msg

@manlui
Copy link
Owner

manlui commented Feb 11, 2016

I think you can start using it now. The only feature it may still need to update the api call is to for adding a album view. All other api call I will not making a lot of change to it.

@rohit1290
Copy link
Contributor Author

As you mentioned that I need to edit the start.php file of messages plugin for push notification but I am not very comfortable with that idea. If I change any core source code then all of these will be changed back to original source code if someone update their elgg version. The modified file will be simply replaced by elgg original file. So to over come that problem I have done some tweet on web services start.php file.

View changes here: rohit1290@b967951

But the problem is that I haven't tested it. I don't have a test instance. All I have is a live website and I don't want to use it for testing purpose. Do you have a testing server? Would you be able to test the code? If the code works then I will create a pull request for you so that you can merge the changes to your repository as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants