I am making an application in CodeIgniter and I need a Messaging Library Module there and I got a Library name Mahana. The Link is as follows.
https://github.com/jrmadsen67/Mahana-Messaging-library-for-CodeIgniter/tree/master/application
But I am unable to apply it as it has no controller and View portion. I am very new to CodeIgniter. Can any one provide me any link of total Mahana Librery or any other Messaging Library for CodeIgniter
Thank You
What's your problem ?
First you must create in the db, the tables from the dump mahana.sql,
and after use the variable that are in the configuration file config/mahana.php (USER_TABLE_TABLENAME, USER_TABLE_ID, and USER_TABLE_USERNAME) to integrate with a fast table access.
To use the library just put in your controller :
$this->load->library('mahana_messaging');
after that, when you want to get a message, create an object, and put in the method *get_message* the message id, and sender id, it will return a single message, including the status for specified user.
$mahana = new Mahana_messaging();
$msg = $mahana->get_message($msg_id, $sender_id);
U can also get the full thread of conversation using the method *get_full_thread*, it will return a entire thread conversation. To send a new internal message, that create a new thread, you must use the method *send_new_message* and pass the sender id, the recipient, the subject, the body, and finally the priority (this information, usually will be get from a web form, that you have created previously)
function send_new_message($sender_id, $recipients, $subject='', $body='', $priority=PRIORITY_NORMAL)
and so on ... there are other functions that permit you to reply a message, get partecipant...
Good work
Does this help at all????
Related
I am trying to add a Logic Hook for Emails synced from IMAP Mail server.
In the end i want trigger a hook when a new mail gets synced and check the senders mail if its saved in one of the accounts.
The problem is that the Synced Mails dont get saved (at least not in InboundMail or Emails module) so the after/before_save does not trigger.
Here is my hook from logic_hooks.php:
$hook_array['after_save'][] = Array(1, 'Create Lead', 'custom/modules/InboundEmail/LeadLogicHook.php', 'LeadLogicHook', 'handleLead');
It does not work in InboundEmail and Email Module.
And the LeadLogicHook:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
class LeadLogicHook
{
function handleLead($bean, $event, $arguments)
{
_ppl("Test");
}
}
Is this even possible with logic hooks?
EDIT: Added some Code
No need for logic hook or any other custom code. Sugar/SuiteCRM use a scheduler job to fetch email from IMAP server. You can check scheduler job function (function::pollMonitoredInboxes) which fetch emails. That contain code which is used for email fetching. track back code and you will find everything you want.
What version of sugar are you using?
You can, for example, generate an after_save hook in the E-mail module instead of inboundEmail
Would be like this:
$hook_array ['after_save'] [] = Array (1,'Create Lead','custom/modules/Emails/LeadLogicHook.php','LeadLogicHook','handleLead');
Do this and see if the email fires!
Another possibility would be to use the after_relationship_add, because usually, the email is associated with some lead, account, or contact. try to create a hook in the module that your email is associating with and generate the operation from there
one last possibility (I do not recommend this) is to create a trigger in your database for when the data enters the table, perform the check and take some action
I think it's possible, if after/before_save not triggering then try some similar logic hooks. The following are some logic hooks that I think could help.
before_retrieve
after_retrieve
before_restore
after_restore
server_roundtrip
after_session_start
after_entry_point
Comment if you want more details, like how to use logic hooks e.t.c.
when i add new recepient and sent the document in template using below code
$templateRole = new \DocuSign\eSign\Model\TemplateRole();
$templateRole->setEmail("user#email.com");
$templateRole->setName("User Name");
$templateRole->setRoleName("Admin");
I use Docusign Php Client, you can find the whole code below I used for this on that page.
Here it send the email containing document to user#email.com, but user#email.com's user is not able to sign that document.
I've also added the dynamic text to the document in the template.Added one signer recipient to template (because i was not able to add the dynamic labels without it), this user get all the emails even i don't specify him on the above code.
I want something like to send a document in template to different recepients (like user1#gmail.com, user2#gmail.com etc) one at a time (they may or may not have docusign account, though is it possible if they have docusign account?)
I am doing this since 4 days, not finding anything about proceeding furthur, please help.
I have read some of the documentation. As far as I can see you should do the following:
//first signer
$templateRole1 = new \DocuSign\eSign\Model\TemplateRole();
$templateRole1->setEmail("user1#email.com");
$templateRole1->setName("User1 Name");
$templateRole1->setRoleName("Admin");
//second singer
$templateRole2 = new \DocuSign\eSign\Model\TemplateRole();
$templateRole2->setEmail("user2#email.com");
$templateRole2->setName("User2 Name");
$templateRole2->setRoleName("Admin");
And then in the envelop:
$envelop_definition->setTemplateRoles(array($templateRole1, $templateRole2));
Objective: Autopopulate some values using the tabLabel/value key pair for server templates, using the beta Docusign PHP Client.
I've looked at quite a few stackoverflow posts and unfortunately the one that seems to be the closest related to me seems unanswered: Docusign API - prefilling tab values on envelope created from template
I was unable to find this "SecureField" option in any sort of preferences.
Currently, the name field fills in automatically just because of the template role being set accurately. I didn't have to do this with the tabLabel key, this was done automatically. I have tried creating a company tab, and that fails to autopopulate, so does a random text tab I have tried.
I have currently forked the library and made it PSR-4 compatible, and to achieve this objective I changed the following files:
TemplateRole Model: Modified the constructor to include $tabs, and set $this->tabs if $tabs is set. I added two functions getTabs()/setTabs($tabs) that behave the same as get/set RoleName, Name, Email, etc.
RequestSignatureResource: In the foreach ($templateRoles as $templateRole) I added a 'tabs' key to the array_pusy, and put $templateRole->getTabs().
I created a new TemplateRole('role name', 'person name', 'email', $tabs).
I can see the tabs in the JSON request data. Is there anything I'm missing?
I should also note that I used this post for inspiration, too: How to pre-fill tabs on a server template with the DocuSign API. The issue with this is that if I put textTabs:{text:{tabLabel:"something", value:"some value"}} then I get a response from the API that my request was invalid. I can provide that specific error upon request if needed.
The following worked for me :
$templateRole = new DocuSign\eSign\Model\TemplateRole();
$templateRole->setClientUserId($email);
$templateRole->setEmail($email);
$templateRole->setName($recipientName);
$templateRole->setRoleName($templateRoleName);
$textTab = new \DocuSign\eSign\Model\Text();
// I added this text field manually on docuSign site.
$textTab->setTabLabel("Field Label");
$textTab->setValue('Value');
$tabs = new DocuSign\eSign\Model\Tabs();
$tabs->setTextTabs(array($textTab));
$templateRole->setTabs($tabs);
What i have :
Sugarcrm enterprise 6.5.14
I have set the inbound email to automatically generate cases under some conditions.
(it is set in Sugar's administration > Inbound email, it's native, i didn't write any code, juste setting it up).
I saw on /modules/InboundEmail/InboundEmail.php the function handleCreateCase() which i think (but please, confirm it) is used to generate cases.
What i want :
When a case is generated by an inbound email, the function handleCreateCase() is searching for contact ids and retrieves the good contact with this id :
snippet of handleCreateCases() :
if($contactIds = $this->getRelatedId($contactAddr, 'contacts')) {
if(!empty($contactIds) && $c->load_relationship('contacts')) {
$c->contacts->add($contactIds);
} // if
} // if
Now, i would like to add a "Else" condition : if there is no related contact, then create one.
My question is..
How do i code that? Could i customize the InboundEmail module? Will it be taken by Sugar?
Thanks a lot for your patience and your time.
I need a way to display videos from a specific channel on a page using PHP.
I have authenticated my app and I can use some methods using the advanced API. I am using the official vimeo PHP library to connect.
Below is what I am trying to do and when I dump the array I do not get anything. I can get info back from using get videos from the entire account method.
require_once('/url/vimeo/vimeo.php');
$vimeo = new phpVimeo('number', 'number');
$vimeo->setToken('number','numbers');
$videos = $vimeo->call('vimeo.channels.getVideos', array('ACCOUNT' => 'NAME'));
If I put the channel name where ACCOUNT is I will get an invalid signature error.
Is it worth using something like simple HTML parser for PHP and doing it that or worth sticking with the advanced API?
I would highly advise using the advanced api. If you parse the html, it will break any time vimeo changes their channel pages. Additionally, channels have more than one layout
eg: vimeohq and nicetype
The second parameter of the "call" function should be any querystring parameters the api method requires.
In the case of "vimeo.channels.getVideos" you can provide
channel_id
user_id
page
per_page
summary_response
full_response.
To experiment with the getVideos method, you can use the playground.
So in the end, I believe you want the function to look like this..
$videos = $vimeo->call('vimeo.channels.getVideos', array('channel_id' => 'NAME'));
where NAME is either the channel id, or the channel name (the channel name matches the url slug, so for example "nicetype" not "nice type"