Third-party integrations - MODX Community Forums <![CDATA[Stopforumspam]]> Fri, 08 Jun 2018 01:01:56 +0000 <![CDATA[Mailchimp for MODX]]>
I can't get Sterc's extra to add subscribers to MailChimp lists using FormIt and the MailChimp API to work.

This is the input field I use for the email address:
<input type="text" placeholder="E-mailadres" name="email" id="check" value="[[]]" aria-describedby="HelpMyemail" required pattern="email" >

I added a (hidden) field called newsgroup and as described in the documentation, gave it the value "yes".
<input type="hidden" id="newsgroup" name="newsgroup" value="yes" />

The API key in defined in the systems settings.

I call formit with the following scriptproperties:

&validationErrorMessage=`something wrong`

When I leave the email address empty, I get an error message from Mailchimp, which indicates - I believe - that I've got the API working. But, when I enter a proper email address, nothing happens. Formit isn't redirecting, Mailchimp isn't giving an error message.

Any idea what might be wrong?


]]> Tue, 05 Jun 2018 09:20:53 +0000
<![CDATA[disabled field in manager]]>
There is a field "articletags" which is disabled in my MODx installation for a user without "Super User" role.
A Super User can edit and add new tags. I can't figure out why…

I'd appreciate your help...

Thank you very much
seliin]]> Tue, 31 Oct 2017 02:00:11 +0000
<![CDATA[SalesForce integration with MODx?]]> Tue, 17 Oct 2017 07:15:05 +0000 <![CDATA[Mailchimp issue after new revo installation]]>
modmailchimp/elements/snippets/snippet.modMailchimp.php : 327) PHP warning: Illegal string offset 'tag'

Great for some feedback.

thank you

rickard]]> Wed, 12 Apr 2017 03:22:52 +0000
<![CDATA[Facebook_Feed help?]]>
Has anyone got this Extra to work?

My version of Modx and PHP conforms to the requirements but i'm not getting any output.
I'm wondering if it's something to do with my Facebook setup. I chose 'Apps for Pages' and used the generated API keys. I add [[FB_Feed]] to a page and it doesn't display anything.
As i understand it should give the ability to display a feed from a Facebook Page.
What am i doing wrong?

Thanks for any help
j]]> Wed, 29 Mar 2017 11:38:57 +0000
<![CDATA[Using phpBB forum sessions with MODX Revo 2.2+]]>
I am currently converting an older site including a phpBB forum to ModX. Given the forum size i am not keen on migrating to another forum script; and must say i quite like phpBB too!

I am not trying to integrate phpBB and MODX (as it's been discussed in the past, e.g. with a full bridge, but just need to use phpBB sessions into ModX pages.

I have found a solution which seems to work fine. Must say it took me longer than i expected to implement (i am new to Modx and still have a lot to learn !). In particular have had issues with snippets and MODX caching.
I am including below a copy of my solution and code, in case it would be helpful to others with similar needs. Plse feel free to amend AND moreover UPGRADE or IMPROVE as you see fit !

MODX version : Revolution 2.2.8
PhpBB version : 3.0.11
Forum url :

Snippet sessionphpBB (a real basic class, you can expand as you need) :

class MyPhpBBsession {
    public function __construct()
        global $phpbb_root_path, $phpEx, $user, $db, $config, $cache;
        define('IN_PHPBB', true);
        $phpbb_root_path = './forum/';
        $phpEx = substr(strrchr(__FILE__, '.'), 1);
        include($phpbb_root_path . 'common.' . $phpEx);
		// Start phpBB session management
		// Setup the auth/permissions for this user
		// setup the user-specific settings, style and language (optional)
		// $user->setup(); 
    public function getid()
        global $phpbb_root_path, $phpEx, $user, $db, $config, $cache;
        return $user->data['user_id'];
	public function getusername()
        global $phpbb_root_path, $phpEx, $user, $db, $config, $cache;
        return $user->data['username'] ;		 
	public function urllogout()
        global $phpbb_root_path, $phpEx, $user, $db, $config, $cache;
        $url_logout= append_sid("/forum/ucp.$phpEx", 'mode=logout', true, $user->session_id) ;
		return $url_logout;

Snippet user_loginout :

$pbbuser = new MyPhpBBsession ();

if ($myusername!='Anonymous') {
$my_user_title = 'Logout [ '.$myusername.' ]' ;
$my_user_link =  $pbbuser->urllogout() ;
$my_link_add = '';
$my_private = '[[$members_private_message]]';


//$output = '<div style="display:none">Welcome '.$myusername.'</div>';
//return $output;	


else {

$my_user_title = 'Login' ;
$my_user_link = '#login-form';
$my_link_add = 'data-toggle="modal"';
$my_private = '[[$members_message_login]]';


	if (!empty($tpl)) {$output = $modx->getChunk($tpl); return $output; }
	else {$output='login_form chunk not found'; return $output;}

As phpBB session code needs to be first, i am including it first in my templates, example :

[[!user_loginout? &tpl=`login_form`]]

<div class="main-container">
</div><!-- end main-container -->  		

A simple chunk "userloginout"to add a login link or logout[user_name] as with phpBB :
<a href="[[+loginout_url]]" [[+mydata_url]]>[[+loginout_title]]</a>

which can e.g. be called into your main menu :

and a login form (as a popup window, using bootstrap css/templates):

<div id="login-form" class="modal hide fade in" style="display: none;">
			<div class="modal-header">
				<a class="close" data-dismiss="modal">×</a>
				<h3>Sign In</h3>
			<div class="modal-body">
				<form method="post" action="/forum/ucp.php?mode=login">

				User : <br /><input type="text" name="username" size="8" /><br />
				Password * : <br /><input type="password"  name="password" size="8" />


				<input class="btn btn-large btn-purple" type="submit" name="login"  value="Login" />

				<input type="hidden" name="redirect" value="[[++site_url]]forum/" />

				<label id="autologin_label" for="autologin"><input type="checkbox" name="autologin" id="autologin" /> <em>Log me on automatically each visit</em></label>
				<a href="/forum/ucp.php?mode=sendpassword"class="btn"><em>* I forgot my password</em></a>
			<div class="modal-footer">
				Not registered yet ?   
				<a href="[[++site_url]]forum/ucp.php?mode=register" class="btn btn-purple">Sign Up !</a>

At this stage i am using this code to display a login/logout[user_name] link in my MODX pages menu, displaying a private message and hiding some ads (using visibility:hidden for the later) to logged in members only. It is possible to login or logout from any MODX or PhpBB page. Using the MODX plugin "getfeed", i can develop pages with the latest posts from the forum or its sections of interest to particular members (still need to double check whether only the authorized forums/posts are displayed for a given member). Modx templates/phpBB themes used are looking alike (hence a seamingless navigation across the site) but no actual integration between the 2 scripts (not needed in my case).
Please note i am NOT using MODX authorizations/users here at all. This would be a much bigger endeavour (well above my skills and knowledge); i am specifically concerned about potential uncompatibilities and/or need to rename some variables which would require a "deep dive" into MODX and PhpBB main coding...

Hope this is an helpful starting point]]> Mon, 12 Dec 2016 04:02:19 +0000
<![CDATA[MODX/SMF User Integration]]>

  • Login and logout.
  • Create users.
  • Reset passwords.
  • Update common profile fields (username, fullname, email, date of birth, gender, etc.)
  • Delete users.
  • Activate and deactivate users.

Developed by bezumkin
Installable from the MODX installer
Installable from the ModxPro repository
Also available from bezumkin's GitHub repository
]]> Thu, 08 Oct 2015 09:05:39 +0000
<![CDATA[Is there a working SMF bridge solution for Revolution?]]>
It seems that there is only a SMF bridge for Evolution.

I would be more than happy to find a solution to integrate MODx to SMF, maybe some function to throw registered smf users over to modx and on login fire the Login snippet's authenticate function when a user logs into SMF.

Has anyone succeed with integrating SMF into MODX Revolution?]]> Tue, 06 Oct 2015 09:11:39 +0000
<![CDATA[Integration of Question2Answer into MODX]]> The instructions presented by Q2A are not specified for MODX and therefore incomplete.

Thank you for your support and dedication.
Sandra]]> Sun, 15 Feb 2015 10:46:49 +0000
<![CDATA[Could not load DBAPI class error in WordPress after updating to Evo 1.0.15]]>
Could not load DBAPI class.

Any ideas?

Here is the code I'm using in my WP theme:

define('MODX_BASE_PATH', dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/');

//define("IN_ETOMITE_PARSER", "true"); // provides compatibility with etomite 0.6 and maybe later versions
define("IN_PARSER_MODE", "true");
define("IN_MANAGER_MODE", "false");

if (!defined('MODX_API_MODE')) {
    define('MODX_API_MODE', true);

// initialize the variables prior to grabbing the config file
$GLOBALS['database_type'] = 'mysql';
$GLOBALS['database_server'] = '';
$GLOBALS['database_user'] = 'xxx';
$GLOBALS['database_password'] = 'xxx';
$GLOBALS['dbase'] = 'xxx_modx';
$GLOBALS['table_prefix'] = 'modx_';
$GLOBALS['base_url'] = '';
$GLOBALS['base_path'] = '/home/xxx/xxx/';
define('MODX_BASE_URL', $GLOBALS['base_url']);
define('MODX_SITE_URL', $GLOBALS['base_url']);

$ipath = ini_get('include_path');
ini_set('include_path', $ipath . ':' . $GLOBALS['base_path']);

// initiate a new document parser
$GLOBALS['modx'] = new DocumentParser;
$modx =& $GLOBALS['modx'];
$etomite = &$GLOBALS['modx']; // for backward compatibility

// set some parser options
$modx->minParserPasses = 1; // min number of parser recursive loops or passes
$modx->maxParserPasses = 10; // max number of parser recursive loops or passes
$modx->dumpSQL = false;
$modx->dumpSnippets = false; // feed the parser the execution start time
$modx->tstart = $tstart;

$modx->documentMethod = 'id';
$modx->documentIdentifier = 8; // modx page ID that links to wordpress
]]> Fri, 30 Jan 2015 08:42:13 +0000
<![CDATA[Call to a member function get() on a non-object]]>
Fatal error: Call to a member function get() on a non-object in /home/mysite/public_html/core/model/modx/modlexicon.class.php on line 161

the problem is this line:


if i commenti the line i recive this error:

 Fatal error: Call to a member function get() on a non-object in /home/mysite/public_html/core/model/modx/modresource.class.php on line 730

What change in the new modx ?]]> Sat, 04 Oct 2014 03:14:10 +0000
Is anyone else using modxActiveDirectory and pulling related data from Active Directory? Would you be willing to share sample code or detail how you got that to work?

Thanks in advance for your help!]]> Thu, 26 Jun 2014 09:15:33 +0000
<![CDATA[Modifying usergroups: Call to a member function getObject() on a non-object]]>
Since the file I'm running this through is in a subdirectory of MODx, and stand-alone from MODx, I have to import the MODx system, and the result is as shown below:

Main Class
// This initialises all MODx Commands and Permissions! :D
require_once '../config.core.php';
require_once MODX_CORE_PATH.'model/modx/modx.class.php';
$modx = new modX();
$modx->getService('error','error.modError', '', '');
function userPurchasedItem($item_id, $payment_amount, $payer_email, $username) {
// Setup the user, using the $username passed to the function
	$myUser = $modx->getObject('modUser', array('username'=>$username));
	 if ($myUser instanceof modUser) {
        $modx->user = $myUser;
		 echo 'user Success!';
    } else {
        die('No User');

I then made a test.php class which included and called on the file & function, and I've run into an error which I'm not quite sure how to fix.

Fatal error: Call to a member function getObject() on a non-object in path/to/upgrade/purchase.php on line 10

Can someone please let me know what I am doing wrong?]]> Thu, 19 Jun 2014 10:41:00 +0000
<![CDATA[Adding a 3rd party component into Manager]]> I'm exploring the possibility of adding a 3rd party component (simple ecommerce panel) into the Manager. I'm not looking for deep integration (only at manager auth level). In EVO this could be simply achieved by capturing with an iFrame -> is there a similar technique to simply "capture" the app within a Manager page?

Thanks.]]> Tue, 01 Apr 2014 11:17:40 +0000
<![CDATA[GeoLite Country]]>
I have a small php routine in a snippet. I am getting this error when the snippet runs:

« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »

PHP error debug
Error: require_once() [function.require-once]: URL file-access is disabled in the server configuration
Error type/ Nr.: Warning - 2
File: /home/public_html/manager/includes/ : eval()’d code
Line: 1

I guess this is a problem with our configuration, but not being a modx guru I cannot work out what needs changing and where.
Can anyone point me in the correct direction?

Thank you for reading this question.


Snippet is:


$gi = geoip_open("",GEOIP_STANDARD);

$country_code = geoip_country_code_by_addr($gi, $_SERVER[’REMOTE_ADDR’]);
$country_name = geoip_country_name_by_addr($gi, $_SERVER[’REMOTE_ADDR’]);


switch ($country_code){
case "":
echo $country_name;


Our setup:
MODx version 1.0.3
Version codename rev 6653
phpInfo() View
Access permissions Enabled
Server Time 12:46:32
Local Time 12:46:32
Server offset 0 h
Database name domain_com_modx
Database server
Database Version 5.0.92-community-log
Database Charset latin1
Database Collation Charset latin1_swedish_ci
Table prefix modx_
MODX_BASE_PATH /home/public_html/
MODX_MANAGER_PATH /home/public_html/manager/

]]> Sat, 07 Dec 2013 12:03:36 +0000

It’s a module for Joomla, but is this possible to make this for Modx?

Or is there an other excisting module for modx like this ons?]]> Tue, 17 Sep 2013 03:21:25 +0000
<![CDATA[Vanilla 2 Integration]]>
1. Requires Vanilla 2 (at this point 2.0.3 is the latest). This must be on the same domain as your MODx site, since Vanilla has to be able to see the MODx cookie. (you can determine if this will work by putting a line in the main Vanilla index.php file

this must show the cookie for MODx; you can check the cookie name against the $site_sessionname in the MODx file)

2. Install the SSO ProxyConnect plugin, enable it, activate the ProxyConnect method and fill out the configuration fields (which consist of the URLs to the various MODx pages you want to use and the cookie domain, which probably will be OK with the default). Log out of Vanilla.

3. Create a snippet with the following code:
if(isset($_SESSION['webInternalKey'])) {
$output = "UniqueID=" . $_SESSION['webInternalKey'] . "\n\n";
$output .= "Name=" . $_SESSION['webShortname'] . "\n\n";
$output .= "Email=" . $_SESSION['webEmail'] . "\n\n";
return $output;

4. Create a resource with no template, in fact nothing set except published, and the above snippet tags as its content. Basically, what you need is a page that does absolutely nothing but output those three values.

5. Create a plugin using the OnWebLogout system event with the following code:
$e = &$modx->Event;

switch($e->name) {
    case 'OnWebLogout': // integrated logout
            setcookie('Vanilla', ' ', time() - 3600, '/', '');

Now you log in to MODx, and when you go to Vanilla you’ll get a popup asking if you want to create a new Vanilla account or sync with an existing Vanilla account (mostly useful for syncing to the existing admin account). Once that’s done, the user is now established. Log in, log out and register in MODx, and you’re automatically logged in to Vanilla when you’re logged in to MODx.

]]> Wed, 31 Jul 2013 11:42:38 +0000
<![CDATA[test solr123]]> Thu, 30 May 2013 01:49:43 +0000 <![CDATA[IP2Location Lite and Zip Code]]>
I am new here. Just spending a day trying to get IP-Geo location solution with Zip Code unfortunately I couldn't find any. I came accross Geolite Country from MaxMind but they didn't have Zip Code. Just wondering if there are any working solution with IP2Location Lite available for MODx.

Thanks.]]> Wed, 29 May 2013 03:07:29 +0000