Third-party integrations - MODX Community Forums https://forums.modx.com/board/?board=98 <![CDATA[Stopforumspam]]> https://forums.modx.com/thread/103934/stopforumspam#dis-post-558985 https://forums.modx.com/thread/103934/stopforumspam#dis-post-558985 Fri, 08 Jun 2018 01:01:56 +0000 https://forums.modx.com/thread/103934/stopforumspam#dis-post-558985 <![CDATA[Mailchimp for MODX]]> https://forums.modx.com/thread/103919/mailchimp-for-modx#dis-post-558919
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="[[+fi.email]]" 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:

[[!FormIt?
&hooks=`MailChimpSubscribe,spam,redirect`
&submitVar=`go`
&validationErrorMessage=`something wrong`
&mailchimpListId=`a1c189980c`
&redirectTo=`189`
&validate=`
email:email:required,
newsgroup:required`
]]


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?

Regards


Ludo
]]>
https://forums.modx.com/thread/103919/mailchimp-for-modx#dis-post-558919 Tue, 05 Jun 2018 09:20:53 +0000 https://forums.modx.com/thread/103919/mailchimp-for-modx#dis-post-558919
<![CDATA[disabled field in manager]]> https://forums.modx.com/thread/103039/disabled-field-in-manager#dis-post-554880
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]]>
https://forums.modx.com/thread/103039/disabled-field-in-manager#dis-post-554880 Tue, 31 Oct 2017 02:00:11 +0000 https://forums.modx.com/thread/103039/disabled-field-in-manager#dis-post-554880
<![CDATA[SalesForce integration with MODx?]]> https://forums.modx.com/thread/49002/salesforce-integration-with-modx?page=3#dis-post-554574 https://forums.modx.com/thread/49002/salesforce-integration-with-modx?page=3#dis-post-554574 Tue, 17 Oct 2017 07:15:05 +0000 https://forums.modx.com/thread/49002/salesforce-integration-with-modx?page=3#dis-post-554574 <![CDATA[Mailchimp issue after new revo installation]]> https://forums.modx.com/thread/101427/mailchimp-issue-after-new-revo-installation#dis-post-550068
modmailchimp/elements/snippets/snippet.modMailchimp.php : 327) PHP warning: Illegal string offset 'tag'

Great for some feedback.

thank you

rickard]]>
https://forums.modx.com/thread/101427/mailchimp-issue-after-new-revo-installation#dis-post-550068 Wed, 12 Apr 2017 03:22:52 +0000 https://forums.modx.com/thread/101427/mailchimp-issue-after-new-revo-installation#dis-post-550068
<![CDATA[Facebook_Feed help?]]> https://forums.modx.com/thread/101723/facebook-feed-help#dis-post-549750
Has anyone got this Extra to work?
https://modx.com/extras/package/facebookfeed1

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]]>
https://forums.modx.com/thread/101723/facebook-feed-help#dis-post-549750 Wed, 29 Mar 2017 11:38:57 +0000 https://forums.modx.com/thread/101723/facebook-feed-help#dis-post-549750
<![CDATA[Using phpBB forum sessions with MODX Revo 2.2+]]> https://forums.modx.com/thread/86424/using-phpbb-forum-sessions-with-modx-revo-2-2#dis-post-547230
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. http://forums.modx.com/forums/thread/48916/phpbb-and-modx-integration) 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 : www.example.com/forum/

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

<?php
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
        $user->session_begin();
		// Setup the auth/permissions for this user
		$auth->acl($user->data);
		// 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 :

<?php
$pbbuser = new MyPhpBBsession ();
$myusername=$pbbuser->getusername();

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

$modx->setPlaceholder('loginout_title',$my_user_title);
$modx->setPlaceholder('loginout_url',$my_user_link);
$modx->setPlaceholder('mydata_url',$my_link_add);
$modx->setPlaceholder('myprivate_content',$my_private);

//$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]]';

$modx->setPlaceholder('loginout_title',$my_user_title);
$modx->setPlaceholder('loginout_url',$my_user_link);
$modx->setPlaceholder('mydata_url',$my_link_add);
$modx->setPlaceholder('myprivate_content',$my_private);

	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 :
[[!sessionphpBB]]
[[$template_header]]

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

[[$navbar_page]] 
<div class="main-container">
[[$intro]] 	
[[*content]]
[[$myfooter]]
</div><!-- end main-container -->  		
[[$template_footer]]


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 :
<li>[[$userloginout]]</li>


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>
			
			<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>
				</form>
				<a href="/forum/ucp.php?mode=sendpassword"class="btn"><em>* I forgot my password</em></a>
			</div>
			
			<div class="modal-footer">
				
				Not registered yet ?   
				<a href="[[++site_url]]forum/ucp.php?mode=register" class="btn btn-purple">Sign Up !</a>
				
			</div>
		</div>


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]]>
https://forums.modx.com/thread/86424/using-phpbb-forum-sessions-with-modx-revo-2-2#dis-post-547230 Mon, 12 Dec 2016 04:02:19 +0000 https://forums.modx.com/thread/86424/using-phpbb-forum-sessions-with-modx-revo-2-2#dis-post-547230
<![CDATA[MODX/SMF User Integration]]> https://forums.modx.com/thread/98545/modx-smf-user-integration#dis-post-532930

  • 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
]]>
https://forums.modx.com/thread/98545/modx-smf-user-integration#dis-post-532930 Thu, 08 Oct 2015 09:05:39 +0000 https://forums.modx.com/thread/98545/modx-smf-user-integration#dis-post-532930
<![CDATA[Is there a working SMF bridge solution for Revolution?]]> https://forums.modx.com/thread/76057/is-there-a-working-smf-bridge-solution-for-revolution#dis-post-532815
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?]]>
https://forums.modx.com/thread/76057/is-there-a-working-smf-bridge-solution-for-revolution#dis-post-532815 Tue, 06 Oct 2015 09:11:39 +0000 https://forums.modx.com/thread/76057/is-there-a-working-smf-bridge-solution-for-revolution#dis-post-532815
<![CDATA[Integration of Question2Answer into MODX]]> https://forums.modx.com/thread/87628/integration-of-question2answer-into-modx#dis-post-520682 The instructions presented by Q2A are not specified for MODX and therefore incomplete.

Thank you for your support and dedication.
Sandra]]>
https://forums.modx.com/thread/87628/integration-of-question2answer-into-modx#dis-post-520682 Sun, 15 Feb 2015 10:46:49 +0000 https://forums.modx.com/thread/87628/integration-of-question2answer-into-modx#dis-post-520682
<![CDATA[Could not load DBAPI class error in WordPress after updating to Evo 1.0.15]]> https://forums.modx.com/thread/95940/could-not-load-dbapi-class-error-in-wordpress-after-updating-to-evo-1-0-15#dis-post-519553
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'] = 'mysql.xxx.com';
$GLOBALS['database_user'] = 'xxx';
$GLOBALS['database_password'] = 'xxx';
$GLOBALS['dbase'] = 'xxx_modx';
$GLOBALS['table_prefix'] = 'modx_';
$GLOBALS['base_url'] = 'http://www.xxx.com/';
$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
include_once($GLOBALS['base_path'].'manager/includes/document.parser.class.inc.php');
$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->getSettings();
$modx->documentMethod = 'id';
$modx->documentIdentifier = 8; // modx page ID that links to wordpress
]]>
https://forums.modx.com/thread/95940/could-not-load-dbapi-class-error-in-wordpress-after-updating-to-evo-1-0-15#dis-post-519553 Fri, 30 Jan 2015 08:42:13 +0000 https://forums.modx.com/thread/95940/could-not-load-dbapi-class-error-in-wordpress-after-updating-to-evo-1-0-15#dis-post-519553
<![CDATA[Call to a member function get() on a non-object]]> https://forums.modx.com/thread/94509/call-to-a-member-function-get-on-a-non-object#dis-post-511920
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:

$modx->lexicon->load('import');


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 ?]]>
https://forums.modx.com/thread/94509/call-to-a-member-function-get-on-a-non-object#dis-post-511920 Sat, 04 Oct 2014 03:14:10 +0000 https://forums.modx.com/thread/94509/call-to-a-member-function-get-on-a-non-object#dis-post-511920
<![CDATA[modxActiveDirectory]]> https://forums.modx.com/thread/91792/modxactivedirectory#dis-post-501534
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!]]>
https://forums.modx.com/thread/91792/modxactivedirectory#dis-post-501534 Thu, 26 Jun 2014 09:15:33 +0000 https://forums.modx.com/thread/91792/modxactivedirectory#dis-post-501534
<![CDATA[Modifying usergroups: Call to a member function getObject() on a non-object]]> https://forums.modx.com/thread/91606/modifying-usergroups-call-to-a-member-function-getobject-on-a-non-object#dis-post-500968
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
purchase.php
<?php
// 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->initialize('mgr');
$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?]]>
https://forums.modx.com/thread/91606/modifying-usergroups-call-to-a-member-function-getobject-on-a-non-object#dis-post-500968 Thu, 19 Jun 2014 10:41:00 +0000 https://forums.modx.com/thread/91606/modifying-usergroups-call-to-a-member-function-getobject-on-a-non-object#dis-post-500968
<![CDATA[Adding a 3rd party component into Manager]]> https://forums.modx.com/thread/89395/adding-a-3rd-party-component-into-manager#dis-post-494111 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.]]>
https://forums.modx.com/thread/89395/adding-a-3rd-party-component-into-manager#dis-post-494111 Tue, 01 Apr 2014 11:17:40 +0000 https://forums.modx.com/thread/89395/adding-a-3rd-party-component-into-manager#dis-post-494111
<![CDATA[GeoLite Country]]> https://forums.modx.com/thread/49009/geolite-country#dis-post-484855
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/document.parser.class.inc.php(770) : 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.


REFERENCES:
========

Snippet is:
<?php

require_once("http://www.domain.com/geoip.inc");

$gi = geoip_open("http://www.domain.com/GeoIP.dat",GEOIP_STANDARD);

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

geoip_close($gi);

switch ($country_code){
case "":
?>UNKONWN !!!
<?php;
break;
default:
echo $country_name;
break;
}

?>


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 127.0.0.1
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_BASE_URL /
MODX_MANAGER_URL http://www.domain.com/manager/
MODX_MANAGER_PATH /home/public_html/manager/
MODX_SITE_URL http://www.domain.com/


]]>
https://forums.modx.com/thread/49009/geolite-country#dis-post-484855 Sat, 07 Dec 2013 12:03:36 +0000 https://forums.modx.com/thread/49009/geolite-country#dis-post-484855
<![CDATA[page-flip-tools]]> https://forums.modx.com/thread/48943/page-flip-tools#dis-post-477978 http://page-flip-tools.com/Buy-Now/

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?]]>
https://forums.modx.com/thread/48943/page-flip-tools#dis-post-477978 Tue, 17 Sep 2013 03:21:25 +0000 https://forums.modx.com/thread/48943/page-flip-tools#dis-post-477978
<![CDATA[Vanilla 2 Integration]]> https://forums.modx.com/thread/48998/vanilla-2-integration?page=7#dis-post-473603
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
print_r($_COOKIE)

this must show the cookie for MODx; you can check the cookie name against the $site_sessionname in the MODx config.inc.php 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:
<?php
if(isset($_SESSION['webInternalKey'])) {
$output = "UniqueID=" . $_SESSION['webInternalKey'] . "\n\n";
$output .= "Name=" . $_SESSION['webShortname'] . "\n\n";
$output .= "Email=" . $_SESSION['webEmail'] . "\n\n";
return $output;
}
return;
?>


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, '/', '.domain.com');
            unset($_COOKIE['Vanilla']);
    break;
}


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.



]]>
https://forums.modx.com/thread/48998/vanilla-2-integration?page=7#dis-post-473603 Wed, 31 Jul 2013 11:42:38 +0000 https://forums.modx.com/thread/48998/vanilla-2-integration?page=7#dis-post-473603
<![CDATA[test solr123]]> https://forums.modx.com/thread/84784/test-solr123#dis-post-467654 https://forums.modx.com/thread/84784/test-solr123#dis-post-467654 Thu, 30 May 2013 01:49:43 +0000 https://forums.modx.com/thread/84784/test-solr123#dis-post-467654 <![CDATA[IP2Location Lite and Zip Code]]> https://forums.modx.com/thread/84764/ip2location-lite-and-zip-code#dis-post-467455
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.]]>
https://forums.modx.com/thread/84764/ip2location-lite-and-zip-code#dis-post-467455 Wed, 29 May 2013 03:07:29 +0000 https://forums.modx.com/thread/84764/ip2location-lite-and-zip-code#dis-post-467455