Jump to content

jarod

Member
  • Posts

    22
  • Joined

  • Last visited

About jarod

jarod's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. I'm experiencing the same issue. Files uploaded by admin are not available to clients and vice versa. When a client uploads from the client area it shows a link, but when clicked gives an "access denied" error. I can confirm that folder permissions are correct and they are uploaded to the projects attachments directory. Oddly, in the database table for mod_project_management_files I can see the file uploaded by admin, but there is nothing from the client. After searching through the database, I found a column named "attachments" in mod_project which has the client file. There is apparently no feature to notify admin when either admin or client uploads a new file. We spent good money on this to not have it working... After reading other with similar issues and receiving little to no support, I'm questioning if this was worth the time and effort. The problems I'm outlining are inherit to the core functionality of the module and hardly a "bug." When is this going to be fixed? We are running WHMCS 7.2.3 and Project Management 2.0.2
  2. Hello. I would like to get the First Name and Last Name from tblclients and create a new column for "fullname" where these two are combined and available for use. How can I add a new column to tblclients and join first / last name?
  3. You are correct! Once I followed your instructions for creating the smarty plugin the code worked perfect!!! Thank you!
  4. Hrm... The last two code examples do not work. I get a partially rendered page without any error info. Running 7.2.2
  5. Thank you for the info. Is there really no easier way to output the customfields data? I would imagine there be some way to simply output the value of a custom field based on the id... The sort order isn't even really in question except that it is the only way I have found to retrieve the custom field. But yes, is there any way to get the custom field by it's inherit id and display that in the clientsuummary.tpl?
  6. I'm trying to add custom field values to the client summary client information in cliensummary.tpl but the only way I can get this to work using what I've found is by assigning the sortorder which doesn't seem very intuitive. <tr><td>Secondary Phone</td><td>{$clientsdetails.customfields1}</td></tr> How can I get the custom field value based on ID rather than sortorder?
  7. Ok I figured this out. I was struggling with this because I was using a live site! So I created a new file for the hook to modify / test on the live site. if ($_SESSION['uid']=="1") {//my hook here} Then I was free to do what I wanted and test it on a dummy user account, leaving client accounts unaffected while I test. First, I was going off of the wrong header in tblhostingaddons. Instead of ->where('id', '1') I needed ->where('addonid', '1') etc After that it was as simple as if ($cPaddon == true) {//my code} etc ___ I'll post the entire code (please forgive the variables). use WHMCS\View\Menu\Item as MenuItem; use Illuminate\Database\Capsule\Manager as Capsule; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar){ include ('includes/_sidebar.php'); $client = Menu::context("client"); // -- Database queries $domain = Capsule::table('tblhosting') ->where('userid', $client->id) ->where('domainstatus','Active') ->get(); $cPaddon = Capsule::table('tblhostingaddons') ->where('addonid', '1') ->where('status', 'Active') ->get(); $btwgWP = Capsule::table('tblhostingaddons') ->where('addonid', '2') ->where('status', 'Active') ->get(); // -- Sidebar foreach ($domain as $sdbr) { $netAccess = $primarySidebar->addChild('yourwebsites', array( 'label' => 'Network Access', 'icon' => 'fa-globe', )); // -- Sidebar panel $netAccess->setBodyHtml( "Get to where you need to go.<br><span style='font-size:10px;color: green;'><em>Click on a domain to access</em></span>" ); } // Go time foreach ($domain as $acc) { if ($cPaddon == true) { $cPanel = $aOl.$https.$acc->domain.":2083".$iO."fa-chevron-right".$iC."cPanel".$aC; } if ($btwgWP == true) { $btwgWPMU = $aOl.$https.$acc->domain."/edit".$iO."fa-wordpress".$iC."BTWG WordPress".$aC; } // -- Sidebar access links $netAccess->addChild( $aO.$togl.$iO."fa-home".$iC.$acc->domain.$aC ."<a class='close hide'><i class='fa fa-times' aria-hidden='true'></i> Close</a>" ."<div class='collapsed' id='collapse'>" //-- Access links .$aOl.$https.$acc->domain.$iO."fa-external-link".$iC."Visit".$aC .$aOl.$https.$acc->domain."/webmail".$iO."fa-envelope-o".$iC."Webmail".$aC .$cPanel .$btwgWPMU .$aOl.$https.$acc->domain."/tools".$iO."fa-wrench".$iC."Tools".$aC ."<a class='list-group-item' href='".$sys.$caPD.$acc->id.$iO."fa-cog".$iC."Details".$aC ."</div>" ); } });
  8. foreach ($domain as $sdbr) This keeps the sidebar from displaying if you aren't logged in.
  9. I've made the suggested edits in my hook and cleaned up the code above so you don't go nuts lol.
  10. I'm trying to display a menu to clients based on a product addon (if is active). The purpose is to allow us to activate an addon which will trigger adding a menu link in the sidebar. The problem I am facing is getting it to display more than one addon conditionally. use WHMCS\View\Menu\Item as MenuItem; use Illuminate\Database\Capsule\Manager as Capsule; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar){ include ('includes/_sidebar.php'); $client = Menu::context("client"); // -- Database queries $domain = Capsule::table('tblhosting') ->where('userid', $client->id) ->where('domainstatus','Active') ->get(); $cPaddon = Capsule::table('tblhostingaddons') ->where('id', '1') ->where('status', 'Active') ->get(); // -- Sidebar $netAccess = $primarySidebar->addChild('yourwebsites', array( 'label' => 'Network Access', 'icon' => 'fa-globe', )); // -- Sidebar panel $netAccess->setBodyHtml( "Get to where you need to go.<br><span style='font-size:10px;color: green;'><em>Click on a domain to access</em></span>" ); // Go time foreach ($domain as $acc) { foreach ($cPaddon as $cPaddons) { $cPanel = $acc->domain.":2083"; } // -- Sidebar access links $netAccess->addChild( $acc->domain ."<a class='close hide'><i class='fa fa-times' aria-hidden='true'></i> Close</a>" ."<div class='collapsed' id='collapse'>" //-- Access links .$acc->domain .$acc->domain."/webmail" .$cPanel .$acc->domain."/tools" .$acc->id ."</div>" ); } }); So if a client has our hosting package and the cPanel addon it adds a link to their cPanel login page. We have other addons and I've tried duplicating this without luck. How can I check against the DB for addons and display an output conditionally for more than one addon?
  11. Thank you, Brian. Can you provide a working db query example for grabbing the roleid? Also, how can I use this in a smarty variable? I'm familiar with $smarty.session.adminid, but what about roleid? I can't dig anything up on the web that covers it.
  12. I'm creating an admin hook and I have two questions. How can I pull the current admin user role id? I need to know how I can grab the $roleId of the current admin user. How do I create a smarty tag that can be used throughout the admin area? I want to use a smarty tag to control where this is output. If I echo something right now it dumps it into the top of the page before <html>... I've started my hook with this snippet: add_hook('AdminAreaPage', 1, function($vars) { if ($vars['adminid'] == '3') { // Do Awesome Stuff } });
  13. I am working with an outdated WHMCS installation (v5.2.15) and have about 40 clients I need moved into a current installation. Existing product / services have been created in the new installation. We are unable to use an existing WHMCS module due to the outdated version being unsupported. - - - Updated - - - With regard to the data entry, we do need things like registration dates, updated renewal dates, and client creation / order email notification disabled per account / order creation.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated