As discussed briefly we want to implement pushcrew notifications for desktop and mobile.
The website[obscured] is a LinkedIn type website for (younger) football players that want to promote them self.
We want to use pushcrew for:
1. Communication between members of the website (players, parents, scouting, trainers, club)
2. System messages from football4everyone to members
a. Player has been underwritten
b. New video has been posted
c. Player that is followed by subscriber has updated his profile
3. Promotion messages
When a visitor comes to the website the visitor will be asked:
If the visitor is logged in(definition of logged in):
$_SESSION['loginok'] = "ok"; $_SESSION['username'] = $row["email"]; $_SESSION['player_id1'] = $row["player_id"];
then the pushcrew subscriberid should be inserted into the player_profile_basic_information table:
pushcrew_subscriberid = pushcrew_subscriberid pushcrew_subscriberid_active = 0 or 1
If visitor is not logged in, please save a cookie with the pushcrew_subscriberid. When the user logged in afterwards or create an account and then loggedin the pushcrew_subscriberid will be linked to his account.
For the messaging I created an table, all messages will pass through this table:
CREATE TABLE IF NOT EXISTS `push_messages` ( `message_id` int(11) NOT NULL AUTO_INCREMENT, `pushcrew_sender_id` varchar(30) DEFAULT NULL, `pushcrew_receiver_id` varchar(30) DEFAULT NULL, `message_body` text, `message_send` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`message_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
So for me, what the members do, I will insert it in this table and the script (pushcrew script) will process it. Message_send field is changed to 1 if the message is processed by pushcrew.
ATTENTION: Pushcrew seems to work only with https.