vtiger crm : single csv file to multiple database table - php

I'm trying to create a php script and add it with vTiger crm, this script will add to vTiger the functionality to add a single csv file to a multiple database tables.
I don't know how can i add this script to vTiger
Any suggestions, Documentation, Help ?
I am working with Vtiger CRM version 6.0

There are a lot of ways to accomplish this.
The first one is register a new module in your CRM, (searching google for the Payslip example module).
Broadly, a vtiger Module is structured in two parts, the first in PHP that you using to process all your data, your functions, the second is passing what you had processed into the Smarty Template engine.
About the main methods, consider that vtiger generally pass 2 URL parameters:
"module", is used to retrive the module name -> directory -> privileges and all the rest
"action", is used to call a specific php file into the module.
In all this you should consider the implementation of the all the basic vtiger framework, controls, privileges, ecc.
About the database, Vtiger use the adb method.
Take a look to the include/database/PearDatabase.php for a comprehensive overview of all the database functions.
A second way, highly raccomended, is process your CSV file using the vtiger Webservice https://wiki.vtiger.com/index.php/Webservices_tutorials
and so, use an external PHP file.
This way is more less flexibile, but you can workaround all the basic implementation and focus on the data.

Related

How do I import the mediawiki-core php module?

I want to edit and create pages and make revisions to a local wiki that I want to play around with. For development purposes I would like to interact with the database directly rather than the REST API. I found the documentation for the php module here https://doc.wikimedia.org/mediawiki-core/master/php/md_docs_database.html. How do I import this module?
What you have found there is not a "module" to "import", it is documentation of how MediaWiki itself queries the database. It's also dated 15 years ago, so there's a fair chance it's not even accurate any more.
Other than adding a prefix to names if the installation is configured to use one, the functions described just build whatever SQL you tell them to, so even if you used them, you'd still need to understand which tables to work with. At that point, it will probably be easier to use whatever application or library you're comfortable with to context directly to the database and run direct SQL.
To find out the layout of the database, you can look in the manual here: https://m.mediawiki.org/wiki/Manual:Database_layout
Your other option would be to write your code as a MediaWiki extension. Then you'd have access to the various helper objects and methods used by the MediaWiki code itself, rather than only those exposed by the API.

How to create default sample data for dev env in Symfony?

Context
I'm working with several people on a Symfony application.
Problem
We would like to have a database filled automatically with sample data, to avoid creating it manually on each developer environment.
Question
Is there an official way to do it or do we need to use .sql files we pass to each other to create sample data?
I've seen that's possible with the .net framework, that's why I ask for Symfony.
Take a look at the DoctrineFixturesBundle.
Also there is another bundle called AliceBundle, which makes it very easy to generate different sets of data.

Connecting Drupal Database with using External PHP script

I am currently developing php scripts, But At some point I wanted to connect to drupal database with my php scripts, I google about accessing drupal api with external php scripts, as many people suggested use bootstrap.inc file in your external php script, I like to ask here, lets say if I added this bootstrap.inc file and related code after that can i get access to use drupal api with its database?
I wanted to register a user with drupal database and also need to read some tables from drupal database, So can i achieved all this? including bootstrap.inc is enough or need to add any other module from drupal side, i external php script get access to drupal database?
Thanks.
If you still want to work outside Drupal, in a standalone script, you should include Drupal's include/bootstrap.inc and call drupal_bootstrap() function to initialize Drupal environment (connect to database, load modules, session, etc.). You can select the phase to bootstrap depending on what you need from Drupal.
define('DRUPAL_ROOT', 'YOUR DRUPAL ROOT');
require_once('includes/bootstrap.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// Drupal is fully loaded here, you can access everything.
information source: https://drupal.stackexchange.com/a/24117
drupal information: http://api.drupal.org/api/drupal/includes!bootstrap.inc/function/drupal_bootstrap/7

vTiger lead update

I have used vTiger WebForms module to insert new leads inside the vTiger system,
now I need to perform an update for these leads - is there any to do this operation?
I did not find any reference for this operation...
Look at Web services documentation.
May be you have to change index file in webforms folder and call appropriate api's over there.
Before that take up of your files and i think you need to register an that operation before you do any CRUD operations.
You must download and read documentation to make connection via web services with vtiger crm to perform update/delete/insert download from here:
http://forge.vtiger.com/frs/?group_id=181

Magento: how to configure cron settings using GUI?

It's not a problem to set cron intervals using xml-config file, but it'll be great to have ability to do that using config panel of custom module any time if needed. Friendly GUI instead of "terrible" XML, which could be accessible via FTP.
I have one idea only: catch some event when admin updates configuration of a given module and rewrite that xml-file by custom mechanism, but I don't like this solution. Maybe you know better or/and standard way?
Magento usually grabs all the cron data from the XML files you don't seem to be in favor of, but there's no reason you couldn't override it to use some other data model that gets retrieved from the database. Then you could have a simple interface to manage the cron details in the admin.

Categories