Wordpress and Cyclos login integration

Functionality discussions and feature requests

Moderators: hugo, alexandre, rmvanarkel

Post Reply
darlington
Posts: 2
Joined: Fri Mar 23, 2012 12:17 pm

Wordpress and Cyclos login integration

Post by darlington »

Is there a way I can display a login fom on wordpress such that when a user logs in he is redirected to the Cyclos account. Please help, Thanks.

timreeves
Posts: 54
Joined: Fri Feb 12, 2010 8:30 am

Re: Wordpress and Cyclos login integration

Post by timreeves »

Well, i don't know about that, but why bother? Cyclos recognises if it is not running at its normal containerUrl (e.g. in an iframe) and suppresses the top banner, allowing you to integrate it as the content of a WordPress page, see http://marktplatz.rewig-muenchen.de/marktplatz/

You'll need code similar to this:

Code: Select all

<iframe
	id="cyclosframe"
	src="https://rewig-marktplatz-muenchen.cyclos-srv.net/rewigmuenchen/"
	width="672"
	height="2000"
	scrolling="auto"
	align="left"
	marginheight="0"
	marginwidth="0"
	frameborder="0">
The marketplace cannot be displayed because your browser does not support inline frames.
</iframe>
Hope this helps,

Cheers, Tim.

P.S. What I find would be cool and will probably be attempting is to create a WordPress Plugin as an alternative login facility which interrogates the Cyclos DB for login credentials rather than the normal WordPress database. This would for example allow Cyclos users to log on to WordPress and have write access to a discussion forum like bbPress.

locabon
Posts: 54
Joined: Wed Mar 25, 2009 9:24 am

Re: Wordpress and Cyclos login integration

Post by locabon »

1) install and activate wordpress plugin "per post scripts and styles" or any similar.
2) copy the file http://www.cyclos.org/cyclos_en/externalLogin.js to your js folder
3) place this string into Header Scripts field on your page: %SITE_URL%/wp-includes/js/externalLogin.js
4) place inside your page this:

Code: Select all

<script type="text/javascript" language="JavaScript">
    window.onload=includeCyclosLogin('loginContainer', http://your-wordpress-site-url)
</script>

<div id="loginContainer">
	<iframe src="http://your-cyclos-site-url/cyclos/do/externalLogin" style="width:300px;height:200px;border:none;">
	</iframe>
</div>
5) read more here at the bottom of the page: http://project.cyclos.org/wiki/index.ph ... omizations

Alex

Tim, I would like that as well but unfortunately it cannot be done becouse the password is hashed and is not retrivable from the Cyclos database. Admin, am I right about that?

jaime

Re: Wordpress and Cyclos login integration

Post by jaime »

nice integrations!congrats! :)

Post Reply