Upload your extension and post the link here. Code will be reviewed by the developers and packaged and placed in the official repo if working well.
5,001 09/22/2014 12:20:58 pm
Re: FA for Real Estate Property Management (4 replies, posted in Setup)
5,002 09/22/2014 08:31:17 am
Re: Local Repo (9 replies, posted in Modules Add-on's)
Attempting to visit http://repo.garrapato.com/ results in a "no content here" webpage instead of prompting for a username and password. If you have set no username and password for it's access, then comment out / remove the first two array elements. It should then work.
The extensions did not download within FA but only when manually the URLs were entered in FireFox.
http://repo.garrapato.com/2.3/ seems to be password protected though.
http://repo.garrapato.com/2.3/extensions/cfdi-2.3.0-1.pkg did successfully download after providing the credentials.
http://repo.garrapato.com/2.3/extensions/zen_import-2.3.15-1.pkg also was successfully downloaded without asking for the credentials again and it is the official signed pkg.
Expect you created the Extensions.gz and Release.gz properly (since it displays only a subset including yours), otherwise enable error display and check out the SHA1sums in them if you are manually making it.
Make sure that the FA webroot has the FA.pem file if you are using any official pkgs.
Also see if the same problem arises if FA is installed in the server's webroot:
from
http://garrapato.com/sandbox/fa/
to
http://garrapato.com/
You are using latin1 charset - try utf8 / utf8-general-ci
Did you actually compile the pkgs listed in the repo? If so, please list the method you used right from key creation to pkg creation and repo updation.
5,003 09/22/2014 12:54:21 am
Topic: Packaging Extensions (1 replies, posted in Modules Add-on's)
The standard extensions, themes, languages and charts of accounts are signed by the FA devs (private key will not be divulged) and their public key is part of the FA (FA.pem) download.
The format of the extension packages (pkg) and it's distribution is based on the standard debian repo system and is slightly modified. The functions to achieve it are said to be in the archive.inc and packages.inc files in the includes folder.
A first draft attempt at placing a file with the following contents in a php file in the webroot and then attempting to build a package was tried in vain:
<?php
$path_to_root=".";
$pkgname='customernotes';
$mypkg = $pkgname . '-2.3.21-1.pkg';
include_once "./config.php";
include_once "./config_db.php";
include_once "./includes/packages.inc";
$pkg = new gzip_file("_data");
$options['prepend'] = PKG_CACHE_PATH.'/'.$pkgname.'/';
$pkg->set_options($options);
$list = Array(
"customernotes.php",
"hooks.php"
);
$pkg->add_files($list);
$pkg->create_archive();
rename('./_data', PKG_CACHE_PATH.'/'.substr(basename($filename), 0, -4).'/_data');
$pkg = new pkg_file($mypkg);
$list = Array(
"_init/*",
"_data"
);
$pkg->add_files($list);
$pkg->create_archive();
?>
The aim is to create a private / public key pair and then build and sign these packages and host them in a personal repo. This way many users will be able to make extensions and distribute them at will. FA can then be made to partake of multiple repos as well. The $repo_auth if used in config.php would take precedence over the one in version.php.
The following standard code from the PHP Manual may be used to generate the PKI keys needed:
<?php
// Fill in data for the distinguished name to be used in the cert
// You must change the values of these keys to match your name and
// company, or more precisely, the name and company of the person/site
// that you are generating the certificate for.
// For SSL certificates, the commonName is usually the domain name of
// that will be using the certificate, but for S/MIME certificates,
// the commonName will be the name of the individual who will use the
// certificate.
$dn = array(
"countryName" => "UK",
"stateOrProvinceName" => "Somerset",
"localityName" => "Glastonbury",
"organizationName" => "The Brain Room Limited",
"organizationalUnitName" => "PHP Documentation Team",
"commonName" => "Wez Furlong",
"emailAddress" => "wez@example.com"
);
// Generate a new private (and public) key pair
$privkey = openssl_pkey_new();
// Generate a certificate signing request
$csr = openssl_csr_new($dn, $privkey);
// You will usually want to create a self-signed certificate at this
// point until your CA fulfills your request.
// This creates a self-signed cert that is valid for 365 days
$sscert = openssl_csr_sign($csr, null, $privkey, 365);
// Now you will want to preserve your private key, CSR and self-signed
// cert so that they can be installed into your web server, mail server
// or mail client (depending on the intended use of the certificate).
// This example shows how to get those things into variables, but you
// can also store them directly into files.
// Typically, you will send the CSR on to your CA who will then issue
// you with the "real" certificate.
openssl_csr_export($csr, $csrout) and var_dump($csrout);
openssl_x509_export($sscert, $certout) and var_dump($certout);
openssl_pkey_export($privkey, $pkeyout, "mypassword") and var_dump($pkeyout);
// Show any errors that occurred here
while (($e = openssl_error_string()) !== false) {
echo $e . "\n";
}
?>
5,004 09/21/2014 08:59:43 pm
Topic: Local Repo (9 replies, posted in Modules Add-on's)
For those on the LAN with no internet connection, a local FA repo can be setup with ability to use unsigned packages. Grab the repo bundle from my GitHub Repo (may not be upto date) and extract it to your locally resolvable domain like: http://localhost.or.localdomain.com/farepo/2.3/ such that the themes, languages, charts and extensions folders are under it.
Now in the config.php file, append the following code:
// LAN repo (0), WAN repo with signed packages (1)
$repo_sign = 0;
// Comment out parameters not used
$repo_auth = array(
// 'scheme' => 'http://', // 'ftp://', 'https://'
// 'login' => '',
// 'pass' => '',
'host' => 'localhost.or.localdomain.com',
'path' => 'farepo', // no leading or trailing slashes (/)
'branch' => '2.3' // Repository branch for current sources version
);
Now edit the function get_pkg_or_list() in includes/packages.inc file:
1. Append the $repo_sign variable to the list of global variables.
2. Replace the line:
if (openssl_verify($data, $sig, $cert) <= 0) {
with
if ((!isset($repo_sign) || $repo_sign == 1) && openssl_verify($data, $sig, $cert) <= 0) {
Now the local repo is fully functional since the config.php parameters override the values in version.php.
@joe - can this flag ($repo_sign = true;) and a commented out repo array be included in the config.php file along with the changes in the includes/packages.inc in the mainstream stable distribution itself?
5,005 09/20/2014 12:08:05 pm
Re: Complex invoice/purchase orders. (1 replies, posted in Accounts Receivable)
Try Quick Entry - See Wiki
5,006 09/20/2014 10:23:51 am
Re: Primary Development Repo from mid May 2013 - Git (17 replies, posted in Announcements)
I have not bothered to clone it from the official Git but rather rely on changes from the release to release file sets and then when I have time, I manually get the changed files and vet them before incorporation into my repo - that's why it will lag behind from time to time.
You can however use the hg2git and clone directly from the HG repo.
@itronics maintains the Official Git Mirror and probably he can shed some light.
5,007 09/19/2014 03:36:48 pm
Re: Extension Development Tutorials (8 replies, posted in Modules Add-on's)
You might also want to look at:
http://www.kvcodes.com/2014/08/create-page-navigation-tables-frontaccounting/
Part II is archived here.
5,008 09/19/2014 03:16:03 pm
Re: Ajax login (3 replies, posted in Installation)
Ajax login can have security issues - what field(s) would you want to ajax anyway? If the username field or company name field are ajaxed, then it might become easy to guess them.
5,009 09/19/2014 06:19:38 am
Re: Extension Development Tutorials (8 replies, posted in Modules Add-on's)
Done updation! Attached herein. Now with Menu Icons change info.
5,010 09/18/2014 07:01:03 pm
Re: Git clone from official repository (10 replies, posted in Installation)
Use TortoiseGit and do a fetch/pull if you cannot clone..
5,011 09/18/2014 06:58:54 pm
Re: Foreign Currency Total (9 replies, posted in Report Bugs here)
Thanks. Done.
5,012 09/18/2014 04:32:58 pm
Re: Name of person whom generated the quotation (13 replies, posted in Reporting)
Joe - can a flag in the config.php be used to toggle this in all reports possibly in the header2.inc or some footer page? This will help avoid having to change each and every report. Also a barcode in the footer of each report too may be useful.
5,013 09/18/2014 04:29:43 pm
Re: Can't log in again after first logout (3 replies, posted in Installation)
Check if this is a timing issue - NTP synch your server and your client machines and try. Also see that you have the most recent code snapshot from the Official Git Mirror.
5,014 09/18/2014 04:28:30 pm
Re: Foreign Currency Total (9 replies, posted in Report Bugs here)
Thanks Joe. Wiki-ed it.
5,015 09/18/2014 03:50:52 pm
Re: Customer Balance Report (6 replies, posted in Report Bugs here)
Wiki-ed it.
5,016 09/18/2014 03:41:52 pm
Re: Foreign Currency Total (9 replies, posted in Report Bugs here)
Then, are all forex transactions converted to domestic currency and displayed with all the others already in domestic currency or just the latter alone when "No Currency Filter" is chosen?
5,017 09/18/2014 06:58:39 am
Re: Foreign Currency Total (9 replies, posted in Report Bugs here)
Then Joe, it should be made to choose the company's default currency if no currency is chosen and an "all currencies" option be provided to generate one without the final grand (meaningless) total!
5,018 09/18/2014 05:45:04 am
Re: Is there any time masked input field in FA? (4 replies, posted in Setup)
Do you mean a time slot for access permissions?
5,019 09/18/2014 05:41:18 am
Re: Extension Development Tutorials (8 replies, posted in Modules Add-on's)
Attached herewith is an English Translated and proofed version.
5,020 09/18/2014 03:44:53 am
Re: Restricted Login Access and Limit to access in on Office hours. (4 replies, posted in FA Modifications)
Any sql changes needed like setting up additional tables can be in special CoAs or done with appropriate hooks like the other parts of the code. Settings can be added to the system_defaults table.
5,021 09/18/2014 03:42:51 am
Re: CoA for South Africa (4 replies, posted in Misc. Charts of Accounts)
Or just copy paste in the forum.
Or edit the sql for the existing SA CoA.
5,022 09/18/2014 03:41:32 am
Re: Additional dimensions needed (6 replies, posted in Setup)
To help with such OLAP (OnLine Analytical Processing), I have just resurrected the abandoned / forgotten phpMyOLAP in my GitHub Repo.
5,023 09/18/2014 03:38:42 am
Re: Error in inventory valuation report (45 replies, posted in Report Bugs here)
That's fantastic thinking out of the box @joe as always and quick and clear testing and feedback by @MarkAndrew. Thanks.
5,024 09/18/2014 03:33:39 am
Re: How to use ""ALTER TABLE" and add a column? (5 replies, posted in Report Bugs here)
$cust_id should be a string with the name of the field and not it's value. If it is a reserved keyword then backquote it.
5,025 09/18/2014 03:28:28 am
Re: How to handle bounced cheques (3 replies, posted in Banking and General Ledger)
Wiki-ed it.