Customizing SMF > Portals, Bridges, and Integrations

New tools to help integrating SMF with something else

<< < (2/34) > >>

Andre N:

--- Quote from: BREZ on October 30, 2011, 12:50:58 PM ---I am a bit confused.

Exactly where would the
--- Code: ---smfapi_logout($email);
--- End code ---
go in 4images script?

--- End quote ---

It would go wherever that script logs the user out. So look in the 4images script for the point where the user gets logged out of 4images and add the API code beneath that.
Make sure that you have included the API script already, and that $email has their email address, SMF username or SMF member ID

DanCarroll:
Maybe you can help me decide on the direction to take my project. I'm developing a CRM for a client and am looking at basing it on SMF. My dilemma is in what would be the best approach. At this point I like the idea of adding to the SMF system. Save some duplication of effort and code by using the member (user) system and messaging system. I found this thread and would like clarification on the following quote from the first posting in this thread.


--- Quote ---The API will let you control SMF from your other system.

The integration hooks will let you control your other system from SMF

--- End quote ---


* Should I set this up as an external system and use the integration hooks to control my app?
* Or have my app be stand alone and control SMF through the API?
* Maybe even set it up as a Mod and integrate that way?
* Or go with my current plan and integrate it into the SMF system via custom actions?
Any and all help on this is greatly appreciated.

Thanks, Dan C.

Andre N:
What is the other application going to be?

DanCarroll:
A CRM app (Customer Relationship Management). Basically it is to track clients & customers, events & purchases, and prospects & phone calls. I have the data model figured out and was looking at adding it to the SMF forum and the forum members would be "staff or employees". Would need to integrate it into the Calendar system, etc.

Using PHP & mySQL so shouldn't be a problem. I didn't have a good understanding of the API and integration hooks. What about the SMC functions? Are the SMC functions part of the $smcFunc system?

I have the 2.0.1 version of SMF up and running with both a production and a test system. I just need to start developing the web app part of my CRM system. Basically just need data entry and reporting functions to a database.

Andre N:
The SMC functions are

--- Code: ---$smcFunc => Array
    (
        [db_query] => smf_db_query
        [db_quote] => smf_db_quote
        [db_fetch_assoc] => mysql_fetch_assoc
        [db_fetch_row] => mysql_fetch_row
        [db_free_result] => mysql_free_result
        [db_insert] => smf_db_insert
        [db_insert_id] => smf_db_insert_id
        [db_num_rows] => mysql_num_rows
        [db_data_seek] => mysql_data_seek
        [db_num_fields] => mysql_num_fields
        [db_escape_string] => addslashes
        [db_unescape_string] => stripslashes
        [db_server_info] => mysql_get_server_info
        [db_affected_rows] => smf_db_affected_rows
        [db_transaction] => smf_db_transaction
        [db_error] => mysql_error
        [db_select_db] => mysql_select_db
        [db_title] =>
        [db_sybase] =>
        [db_case_sensitive] =>
        [db_escape_wildcard_string] => smf_db_escape_wildcard_string
        [entity_fix] =>
        [htmlspecialchars] =>
        [htmltrim] =>
        [strlen] =>
        [strpos] =>
        [substr] =>
        [strtolower] =>
        [strtoupper] =>
        [truncate] =>
        [ucfirst] =>
        [ucwords] =>
    )
--- End code ---
They're just the functions mainly used with the SMF db. They are already available if you are in SMF, or if you call the API. including the API script is like loading the "SMF object". It will give you (easier) access to the SMF db and all the settings and variables like $context and $modSettings

So by including the API script wherever SMF hasn't been instantiated you can use those db functions, plus the other API functions, plus you have access to those settings variables. Is that what you're looking for?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version