cotonti.com : Cotonti Connect? https://www.cotonti.com Последние сообщения в теме Cotonti en Tue, 14 Oct 2025 21:14:47 -0000 zboy812 So awesome! I will try it tonight and get back you, this is a life saver for what im make. Thanks a lot!

Added 6 days later:

Its working awesome!

]]>
ср, 22 июн 2011 22:40:51 -0000
GHengeveld Sure, try this:

<?php
define('COT_CODE', TRUE);
require_once './datas/config.php';
require_once $cfg['system_dir'] . '/functions.php';
require_once $cfg['system_dir'] . '/common.php';
?>
<html>
<?=$usr['name']?>
</html>

Common.php is where the magic happens. It handles user authentication so you stay logged in.

Actually, this is the way modules work. They have their own file in the root and use this code to load the framework. However in order for it to show up as a module it needs it's own folder in /modules and a setup file.

]]>
вт, 21 июн 2011 00:37:37 -0000
zboy812 I want to use a PHP page outside of Cotonti. But i want to get user details from cotonti!

here is my page.php:

<html>

<? include 'cotonti_connect.php'; //is it possible? ?>

<? echo '$user_name'; ?>

</html>

Is this possible? How can i keep the user logged in on my external page?

The reason is, i want to use sed_light for website, but i dont want to use xtemplate for external program.

Thank you for your assitance!!!

 

]]>
пн, 20 июн 2011 17:17:56 -0000