We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

autoLogin | Forum

MOHAMED YOUBA
MOHAMED YOUBA Nov 24 '12

I would like to integrate bar Talkbar cat on my site and I would like to restrict access to members of the chat site.

  He told me to follow the procedure below, but I do not know how. Thank you kindly help me


'' Enjoy The AutoLogin function () Talkbar of inserting the script below:

 

<script type="text/javascript" src="http://www.talkbar.eu/js/fr_FR/talkbar.js"></script>
<script type="text/javascript" >autoLogin('PSEUDO');</script>

 

Replace "NICKNAME" with the variable containing the username.


Please Help

Alia Team
Alia Nov 25 '12
Topic was moved from General Questions.
Michael I.
Michael I. Dec 7 '12
Mohamed, where should this code be added? Can you request more details so that we could provide you with more assistance.
Michael I.
Michael I. Jan 3 '13
Try using the following code:


function myplugin_on_finalize(){    if ( !OW::getUser()->isAuthenticated() )    {        return;    }
    $userName = OW::getUser()->getUserObject()->username;
    $script = UTIL_JsGenerator::newInstance()->setVariable(array('window', 'onlineUserName'), $userName);    OW::getDocument()->addOnloadScript($script);}OW::getEventManager()->bind(OW_EventManager::ON_FINALIZE, 'myplugin_on_finalize');


And the code can be added to the Admin Panel > Settings > Main Settings > Page Settings > Custom Head Code.

Michael I.
Michael I. Jan 4 '13
The code in my previous post would let you get the Username of a currently logged in member.
Dean L
Dean L Jan 9 '13
Hi Michael,

I added your code to the head of my website using your directions to try this out and the code appeared at the top of the website on the index page.
Michael I.
Michael I. Jan 10 '13
Dean, because the code I have provided should not be added to website via Admin Panel. This is the code that will give you username of the logged in user. Code that should be added via Admin Panel is the code of the topicstarter.
Niklas E
Niklas E Jan 7 '16
The problem with this forum is that people have solutions for everything but isn't telling where to put or showing other viewers the finally solution.
denis
denis Jan 7 '16
What can anybody help me ..?
I'm having problems in the delivery confirmation email I sent asking solution tikad