Fijn dat ik een site heb gevonden waar ik hulp kan krijgen bij het integreren van een script naar mijn website.
Ik wil graag "arrowchat" op mijn website laten functioneren. Arrowchat is een script net als Facebook chat wat je rechtsonder ook hebt op Facebook.
Installeren is mij gelukt maar het integreren is niet gelukt omdat het een eigen gemaakt php website is. Dus ik moet het zelf aanpassen zie hieronder:
Vriendelijke groet,
Ik wil graag "arrowchat" op mijn website laten functioneren. Arrowchat is een script net als Facebook chat wat je rechtsonder ook hebt op Facebook.
Installeren is mij gelukt maar het integreren is niet gelukt omdat het een eigen gemaakt php website is. Dus ik moet het zelf aanpassen zie hieronder:
Dit is van mijn website Function_user.php :<?php
session_start();
/*
|| #################################################################### ||
|| # ArrowChat # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2010-2012 ArrowSuites LLC. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.arrowchat.com | http://www.arrowchat.com/license/ # ||
|| #################################################################### ||
*/
// UNCOMMENT THE SESSION START IF YOU ARE USING SESSIONS TO GET THE USER ID
// session_start();
/**
* This function returns the user ID of the logged in user on your site. Technical support will not
* help you with this for stand-alone installations. You must purchase the professional installation
* if you are having trouble.
*
* Suggestion: Check out the other integration files in the functions/integrations directory for
* many examples of how this can be done. The easiest way is to get the user ID through a cookie.
*
* @return the user ID of the logged in user or NULL if not logged in
*/
function get_user_id()
{
$userid = NULL;
if (isset($_SESSION['UID']) )
{
$userid = $_SESSION['UID'];
}
return $userid;
}
Als er iemand is die het kan doen wil ik er zelfs best voor betalen.<?php
defined('_VALID') or die('Restricted Access!');
require_once ($config['BASE_DIR']. '/include/function_thumbs.php');
function getUserQuery()
{
$options = array('username' => NULL, 'module' => NULL, 'query' => NULL);
if ( isset($_SESSION['uid']) && isset($_SESSION['username']) ) {
if ( $_SESSION['uid'] != '' && $_SESSION['username'] != '' ) {
$options['username'] = $_SESSION['username'];
}
}
$request = ( isset($_SERVER['REQUEST_URI']) ) ? $_SERVER['REQUEST_URI'] : NULL;
$request = ( isset($_SERVER['QUERY_STRING']) ) ? str_replace('?' .$_SERVER['QUERY_STRING'], '', $request) : $request;
$query = explode('/', $request);
foreach ( $query as $key => $value ) {
if ( $value == 'user' ) {
$query = array_slice($query, $key+1);
}
}
if ( isset($query['0']) && $query['0'] != '' ) {
$module = $query['0'];
$modules_allowed = array(
'edit' => 1,
'avatar' => 1,
'prefs' => 1,
'blocks' => 1,
'delete' => 1
);
if ( isset($modules_allowed[$module]) ) {
$options['module'] = $module;
} else {
$options['username'] = $module;
$options['query'] = array_slice($query, 1);
}
}
return $options;
}
Vriendelijke groet,