<div dir="ltr"><div>Sorry, it is not currently possible to customize summary widgets in Vtiger CRM. We will review this further and update this thread. </div><div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 14, 2014 at 1:40 PM, IT-Solutions4You <span dir="ltr"><<a href="mailto:info@its4you.sk" target="_blank">info@its4you.sk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm talking about vtiger CRM.<br>
<br>
<br>
<br>
Dňa 13. 10. 2014 17:36 Pabiszczak, Błażej  wrote / napísal(a):<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Do you see "*_/Widgets/_*" module in settings in our Yetiforce?<span><br>
<a href="https://test.yetiforce.com/index.php?module=Widgets&parent=Settings&view=Index&block=2&fieldid=58" target="_blank">https://test.yetiforce.com/<u></u>index.php?module=Widgets&<u></u>parent=Settings&view=Index&<u></u>block=2&fieldid=58</a><br>
<br>
<br>
Z poważaniem / Regards<br>
Błażej Pabiszczak<br>
M: <a href="tel:%2B48.884999123" value="+48884999123" target="_blank">+48.884999123</a><br>
E: <a href="mailto:b.pabiszczak@opensaas.pl" target="_blank">b.pabiszczak@opensaas.pl</a><br></span>
<mailto:<a href="mailto:b.pabiszczak@opensaas.pl" target="_blank">b.pabiszczak@opensaas.<u></u>pl</a>><span><br>
<br>
2014-10-13 15:31 GMT+02:00 IT-Solutions4You<br>
<<a href="mailto:info@its4you.sk" target="_blank">info@its4you.sk</a><br></span>
<mailto:<a href="mailto:info@its4you.sk" target="_blank">info@its4you.sk</a>>>:<span><br>
<br>
    And what's now? How can we (community) help vtiger to implement this:<br>
<br></span>
    <a href="https://discussions.vtiger." target="_blank">https://discussions.vtiger.</a>__<u></u>com/index.php?p=/discussion/__<u></u>171186/detail-view-widgets-__<u></u>implementation/p1<span><br>
    <<a href="https://discussions.vtiger.com/index.php?p=/discussion/171186/detail-view-widgets-implementation/p1" target="_blank">https://discussions.vtiger.<u></u>com/index.php?p=/discussion/<u></u>171186/detail-view-widgets-<u></u>implementation/p1</a>><br>
<br>
    Matus.<br>
<br>
    Dňa 13. 10. 2014 13:04 Alan Lord  wrote / napísal(a):<br>
<br>
        Ah,<br>
<br>
        I think you might be right about vtiger_links & DETALVIEWWIDGETS...<br>
<br>
        I've started looking at creating a module which allows the user<br>
        to add a<br>
        custom widget to other modules via my extension module...<br>
<br>
        But looking at the code in the standard models in<br></span>
        /modules/Vtiger/models/{__<u></u>Detail.php,DetailView.php} it looks like<span><br>
        getDetailViewLinks() and getWidgets() will only *ever* return<br>
        specific<br>
        widgets and will override information in the vtiger_links table<br>
        such as<br>
        linkurl for example.<br>
<br>
        Is this really the case or am I missing something? Is there no<br>
        way for<br>
        me to add a new entry in the vtiger_links table such that, for<br>
        example,<br>
        I could add a new "Libertus" widget that gets displayed on the<br>
        Contacts<br>
        module Summary page or DetailView page?<br>
<br>
                 /**<br>
                  * Function to get the detail view links (links and<br>
            widgets)<br>
                  * @param <array> $linkParams - parameters which will<br>
            be used to<br>
            calicaulate the params<br>
                  * @return <array> - array of link models in the format<br>
            as below<br>
                  *                   array('linktype'=>list of link<br>
            models);<br>
                  */<br></span>
                 public function getDetailViewLinks($__<u></u>linkParams) {<br>
                     $linkTypes = array('DETAILVIEWBASIC','__<u></u>DETAILVIEW');<span><br>
                     $moduleModel = $this->getModule();<br>
                     $recordModel = $this->getRecord();<br>
<br>
                     $moduleName = $moduleModel->getName();<br>
                     $recordId = $recordModel->getId();<br>
<br>
                     $detailViewLink = array();<br>
<br></span>
                     if(Users_Privileges_Model::__<u></u>isPermitted($moduleName,<span><br>
            'EditView', $recordId)) {<br>
                         $detailViewLinks[] = array(<br>
                                 'linktype' => 'DETAILVIEWBASIC',<br>
                                 'linklabel' => 'LBL_EDIT',<br>
                                 'linkurl' =><br></span>
            $recordModel->getEditViewUrl()<u></u>__,<span><br>
                                 'linkicon' => ''<br>
                         );<br>
<br>
                         foreach ($detailViewLinks as $detailViewLink) {<br></span>
                             $linkModelList['__<u></u>DETAILVIEWBASIC'][] =<br>
            Vtiger_Link_Model::__<u></u>getInstanceFromValues($__<u></u>detailViewLink);<br>
                         }<br>
                     }<br>
<br>
                     $linkModelListDetails =<br>
            Vtiger_Link_Model::__<u></u>getAllByType($moduleModel->__<u></u>getId(),$linkTypes,$__<u></u>linkParams);<span><br>
<br>
                     //Mark all detail view basic links as detail view<br>
            links.<br>
                     //Since ui will be look ugly if you need many basic<br>
            links<br>
                     $detailViewBasiclinks =<br></span>
            $linkModelListDetails['__<u></u>DETAILVIEWBASIC'];<br>
                     unset($linkModelListDetails['_<u></u>_DETAILVIEWBASIC']);<br>
<br>
<br>
            if(Users_Privileges_Model::__<u></u>isPermitted($moduleName, 'Delete',<span><br>
            $recordId)) {<br>
                         $deletelinkModel = array(<br>
                                 'linktype' => 'DETAILVIEW',<br>
                                 'linklabel' => sprintf("%s %s",<br></span>
            getTranslatedString('LBL___<u></u>DELETE', $moduleName),<span><br>
            vtranslate('SINGLE_'.<br>
            $moduleName, $moduleName)),<br>
                                 'linkurl' =><br></span>
            'javascript:Vtiger_Detail_Js._<u></u>_deleteRecord("'.$recordModel-<u></u>>__getDeleteUrl().'")',<span><br>
<br>
                                 'linkicon' => ''<br>
                         );<br>
                         $linkModelList['DETAILVIEW'][] =<br></span>
            Vtiger_Link_Model::__<u></u>getInstanceFromValues($__<u></u>deletelinkModel);<br>
                     }<br>
<br>
                     if(Users_Privileges_Model::__<u></u>isPermitted($moduleName,<span><br>
            'EditView', $recordId)) {<br>
                         $duplicateLinkModel = array(<br>
                                     'linktype' => 'DETAILVIEWBASIC',<br>
                                     'linklabel' => 'LBL_DUPLICATE',<br>
                                     'linkurl' =><br></span>
            $recordModel->__<u></u>getDuplicateRecordUrl(),<span><br>
                                     'linkicon' => ''<br>
                             );<br>
                         $linkModelList['DETAILVIEW'][] =<br></span>
            Vtiger_Link_Model::__<u></u>getInstanceFromValues($__<u></u>duplicateLinkModel);<br>
                     }<br>
<br>
                     if(!empty($__<u></u>detailViewBasiclinks)) {<span><br>
                         foreach($detailViewBasiclinks as $linkModel) {<br>
                             // Remove view history, needed in vtiger5<br>
            to see<br>
            history but not in vtiger6<br>
                             if($linkModel->linklabel == 'View History') {<br>
                                 continue;<br>
                             }<br>
                             $linkModelList['DETAILVIEW'][] = $linkModel;<br>
                         }<br>
                     }<br>
<br></span>
                     $relatedLinks = $this->__<u></u>getDetailViewRelatedLinks();<span><br>
<br>
                     foreach($relatedLinks as $relatedLinkEntry) {<br>
                         $relatedLink =<br></span>
            Vtiger_Link_Model::__<u></u>getInstanceFromValues($__<u></u>relatedLinkEntry);<br>
                         $linkModelList[$relatedLink->_<u></u>_getType()][] =<span><br>
            $relatedLink;<br>
                     }<br>
<br>
                     $widgets = $this->getWidgets();<br>
                     foreach($widgets as $widgetLinkModel) {<br></span>
                         $linkModelList['__<u></u>DETAILVIEWWIDGET'][] =<br>
            $widgetLinkModel;<br>
                     }<br>
<br>
                     $currentUserModel =<br>
            Users_Record_Model::__<u></u>getCurrentUserModel();<br>
                     if($currentUserModel->__<u></u>isAdminUser()) {<br>
                         $settingsLinks = $moduleModel->getSettingLinks(<u></u>__);<br>
                         foreach($settingsLinks as $settingsLink) {<br>
                             $linkModelList['__<u></u>DETAILVIEWSETTING'][] =<br>
            Vtiger_Link_Model::__<u></u>getInstanceFromValues($__<u></u>settingsLink);<span><br>
                         }<br>
                     }<br>
<br>
                     return $linkModelList;<br>
                 }<br>
<br>
<br>
<br>
<br>
                 /**<br>
                  * Function to get the detail view widgets<br>
                  * @return <Array> - List of widgets , where each<br>
            widget is an<br>
            Vtiger_Link_Model<br>
                  */<br>
                 public function getWidgets() {<br>
                     $moduleModel = $this->getModule();<br>
                     $widgets = array();<br>
<br>
                     $modCommentsModel =<br></span>
            Vtiger_Module_Model::__<u></u>getInstance('ModComments');<br>
                     if($moduleModel->__<u></u>isCommentEnabled() &&<br>
            $modCommentsModel->__<u></u>isPermitted('DetailView')) {<span><br>
                         $widgets[] = array(<br>
                                 'linktype' => 'DETAILVIEWWIDGET',<br>
                                 'linklabel' => 'ModComments',<br>
                                 'linkurl' =><br></span>
            'module='.$this->__<u></u>getModuleName().'&view=Detail&<u></u>__record='.$this->getRecord()-<u></u>>__getId().<br>
<br>
<br>
            '&mode=showRecentComments&__<u></u>page=1&limit=5'<br>
                         );<br>
                     }<br>
<br>
                     if($moduleModel->__<u></u>isTrackingEnabled()) {<span><br>
                         $widgets[] = array(<br>
                                 'linktype' => 'DETAILVIEWWIDGET',<br>
                                 'linklabel' => 'LBL_UPDATES',<br>
                                 'linkurl' =><br></span>
            'module='.$this->__<u></u>getModuleName().'&view=Detail&<u></u>__record='.$this->getRecord()-<u></u>>__getId().<br>
<br>
<br>
            '&mode=showRecentActivities&__<u></u>page=1&limit=5',<span><br>
                         );<br>
                     }<br>
<br>
                     $widgetLinks = array();<br>
                     foreach ($widgets as $widgetDetails) {<br>
                         $widgetLinks[] =<br></span>
            Vtiger_Link_Model::__<u></u>getInstanceFromValues($__<u></u>widgetDetails);<br>
                     }<br>
                     return $widgetLinks;<br>
                 }<br>
<br>
<br>
        Al<br>
<br>
<br>
        ______________________________<u></u>___________________<br>
        <a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
<br>
<br>
<br>
    ______________________________<u></u>___________________<span><br>
    <a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
<br>
</span></blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a></blockquote></div><br></div></div>