Actually i am using sugarCRM open source for my own purpose. That was developed by PHP in MVC format. I want to do some changes in existing file. I cannot modify the any code at any cost, because i cannot understand the flow of the code. In sugar CRM having many folders and files so that was difficult to understand the code flowing.
Exactly what i am expecting is, atleast one module is how is flowing with the code and what is the exact file path...
Very Big thanks in Advance...
Have you checked out the Sugar Developers website? There are tutorials and other information about developing for Sugar.
Sugar Developers website is a great source but you could also use documentation where you could find for each SugarCRM Flavor a Developer Guide, and since 6.3 an API Documentation and a Schema Documentation.
Sugar modules are in /modules but you don't want to edit these as it is not upgrade safe. To make a modification you either use or create the relevant folder in /custom/modules
Most often you will be doing metadata updates (most functionality is metadata driven) in files like editviewdefs.php, listviewdefs.php in the custom folder.
Logic hooks can go in here too, search for logic_hooks.php in the sugar documentation as it shows the way to create the metadata array to reference new PHP functions on hooks like "before_save", "after_save" and others.
Sometimes you can start the customisations in Studio (admin menu) and get examples generated in the custom folder for you.
Related
I am working on a project (already started), but I do not know if it is done with framework since there are files in many different folders, but I do not see any syntax referring to some framework that I know of.
I hope someone can help me...
Well it would depend on the Folder Hierarchies and the code.
If the views folder has the term "blade" on it, it's definitely laravel.
If the the code of the library has the term "CI Controller" somewhere in the libraries its definitely CodeIgniter.
If the code has a lot of "wp-" string in its code, its definitely Wordpress.
TIP: Put the whole folder in Sublime, search the folder (right click the folder and choose "Find in folder...") and search for terms that are generally reserved words for mostly used frameworks.
There are different methods to identify the PHP framework used by a web application. But one of the easiest way I would like to share it with you to use this extension in your browser called Wappalyzer.
Wappalyzer is a cross-platform utility that uncovers the technologies used on websites. It detects content management systems, e-commerce platforms, web frameworks, server software, analytics tools and many more.
There are a few other tools out there that analyze what a website is using.
BuiltWith - Stand alone site, also available as a plugin
W3Techs - Stand alone site, also available as a plugin
Auto-generated comments may also help. In my case, I can tell from the comments in index.php that it's written in CodeIgniter.
If you have a copy of the project hosted somewhere you can use https://builtwith.com
We(small group) have a SocialEngine based project and we made lots and lots of changes in 4.6.0 version including core modules, now we struggle to update to 4.8.0 which is a pain in the ass so question:
Which logic to implement in new version of social engine where will be stored our modified code that will help for future update?
We are trying using Decorator Pattern, creating another folder(modules2) for example there creating clones of modules and using only modified files(which is currently unsuccessfully).
You can to compare your files with the latest upgrade package files with Softwares like WinMerge and copy new changes in SocialEngine core to your modified files. Don't forget the database queries in application/MODULE_NAME/settings/my-upgrade sql file of each module. It's gonna take time but I don't think there's any easier solutions.
See, thats where git or subversion comes handy , you exactly know where the code is changed .
I realise there is quite a bit on this in other posts and i am getting my teeth into those too, but i just want to clear one fundamental point up before i get into detail.
I have read in depth the integration document and i understand the principles. The iFrame is a corollary of server integration with a couple additions to the communication with the Sage server as i understand it; but that is for later. What i am completely stumped by is this php downloadable integration kit.
The document states that we just need to issue some value name pairs and I feel completely happy with that. The document also states that there are examples of the posts and the notificationURL reply posts that are needed in the integration kit.
In the integration kit i find two directories: demo and lib. Following the instructions to integrate the SQL into my dev environment I can get the demo to work. I can use it to make a purchase from their CD shop, but the calls and code to initialise the Sage are buried all around a really really complicated directory structure with loads of includes and external calls to throw you off the scent. I have looked atlots of the files and nowhere do i see any name/value pairs being passed. In the lib directory are a config file, and a constants file with lots of variable declarations and an initialisation file which presumably starts the whole thing off somehow, but just gives a blank screen in a browser. There is a folder called classes with many many files defining various classes, but no help files or useful notes.
What there is not is any explanation of what to do or any examples. So this is my question for anybody who has done this recently: Do i just need to post some value pairs to the server specified in the documentation (easy peasy), or do i need to have the sage files present on my server and initialise some objects and relevent properties within the class structure in the integration pack etc. The two are pretty much poles apart for me, particularly without any help files to navigate the classes structure.
Does anybody know which is the correct solution and where the mentioned exmples might be hiding.
Thanks for any help.
I have recently started working on an eCommerce site for a company and they have selected Magento 1.4.0 to run their store. I have spent most of my PHP "career" working with various MVC frameworks (even Zend with Magento is supposed to be based on) but the complexity of Magento seems to be on another level with no seemingly good resources to look to for help.
Looking around the site I have seen suggestions for certain books to use as reference, but they all refer to Magento 1.2 or 1.3.
My goal is to develop for Magento in a way that I do not alter any of the base code so that the client can easily upgrade the version of Magento and just "drop in" my code and have it work. The current issue is how to properly use the layout/template breakdown correctly and how to add custom model/controller functionality to the application without hacking away at Magento's core code base.
how to properly use the layout/template breakdown correctly
What you need to know is the folder structure of the Magento & the use of its own MVC structure. This is a very very important part to get you started from the basic roots. Whatever version you use, the folder structure & the MVC structure followed by Magento will almost never change. Try to follow the Magento's own Knowledge Base & Wiki tutorials. If you want you can also follow some other sites as well.
how to add custom model/controller functionality to the application
without hacking away at Magento's core code base
You will need to use the custom module functionality to override the core code base of model / controller. It's a simple process of writing the main logic in a XML file, of what core class you want to override of Magento, in your module's "etc" folder. Try to understand the process first, from the Knowledge Base & Wiki tutorials, to get a firm grip on overriding core classes.
I hope this helps.
My company is building a platform on top of a heavily extended Drupal core. I have multiple customers who will be using separate instances of this system and will want to customize both the theme and the functionality.
I'm trying to design a system to allow them to add themes and modules, some of which might interact with some of my modules, without giving them access to the actual code. (This isn't open source)
The way that Facebook and Ning do this is to have the developer host their own custom code, and have a callback to it. This won't really work for me, as these sites need the ability to be fully customized, so callbacks for specific integration points don't really work.
One option is to set up a sandbox environment where the custom developers only have access to a couple specific directories to build their themes and custom modules. We could then integrate with git to commit these when they're ready and deploy them with the rest of our code into production. The problem with this setup is that developers have to develop remotely and have to use our source control system.
A more typical setup is to allow the developers to download something to build their custom code against. They can develop locally and use whatever source control practices they already have. As we don't want specific point integrations, I don't think this can be a library that runs against a separate server. The alternative is to download our full core Drupal system and develop locally against that, uploading the custom code when it's ready, but then they would have access to all our code and IP.
Thus the predicament, as I don't think there is any way to effectively obfuscate PHP.
Anyone have any brilliant ideas here?
It sounds like your system is a derivative work of Drupal and thus covered by the GPL. If you distribute the code to your clients they have all of the rights provided by the GPL, Including modifying and redistributing it.
Be aware that distributing obfuscated GPLed code is not allowed. To quote the GPLv2 "The source code for a work means the preferred form of the work for making modifications to it."
Obfuscated code does not comply with this clause of the GPL.
That said, if you really want to provide your clients a way to customize your system you could provide your clients access to the existing Drupal module and theme system but only on your sandbox.
Of course since the modules and themes are PHP and you "don't want specific point integrations" it seems they would have the sort of freedom that would allow them to write a module that reads all of the source code for the rest of your system and then tar it up and send it to themselves.
I think you've painted yourself into a corner by depending on GPL. Keeping your IP private while allowing your clients to extend/customize the system in general ways doesn't really work.
I hope you're aware that Drupal is GPL licensed, be sure to read their licensing FAQ before you start obfuscating.
Why not just create an FTP user for them which can only access /sites/theirsite? What am I missing?