Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - markc

Pages: [1] 2 3 4
1
The forum said the upload directory was full, and it also says I'm not allowed to post links, so here is a link to the patch with reversed starting slashes:

http:\\images.whattheit.com/addr2and3.patch

edit: and oddly, I just pasted that mangled url into firefox and IE and they both take it just fine!

2
General
The attached patch adds 2nd and 3rd street/address lines to all addresses of Contacts and Companies, which are supported or partially supported in things like Thunderbird, gmail, Outlook, and the vcard RFC. The patch is for FengOffice 2.2.4.1, and was recently (FINALLY!) rewritten from a 2.2.1 patch version that itself was a major redo from a patch to 1.7.5. The patch should be fairly comprehensive. It updates the address "display cards", their edit pages, the "quick create company" div from the user edit/add page, the import/export routines use the extra fields if present, and etc., etc. I even tried to match indention styles as not all files are the same, and I added the appropriate code for the 2nd and 3rd address lines even in places where the original code was commented out or only there for demonstration (that is, I left it commented, but updated it anyway).

Database changes:
The patch requires adding two fields: street2 and street3 to the table contact_addresses, both of which should have identical attributes to the existing street field in that table. I've included changes to ../public/install/installation/templates/sql/mysql_schema.php so if you apply the patch to the source tree BEFORE running the install you won't have to manually add these fields. However if you have good backups, know what you're doing, and understand that I take no responsibility... you technically can patch an existing 2.2.4.1 install and add the fields to the DB and be all set. Existing records will look no different regarding the street2 and street3 fields than they would for any other field that only had some records of a certain type set (like if phone was set and phone2 wasn't...perfectly normal).

Lang changes:
There was already an address2 field for other reasons so the only addition is:
Code: [Select]
'address3' => 'Address 3',As before I've only added it to en_us, but this time around it finally occurred to me that updating other languages can be done fairly accurately by comparing their existing address/address2 or email/email2/email3 lines and apply the same semantics for address3. I may still do this and post an update with the change.

Upgrading: (basically, no guarantees)
This patch is intended as something that might be merged to the official code, so I can't support it for anyone who uses it individually. If you decide to anyway though, this might help:

-You can't upgrade from any prior version to 2.2.4.1 using a tree that has this patch because I only made additions to the install schema, not the upgrade schema or migration scripts.
-Once you're up and going with a new or existing 2.2.4.1 install though, future upgrades are usually a matter of removing the patch, running the stock upgrade, and then re-applying (possibly a slightly modified version of) the patch. Usually only minor changes are needed to make it apply cleanly to a newer minor release. It wasn't as problematic in the late 1.X days, but even my 2.2.1 version wouldn't apply cleanly to 2.2.4.1. This may change again as 2.X continues to mature.

I may post updated versions when minor changes in the official code make it necessary, but I must point out that this is the first version of it I've posted since the one for 1.7.5 (so again, no guarantees). This was because going to 2.X the devs abstracted the addresses table away from the Contact and Company objects which, although it is a very, very awesome improvement and was well done by them, it made updating this patch rather daunting (and I've still got to update one more patch before I can move from 1.7.5).

Please let me know if you try this and find a bug.

...

Code: [Select]
luser@host:/var/www/fengoffice$ sudo patch -p1 < /home/luser/source/2241/addr2and3.patch
patching file application/controllers/ContactController.class.php
patching file application/models/contact_addresses/ContactAddress.class.php
patching file application/models/contact_addresses/base/BaseContactAddress.class.php
patching file application/models/contact_addresses/base/BaseContactAddresses.class.php
patching file application/models/contacts/Contact.class.php
patching file application/models/contacts/Contacts.class.php
patching file application/views/contact/add_company.php
patching file application/views/contact/card_content.php
patching file application/views/contact/company_card.php
patching file application/views/contact/company_content.php
patching file application/views/contact/edit_contact.php
patching file language/en_us/fields.php
patching file language/en_us/general.php
patching file public/assets/javascript/og/modules/addContactForm.js
patching file public/install/installation/templates/sql/mysql_schema.php
luser@host:/var/www/fengoffice$

3
Community Contributions / Re: Timezone support patch
« on: September 05, 2012, 01:23:57 pm »
Is this still and ongoing effort?

4
Feng Office 2 / Quick question on search in FO 2.x
« on: August 30, 2012, 01:13:06 pm »
Has there been any increase in the number of fields that can be searched for Contacts or other objects? I looked at some bits of the code and didn't see much new, but some of the new stuff may not be in the same places as before

In our 1.7.5 install I managed to add the Contacts object's 'Department' field in the code and in the 'searchable_objects' table so we could search on that field. I need to add some others but I think we'll be upgrading to 2.x before too long so I don't want to go through the trouble if 2.x is better in this regard.

I don't need a detailed list or anything, just a general idea if there are a lot of new searchable fields in 2.x (or if the schema of the search index in 2.x has changed enough that I should wait).

5
On the base level I know you can turn debug to true in ../fengoffice/config/config.php but that doesn't really spew debug info about the database. I don't know of anything else on the FO side of things.

In mysql I usually just turn query logging on and then pull the data from the mysql server after the fact. Is there a place to do that in the engine you are using?

6
How To's / Re: No "Getting Started" when I double-click Overview button.
« on: August 23, 2011, 12:35:29 pm »
Oh...heh.

I suppose I hadn't really paid attention to what the wizard was used for. I assumed it was a greeting that all new users were supposed to get, but that doesn't look to be the case.

It looks like you were right in your last post, although I did find a minor bug.

If you have the Wizard open and use it to create and save a Workspace, but then hit the green "Close" button before doing anything else with the Wizard, then double clicking Overview after that will give an error popup up top that says:  "Error: this.dom.parentNode is null". This is certainly not of high importance to me but I thought I'd mention it.

Thanks for your help!

7
How To's / Re: No "Getting Started" when I double-click Overview button.
« on: August 19, 2011, 01:45:33 pm »
As I'd mentioned before there is nothing coming up in log.php and the browser gives no error even with debug turned on.

Thank you,
Mark

8
How To's / Re: No "Getting Started" when I double-click Overview button.
« on: August 17, 2011, 04:39:56 pm »
Thank you for that idea.

The Default User Preference under General is set to Yes for showing the Getting Started Widget.

Also my account is in the Admin group and it is set to Yes in my own preferences and when I double click Overview still nothing happens.

Any other ideas?

Thank you,
Mark

9
General Discussion / Re: Why is Bugs board closed for new posts?
« on: August 04, 2011, 03:09:37 pm »
The very first post on the Bugs board has the answer...right above the one that says Read Before Posting.

10
Community Contributions / vcard improvement (by itself!)
« on: August 01, 2011, 05:55:22 pm »
First off, thanks to everyone who works on FO. The new 'getting started' screen looks particularly great, among other things.

Some time back I made some improvements to the vcard import/export that were merged into the FO code. They helped but unfortunately, even today (even on the Sky demo) you cannot export, delete, and then re-import a contact without losing data!

If you try this procedure:
-Create new contact
-Fill in most of the addresses and phone numbers and other fields
-Save
-Export vcard
-Trash and delete the contact
-Import the vcard you just exported

...that will result in over half of the contact's phone numbers disappearing (and those that survive are in the wrong order). Also, the Middlename and Department fields disappear as well.

This is just what the software does to natively exported vcards; you don't even want to know what happens when the vcard is 3rd party, and includes newline-folded address lines or QP encoded strings. (Outlook vcards have both)

The attached patch fixes all but one of these problems (the folded lines in 3rd party vcards remain an issue). However, it enables you to export a vcard and re-import it without losing data, including many of the fields that are not in the vcard spec like 'Department'. Even that part is done according to spec though, because it is exported with an 'X-' to signify a custom field. It also does a much better job with importing 3rd party vcards and it can now handle QP encoded strings.

This is NOT the version of the patch that adds fields to Contact objects, which I had posted before. That one modified a lot of code and other stuff including the MySQL schema and lang strings.

This version only modifies 2 functions in ./application/controllers/ContactController.class.php so it should be infinitely easier to evaluate. It doesn't touch the schema or lang stuff or any other code. This one I'm attaching is updated for v1.7.5 (but read the install note below!).

If you find any bugs or have any questions please let me know.

Thank you,
Mark

IMPORTANT INSTALL NOTE!!!:
Somewhere around v1.7.3 the file ContactController.class.php (along with most of the rest of the php code files) changed from using unix line endings to using dos line endings. The attached patch file uses unix line endings and the 'patch' binary (at least the one I have) will not apply it successfully unless you change the line endings in the target file. (I do ':set ff=unix' in vim or 'flip -u')

Once that is done I'm using something along the lines of:
# cd /example/path/to/fengoffice
# sudo patch -p1 --dry-run < /example/path/to/vcard_ups_for_v175.patch

11
How To's / No "Getting Started" when I double-click Overview button.
« on: July 29, 2011, 04:54:22 pm »
I have a test feng site and a production feng site which are both @ v1.7.5.

On the test site (which was a recent clean install), I get the "Getting Started" page and I can Close it. It says to double-click Overview to get it back. This works.

On the production site (which was manually upgraded from 1.7.2) no one gets the "Getting Started" page even though it is set as the default user preference (enable). When I double click Overview it just says 'Loading...' for a second and then nothing happens.

What I know so far:
-It is the same in Firefox and IE for both FO admins and regular users.
-I do not get an error in-browser (even if I turn on debug) and I get nothing in ./cache/log.php.
-There is no difference in behavior if "./application/views/dashboard/widget_getting_started.php" is chmod 000 or 777 so I put it back to what it was (644).
-If that same file is missing I do get major errors when I double-click Overview.
-The entire fengoffice install is owned by the same user running apache.

Any ideas?

Thank you in advance for any assistance,
Mark

12
How To's / Re: Create new contact - Select name is aready taken
« on: June 07, 2011, 03:20:06 pm »
Is there any word on this? I was looking at some of the recent release notes and did not see anything.

If there is no progress yet, is there any reason that I should not do what is in this post: "forums.fengoffice.com/index.php?topic=3675.0" ? (Really though I would be doing this to Contacts only, not to Users of the system) Are there other places in the current codebase that depend on unique firstname lastname combinations for Contacts?

I fully accept that this may not be compatible with whatever official fix comes down the pipe. I would be happy to delete all of my duplicate fn+ln contacts and re-enter them after upgrading to the official fix when it becomes available. For now though I need to make it work...we have thousands of Contacts; there are THREE Stephen Blaine Smith's! :)

I just need to know that it won't break anything else in the current code.

13
How To's / Re: LDAP support?
« on: May 11, 2011, 04:11:52 pm »
I have the LDAP in use so I could take a stab at helping. First though I think more information is needed; I don't see any real details in your post as to what problem you're having with the LDAP implementation. Can people not log in?

14
Applications / Search within Contact's Department field
« on: September 27, 2010, 12:40:03 pm »
I've tried to make it so that the search box will search within the Department field of my Contact objects but it hasn't been working.

I remember adding the name of the field to $searchable_columns in /application/models/contacts/Contact.class.php but I don't think it worked. It has been a bit now so I don't remember if I tried anything else.

Any ideas?

Thank you,
Mark

15
How To's / Re: Feng Office & Google Apps Email/Calendar/Contacts
« on: August 23, 2010, 04:11:00 pm »
I just remembered you're on a hosting server and may not be directly in charge of the firewall. I did not mean in FO's settings. I meant the settings in the Windows Firewall/iptables/ISA/etc firewall that is on your host's server. They may not allow outbound access on the ports you are trying.

[edit] Or...they could even be on a spam blocklist and google is shunning them.

hth,
Mark

Pages: [1] 2 3 4