Skip to content

Commit

Permalink
Portal Update to version 0.8
Browse files Browse the repository at this point in the history
Portal Update to version 0.8
  • Loading branch information
makeyourcloud committed Apr 30, 2015
1 parent c315f5c commit c6f06b1
Show file tree
Hide file tree
Showing 58 changed files with 2,317 additions and 5,794 deletions.
2 changes: 1 addition & 1 deletion LICENSE.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ This Software is distribuited under GNU General Public License (GPL)
http://www.gnu.org/licenses/gpl.txt


Copyright 2014 Proseguo s.l. - MakeYourCloud
Copyright 2014 - 2015 Proseguo s.l. - MakeYourCloud
64 changes: 48 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,54 @@ MYC Vtiger Customer Portal
============================================
Alternative vTiger Customer Portal - Bootstrap 3 Based - Modular Code

Please refer to our forum for any support question: http://forum.makeyourcloud.com
For more informations, Tutorials, F.A.Q, Themes and Plugins you can visit our website: http://makeyourcloud.com

UPDATED VERSION 0.5 - NEW FEATURES & BUX FIXES:

UPDATED VERSION 0.8 - NEW FEATURES & BUX FIXES:


[FIXED] Problems reported in the setup process for some servers

[FIXED] Language issues

[FIXED] Minor bugs

[FIXED] Minor pdf download problems, ENHANCED PDFMaker compatibility

[NEW FEATURE] Totally RENEWED ADMIN LAYOUT, categorized options to simplify the configuration process

[NEW FEATURE] Integrated MYC WBSERVICES CLIENT library

[NEW FEATURE] [LANGUAGE] FRENCH LANGUAGE pack integrated (provided by Chris)

[NEW FEATURE] PLUGINS structure to allow easy extension of the portal functionalities

[NEW FEATURE] PLUGINS STORE and THEMES STORE section.

[NEW FEATURE] APPEARANCE SETTINGS section.

[NEW FEATURE] DATE FORMAT option in Appearance settings menu to allow you specify how to show dates to your customers

[NEW FEATURE] PORTAL TITLE option in Appearance settings menu to allow you specify the name to show as the page title

[NEW FEATURE] [PLUGIN] FREE plugin module to manage EVENTS, that allow you to choose WHICH FIELDS to show for the events LIST VIEW SPECIFYING the display ORDER, also provide an EVENTS CALENDAR view.

[NEW FEATURE] [PLUGIN] FREE plugin to allow you CUSTOMIZE the portal MENU SORTING.

NOTES:
Some plugins like Event Plugin and Inventory Lines requires valid vtiger api credentials to work, this is required to enable the Standard Webservices Api related plugins but not indispensable to make the customer portal working, if you don’t want to insert, or you insert incorrect credentials all the plugins that requires this connection will be disabled but the portal will still work as usual.
The same concept is applied to the google map api key, if you don’t provide an api key the map in the event plugin detail view will be disabled and the address text will be displayed instead.

UPDATE INSTRUCTIONS:
This update make some fundamental changes to the base code of the precedent version, our advice is to make a new fresh installation with the new files then apply your own customization ( also download an the updated version of our themes if you use it and upload the updated theme zip using the new theme manager section ).






VERSION 0.5 - NEW FEATURES & BUX FIXES:

[FIX] - Fixed a problem with the default index module permission, now it follow the order as you set in you CRM in the section customer portal settings

Expand Down Expand Up @@ -39,17 +85,6 @@ UPDATED VERSION 0.5 - NEW FEATURES & BUX FIXES:



NOTES:
To enable the new Event module you are required to set your vtiger api credentials, this is required to enable the Api-related features but not indispensable to make the customer portal working, if you don’t want to insert, or you insert incorrect credentials all the related functionalities will be disabled but the portal will still work as usual.
The same concept is applied to the google map api key, if you don’t provide an api key the map will be disabled and the address text will be displayed instead.

UPDATE INSTRUCTIONS:
This update make some fundamental changes to the base code of the precedent version, our advice is to make a new fresh installation with the new files then apply your own customization ( copy your themes/modules folders ), we guarantee that the themes and any custom modules are still 100% compatibles.
If you did not make customizations to your theme, just download the updated version from our store and replace it in your portal.
If you made customizations you need just 1 modification to your theme to enable the logo functionality, just follow the tutorial on our website: <a href=“http://www.makeyourcloud.com/tutorials-myc-vtiger-customer-portal.html” target=“_blank”>http://www.makeyourcloud.com/tutorials-myc-vtiger-customer-portal.html</a>





VERSION 0.1 - PORTAL FEATURES:
Expand All @@ -71,8 +106,5 @@ VERSION 0.1 - PORTAL FEATURES:
-Compatible with vTiger 5.x and 6.x


You can find more info, tutorials and themes on our website:
http://makeyourcloud.com


Copyright 2014 Proseguo s.l. - MakeYourCloud
Copyright 2014 - 2015 Proseguo s.l. - MakeYourCloud
22 changes: 1 addition & 21 deletions configuration/apimodules.php
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
<?php return array (

"Events" => array(
"modulename"=>"Events",
"relation_fields"=>array("contact_id"),
"link_field"=>"subject",
"list_fields"=>array("subject","date_start","time_start","due_date","time_end","eventstatus","activitytype","location"),
),
/*
"Sales Order" => array(
"modulename"=>"SalesOrder",
"relation_fields"=>array("account_id","contact_id"),
"list_fields"=>array("subject"),
"link_field"=>"subject",
"detail_fields"=>array(
"SALESORDER_BLOCK1"=>array("subject","customerno"),
"SALESORDER_BLOCK2"=>array("customerno","sostatus","salesorderno"),
),
),
*/
); ?>
<?php return array(); ?>
13 changes: 11 additions & 2 deletions configuration/config.class.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/* * *******************************************************************************
* The content of this file is subject to the MYC Vtiger Customer Portal license.
* ("License"); You may not use this file except in compliance with the License
* The Initial Developer of the Original Code is Proseguo s.l. - MakeYourCloud
* Portions created by Proseguo s.l. - MakeYourCloud are Copyright(C) Proseguo s.l. - MakeYourCloud
* All Rights Reserved.
* ****************************************************************************** */


require "../portal.php";

class ConfigEditor
Expand All @@ -17,8 +26,8 @@ public static function read($filename)
public static function write($filename, array $config)
{
$config = var_export($config, true);
file_put_contents($filename, "<?php return $config ;");
return "OK";
if(file_put_contents($filename, "<?php return $config ;")) return "OK";
else return "<b>There was an error saving your configuration: the file '".$filename."' is not writeable!</b><br> Please give permission 644 to this file and eventually ensure that the proprietary of this file is the same that is executing this script (usually apache or www-data depending of your server).";
}


Expand Down
114 changes: 101 additions & 13 deletions configuration/index.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,38 @@
<?php
<?php

/* * *******************************************************************************
* The content of this file is subject to the MYC Vtiger Customer Portal license.
* ("License"); You may not use this file except in compliance with the License
* The Initial Developer of the Original Code is Proseguo s.l. - MakeYourCloud
* Portions created by Proseguo s.l. - MakeYourCloud are Copyright(C) Proseguo s.l. - MakeYourCloud
* All Rights Reserved.
* ****************************************************************************** */

require_once "config.class.php";

session_start();
define('ROOT_PATH', realpath(__DIR__.'/../'));

if(ConfigEditor::checkLogin()){

if(isset($_POST['vtiger_path'])){


$config = ConfigEditor::read('config.php');
if(isset($config) && is_array($config) && count($config)>0){
PortalConfig::load();
MYCWSApi::connect();
}
$apimodules = ConfigEditor::read('apimodules.php');
$timezones = ConfigEditor::read('timezones.php');

if(isset($_POST['updateconfig'])){
unset($_POST['updateconfig']);
$newconfig=$_POST;

if(!isset($_POST['hiddenmodules'])) $newconfig['hiddenmodules'] = array();
if(!isset($_POST['enabled_api_modules'])) $newconfig['enabled_api_modules'] = array();
if(!isset($_POST['hiddenmodules']) && !isset($config['hiddenmodules'])) $newconfig['hiddenmodules'] = array();
if(!isset($_POST['enabled_api_modules']) && !isset($config['enabled_api_modules'])) $newconfig['enabled_api_modules'] = array();

if($_FILES['portal_logo']['name']!=""){
if($_FILES['portal_logo']['name']!="" && !isset($config['portal_logo']) || $config['portal_logo']==""){
$ext = pathinfo($_FILES['portal_logo']['name'], PATHINFO_EXTENSION);
$newfilename=Router::slugify(str_replace(".".$ext, "", $_FILES['portal_logo']['name'])).".".$ext;

Expand All @@ -23,21 +42,35 @@
else $newconfig['portal_logo'] = "logo-myc.png";
}
else $newconfig['portal_logo'] = "logo-myc.png";

$newconfig = array_merge($config, $newconfig);
$altmess=ConfigEditor::write('config.php', $newconfig);
}

$config = ConfigEditor::read('config.php');
$apimodules = ConfigEditor::read('apimodules.php');
$timezones = ConfigEditor::read('timezones.php');
$config = ConfigEditor::read('config.php');


if($_FILES['theme_zip']['name']!=""){
$tmpfile=$config['upload_dir']."/".$_FILES['theme_zip']['name'];
if(move_uploaded_file($_FILES['theme_zip']['tmp_name'], $tmpfile)){
$zip = new ZipArchive;
$res = $zip->open($tmpfile);
if ($res === TRUE) {
$zip->extractTo(ROOT_PATH.'/themes/');
$zip->extractTo(ROOT_PATH.'/');
$zip->close();
$uploadzip="OK";
}
else $uploadzip="ERR";
}
else $uploadzip="ERR";
}

if($_FILES['plugin_zip']['name']!=""){
$tmpfile=$config['upload_dir']."/".$_FILES['plugin_zip']['name'];
if(move_uploaded_file($_FILES['plugin_zip']['tmp_name'], $tmpfile)){
$zip = new ZipArchive;
$res = $zip->open($tmpfile);
if ($res === TRUE) {
$zip->extractTo(ROOT_PATH.'/');
$zip->close();
$uploadzip="OK";
}
Expand All @@ -50,12 +83,67 @@
$config['portal_theme']=$_GET['deftheme'];
$altmess=ConfigEditor::write('config.php', $config);
}


if(isset($_REQUEST['action']) && $_REQUEST['action']=="themes") require("views/themes.php");
else require("views/editor.php");


if(isset($_REQUEST['action']) && $_REQUEST['action']=="themes"){
$pagetitle="Themes Manager";
$viewname="themes";
}
else if(isset($_REQUEST['action']) && $_REQUEST['action']=="themestore"){
$pagetitle="Themes Store";
$viewname="themestore";
}
else if(isset($_REQUEST['action']) && $_REQUEST['action']=="pluginstore"){
$pagetitle="Plugins Store";
$viewname="pluginstore";
}
else if(isset($_REQUEST['action']) && $_REQUEST['action']=="appearance"){
$pagetitle="Appearance Settings";
$viewname="appearance";
}

else if(isset($_REQUEST['action']) && $_REQUEST['action']=="plugins"){
Plugins::load_plugins();
if(!isset($_REQUEST['pn'])){
$pagetitle="Plugins Manager";
$viewname="plugins";
}
else{
$pluginname=$_REQUEST['pn'];
if(isset($loaded_plugins[$pluginname])){
$pluginsettings=$loaded_plugins[$pluginname]->settings();
if(!$pluginsettings){
$customalert['type']='danger';
$customalert['dieonerror']=true;
$customalert['message']='This plugin <b>require the vTiger WS Api connection</b>, please ensure to put correct credentials (vTiger WS Api Username and Api Key) in the <a href="index.php">Portal Configuration</a> Page.';
}
$pagetitle=$loaded_plugins[$pluginname]->plugin_label." Settings";
}
else{
$customalert['type']='danger';
$customalert['dieonerror']=false;
$customalert['message']='The plugin you are searching for is currently not installed on this MYC Customer Portal instance!';
$pagetitle="Plugins Manager";
$viewname="plugins";
unset($pluginname);
}
}
}


else{
$pagetitle="General Settings";
$viewname="editor";
}

require("views/header.php");
if(!isset($pluginname)) require("views/".$viewname.".php");
else {
if(file_exists(ROOT_PATH.'/plugins/'.$pluginname."/views/settings.php"))
require ROOT_PATH.'/plugins/'.$pluginname."/views/settings.php";
}
require("views/footer.php");

}

Expand Down
8 changes: 8 additions & 0 deletions configuration/timezones.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?php

/* * *******************************************************************************
* The content of this file is subject to the MYC Vtiger Customer Portal license.
* ("License"); You may not use this file except in compliance with the License
* The Initial Developer of the Original Code is Proseguo s.l. - MakeYourCloud
* Portions created by Proseguo s.l. - MakeYourCloud are Copyright(C) Proseguo s.l. - MakeYourCloud
* All Rights Reserved.
* ****************************************************************************** */

return array(
"Pacific/Enderbury" => "(GMT+13:00) Phoenix Islands Time ( Pacific / Enderbury )",
"Pacific/Tongatapu" => "(GMT+13:00) Tonga Time ( Pacific / Tongatapu )",
Expand Down
Loading

0 comments on commit c6f06b1

Please sign in to comment.