Jump to content
GosuHost

Plugin: Email History

Recommended Posts

Version 1.0.1 worked perfectly for Blesta 4.0.1 and PHP 7.0

Thanks again for this one :)

=============

Are you currently working on a widget for the client dashboard so that we can save space on our top navigation menu ?

I have no more space in my top navigation, so the button is getting pushed down underneath the other button within the top navigation.

Share this post


Link to post
Share on other sites

Is there a way to lower the amount of entries being displayed ?

Currently, it appears to be around 20.

How can I get it down to 10 per page ?

Is it dependent on the Blesta core file found at ...

/config/blesta.php

https://www.blesta.com/forums/index.php?/topic/8091-how-to-modify-pagination-from-20-to-10/

==================

IF yes, can the plugin be made IN-dependent of that particular Core Blesta file ?

Share this post


Link to post
Share on other sites

There are no plans at this time to make it into a client side widget like the 'invoices' 'services' etc widgets on dashboard as i think this would be super clutter as theres already alot here (expecially if you have a ticket widget). So what you can do....

the function getAction event is  invoked on install or upgrade only. so if your client nav is full you can remove the plugin action function from client_emails_plugin.php and edit the .json to be a higher version and select upgrade in settings to force a "upgrade option"

 

-OR-

you can go into the database table plugin_actions and delete the entry for this plugin *ALWAYS BE CAREFUL WHEN EDITING DATABASE IF YOU DO NOT KNOW WHAT YOUR DOING PLEASE TRY ROUTE 1 OR CONTACT SYSTEM ADMIN"

 

You can then take the uri to the page and add it as a submenu item to any of your other nav items or create a button anywhere you like etc. @BlestaStore  for example moved his to the client name dropdown where 'Manage Account' and "Log out' Reside on the far right of the nav with a nice letter fa icon. 

If you wanted to do it like this, in your structure.pdt search for the submenu for the nav and add 

 <li><a href="plugin/client_emails/client_main/index/"><i class="fa fa-envelope fa-fw"></i>  Mail Log</a></li>

under 

<li><a href="<?php echo $this->Html->safe($this->client_uri . 'main/edit/');?>"><i class="fa fa-edit fa-fw"></i> <?php $this->_('AppController.client_structure.text_update_account');?></a></li>

 

Share this post


Link to post
Share on other sites
4 minutes ago, turner2f said:

Thanks.

I'll give it a shot.

=================

As for the widget, I posted something like this last year when I was working with a different plugin...

https://www.blesta.com/forums/index.php?/topic/8092-how-to-add-the-quotes-widget-to-the-client-dashboard/

Do you think trying the same thing might work with your's ?

 

You may certainly try, if so please update as others may want this alternative display as well

Share this post


Link to post
Share on other sites
On 05/11/2017 at 11:35 AM, turner2f said:

That is exactly what I was referring to out of concern for the widget area on the client dashboard.

for me, the email history is not a trivial info that should be in the main page widget, only a link to the page in enough. but others might find it a so important info  to make it in the main page.

Share this post


Link to post
Share on other sites

Thanks very much @gosuhost

 

For clarity on what GoSuhost posted....

Here is how you add the "Mail Log" to your dropdown menu...

 

==================


1) - Open up   /app/views/client/bootstrap/structure.pdt

 

2) - And then look for the following code, and add what is hi-lited in red....

 

<ul class="nav navbar-nav navbar-right">
                                <?php
                                if ($this->Html->ifSet($logged_in)) {
                                ?>
                                <li class="dropdown">
                                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                        <?php $this->Html->_($contact->first_name);?> <?php $this->Html->_($contact->last_name);?>
                                        <b class="caret"></b>
                                    </a>
                                    <ul class="dropdown-menu">
                                        <li><a href="<?php echo $this->Html->safe($this->client_uri . "main/edit/");?>"><i class="fa fa-edit fa-fw"></i> <?php $this->_("AppController.client_structure.text_update_account");?></a></li>
                                        <?php
                                        if ($this->Html->ifSet($portal_installed, false)) {
                                        ?>

                                        
                                        
                                        <!--This adds a SAFE URL link to the Client Emails page. Otherwise you will have 404 Errors.-->
                                        <li><a href="<?php echo $this->Html->safe($this->client_uri . "plugin/client_emails/client_main/index/");?>"><i class="fa fa-envelope fa-fw"></i>  See E-Mail History</a></li>

                                        
                                        
                                        <li><a href="<?php echo $this->Html->safe(WEBDIR);?>"><i class="fa fa-circle-o fa-fw"></i> <?php $this->_("AppController.client_structure.text_return_to_portal");?></a></li>
                                        <?php
                                        }
                                        ?>
                                        <li class="divider"></li>
                                        <li><a href="<?php echo $this->Html->safe($this->client_uri . "logout/");?>"><i class="fa fa-sign-out fa-fw"></i> <?php $this->_("AppController.client_structure.text_logout");?></a></li>
                                    </ul>
                                </li>

Share this post


Link to post
Share on other sites

ADDING A QUICK LINK WITHIN THE CLIENT DASH BOARD

 

1) - Open up   /app/views/client/bootstrap/client_main.pdt

 

2) - And then look for the following code, and add what is hi-lited in red....

 

<?php echo $this->Html->ifSet($myinfo);?>

                    <div class="col-md-9 right_content">
                    

<!--//Quick Link Hack BEGINS-->                    
 <a name="top"></a>
             
                |  <a href="<?php echo $this->Html->safe($this->client_uri . "#services");?>">Services</a> |
              <a href="<?php echo $this->Html->safe($this->client_uri . "#transactions");?>">Transactions</a> |
              <a href="<?php echo $this->Html->safe($this->client_uri . "#quotes");?>">Job Estimates</a> ||--><!--//Use with Client Quotes plug-->
              <a href="<?php echo $this->Html->safe($this->client_uri . "plugin/support_managerpro/client_tickets/");?>">Support Tickets</a> |
              <a href="<?php echo $this->Html->safe($this->client_uri . "plugin/client_emails/client_main/index/");?>">Email History</a> |
              <a href="main/edit/">Edit My Profile</a> |
              <!--<a href="plugin/client_statements/client/index/">Bill History</a> |--><!--//Use with Client Statements plug-->
    <br>
    <br>
<!--//Quick Link Hack ENDS-->  
     
    
    
                        <?php echo $this->Html->ifSet($message);?>
                    </div>

 

Share this post


Link to post
Share on other sites

@gosuhost

CONCERNING HOW TO ADD A WIDGET TO THE CLIENT DASHBOARD PAGE...


I used a technique that I wrote last year concerning a different plugin found at...
https://www.blesta.com/forums/index.php?/topic/8092-how-to-add-the-quotes-widget-to-the-client-dashboard/

==================================



1) - Open up     /app/client_controller.php

 

 

2) - And then look for the following code, and add what is hi-lited in red....

What is in lite grey is optional.

 

 

       $widgets = [];
        $widget_location = null;
        switch ($this->controller) {
            case 'client_main':
                $widget_location = 'widget_client_home';

                // Set the default widgets to appear


                $widgets = [

                    'client_invoices'=>['uri'=>$this->base_uri . 'invoices/?whole_widget=true'],
                    'client_services'=>['uri'=>$this->base_uri . 'services/?whole_widget=true'],
                    'client_transactions'=>['uri'=>$this->base_uri . 'transactions/?whole_widget=true'],
                    'client_quotes'=>['uri'=>$this->base_uri . "plugin/quotes/client_main/index/?whole_widget=true"],
                    'client_emails'=>['uri'=>$this->base_uri . "plugin/client_emails/client_main/index/?whole_widget=true"],
                //'client_tickets'=>['uri'=>$this->base_uri . 'plugin/support_manager/client_tickets/?whole_widget=true'] //DE-Activated since we are using  the  Support Manger Addon plugin.
    
               // Additional note : as of October 2017 we are using "Support Manager PRO".
               //So we also had to DE-activate the   " Support Manager Add-On " plugin to get rid of the EXTRA " Tickets " box that was on the client
               //dashboard. IF we ever stop using the PRO version, we will need to RE-activate the  " Support Manager Add-On " plugin.

                    

                ];
               break;
        }

Share this post


Link to post
Share on other sites

@gosuhost

 

The only issue, now that the widget is on the "Client Dashboard" page, is that there is no title above the widget area.

There is NO title that says, "Email History".


Can you offer some assistance in getting the title to display above the widget ?

 

Thanks in advance.

 

 

Share this post


Link to post
Share on other sites
17 minutes ago, turner2f said:

@gosuhost

 

The only issue, now that the widget is on the "Client Dashboard" page, is that there is no title above the widget area.

There is NO title that says, "Email History".


Can you offer some assistance in getting the title to display above the widget ?

 

Thanks in advance.

 

 

Ill have to set this as a widget in test environment, i would assume because ?whole_widget=true isnt a valid condition in the controller so having this in the uri isnt actually doing anything, i would have to look but im sure this has to do with its display. Ive not worked with widgets but i should have time by the weekend to check this task and research

Share this post


Link to post
Share on other sites
3 minutes ago, gosuhost said:

Ill have to set this as a widget in test environment, i would assume because ?whole_widget=true isnt a valid condition in the controller so having this in the uri isnt actually doing anything, i would have to look but im sure this has to do with its display. Ive not worked with widgets but i should have time by the weekend to check this task and research

 

===================

Awesome.

Thanks.

If there is a way to get the widget to be NOT dependent of the pagination amount set in the Blesta core file found at ...

/config/blesta.php

That would be great as well, so that the widget would display around 10 per pagination, as opposed to 20.

 

Thanks in advance.

 

Share this post


Link to post
Share on other sites

HOW TO GET RID OF "EMAIL LOG" BUTTON FROM TOP MENU NAVIGATION

 

Open up PHPMyAdmin

Go to the "plugin_actions" database table

Under the "Name" column, look for "Mail Log"

Delete it.

=============

If ever you want to put it back into the Top Navigation, just ....

--> Open up PHPMyAdmin

--> Go to the "plugin_actions" database table

--> Click "Insert"

 

Put in the following info...

plugin_id = ( put in your own random UN-used id number for the plugin )

action = nav_primary_client

uri   = plugin/client_emails/client_main/index/

name  = Mail Log

 

 

 

 

Share this post


Link to post
Share on other sites
On 11/9/2017 at 4:54 AM, HostCram said:

Your blesta theme integration is quite impressive.

Thanks for the great plugin. :)

I second that, just unzip, install, and go to town. Even worked on my "dummy" client that I made forever ago so it should also work for an already operating system without worries. :)  

As for sizing I personally not seeing any "colliding" of menu items even at the top. 5a56f40601702_Screenshotfrom2018-01-1100-11-27.thumb.png.f0a6bbb1b29a6ea5bcf85657b72eb36a.png 

Get the job done and all it needs to do. Now my Blesta install more match the leading billing platform now that my clients will be able to query the emails that the system/I sent them. :)

Share this post


Link to post
Share on other sites
23 hours ago, MineHarvest66 said:

As for sizing I personally not seeing any "colliding" of menu items even at the top.  

Glad you enjoy, We will soon update this plugin to add a few options to better enhance  the users experience and also the administrators.

More General Setups without a lot of customization and additions wont experience any "colliding" but if you have 2-3 other items already added there may not be room and the dropdown is a great easy place to apply this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×