Интегриране на допълнителни полета от phpbb3 в писан сайт

gotiniq9084

Registered
Искам да попитам някой знае ли как се интегрират допълнителните полета от phpbb3 в писан саит? например да земем полето skype ot phpbb3 и как да мога да го интегрирам в сайт?
 
PHP:
$profile_fields = array();
if($config['load_cpf_viewprofile'])
{
    include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
    $cp = new custom_profile();
    $profile_fields = $cp->generate_profile_fields_template('grab', $user->data['user_id']);
    $profile_fields = (isset($profile_fields[$user->data['user_id']])) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user->data['user_id']]) : array();
}

print_r($profile_fields);
 
Какво не става?

Ето ти готова цела страница.

PHP:
<?php

define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
global $auth, $ranks, $cache, $config, $user, $db, $phpbb_root_path, $phpEx, $template;

$user->session_begin();
$auth->acl($user->data);
$user->setup();

$profile_fields = array();
if($config['load_cpf_viewprofile'])
{
    include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
    $cp = new custom_profile();
    $profile_fields = $cp->generate_profile_fields_template('grab', $user->data['user_id']);
    $profile_fields = (isset($profile_fields[$user->data['user_id']])) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user->data['user_id']]) : array();
}

print_r($profile_fields);

?>
 
Еми да това сложих и страницата я няма тоест приемай го сеедно, че ми показва бял прозорец без нищо.
 
Дa ето

PHP:
<?php



define('IN_PHPBB', true);

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum';

$phpEx = substr(strrchr(__FILE__, '.'), 1);

include($phpbb_root_path . 'common.' . $phpEx);

include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

global $auth, $ranks, $cache, $config, $user, $db, $phpbb_root_path, $phpEx, $template;



$user->session_begin();

$auth->acl($user->data);

$user->setup();
 
Опитай така

PHP:
<?php

ini_set('display_errors', true);
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
global $auth, $ranks, $cache, $config, $user, $db, $phpbb_root_path, $phpEx, $template;

$user->session_begin();
$auth->acl($user->data);
$user->setup();

$profile_fields = array();
if($config['load_cpf_viewprofile'])
{
    include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
    $cp = new custom_profile();
    $profile_fields = $cp->generate_profile_fields_template('grab', $user->data['user_id']);
    $profile_fields = (isset($profile_fields[$user->data['user_id']])) ? $cp->generate_profile_fields_template('show', false, $profile_fields[$user->data['user_id']]) : array();
}

print_r($profile_fields);

?>
 
Изписва ми


Код:
[phpBB Debug] PHP Notice: in file /home/help-cs.info/help-cs.info/user/profile.php on line 3: ini_set() has been disabled for security reasons

значи има проблем с още първия ред

PHP:
ini_set('display_errors', true);
 
Пич нещо майче проблемат е от мен. Проблемат идва от кода:

PHP:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>

Това е проблем, защото аз вече използвам сигорно кода, който се пренасочват потребителите ето така например (http://site/user.php?username=gotiniq9084) ето така значи ми е кода за пренасочването на потребителските имена:

PHP:
$username = $_GET['username'];
$query = mysql_query("SELECT * FROM `phpbb_users` WHERE username= '$username'") or die(mysql_error());

А майче ако ги имам 2-вата кода заедно няма да се получи. Това с допълнителните полета.
 
Нема да стане така, ако искаш дай целия код, аз ще ти го прехвърлим в phpbb.
 
ок значи направих си 1-ин php файл:

profileopt.php

PHP:
<?php include "../ban/ban.php"; ?>


<?php
$queryString = strtolower($_SERVER['QUERY_STRING']); 

if (strstr($queryString,"<") OR strstr($queryString,">") OR strstr($queryString,"(") OR strstr($queryString,")") OR 
strstr($queryString,"..") OR 
strstr($queryString,"%") OR 
strstr($queryString,"*") OR 
strstr($queryString,"+") OR 
strstr($queryString,";") OR
strstr($queryString,"!") OR 
strstr($queryString,"'")) { 
$loc = $_SERVER['PHP_SELF']; 
$ip = $_SERVER['REMOTE_ADDR']; 
$date = date ("d-m-Y @ h:i:s"); 
$lfh = "log.php"; 
$log = fopen ( $lfh,"a+" ); 
fputs ($log, "Attack Date: $date | Attacker IP: $ip | QueryString: $loc?=$queryString\n<br>"); 
fclose($log); 
$userat = $_SESSION['username'];
$bannedby = 'SYSTEM';
$date = date("j.n.Y/G:i");
$reason = "Опит за хакване на играта";
$query = mysql_query("INSERT INTO `ban` (name, ip, bannedby, bandate, reason) VALUES('$userat','$ip','$bannedby','$date','$reason')");
echo "<center> <img src='http://picbg.net/u/53010/36874/534135.gif'><br /><br />
<embed src='http://help-cs.info/music/Audio.wma' width='70%' height='7%'></embed></center>"; 
exit;
} 
?>

			
			
			
<?php
include "config.php";

mysql_query("SET CHARACTER SET cp1251");
$username = $_GET['username'];
$query = mysql_query("SELECT * FROM `phpbb_users` WHERE username= '$username'") or die(mysql_error());

while($row = mysql_fetch_array($query)){
$username = $row['username'];
$avatar = $row['user_avatar'];
$post_id = $row['session_user_id'];
$warnings = $row['user_warnings'];
$user_posts = $row['user_posts'];

$rank = $row['user_rank'];
$rank = str_replace("12", "<img src='http://help-cs.info/forum/images/ranks/potrebitel.png' border='0'>", "$rank");
$rank = str_replace("11", "<img src='http://help-cs.info/forum/images/ranks/moderetor.png' border='0'>", "$rank");
$rank = str_replace("10", "<img src='http://help-cs.info/forum/images/ranks/ekip_zaqvki.png' border='0'>", "$rank");
$rank = str_replace("9", "<img src='http://help-cs.info/forum/images/ranks/banned.png' border='0'>", "$rank");
$rank = str_replace("8", "<img src='http://help-cs.info/forum/images/ranks/administrator.png' border='0'>", "$rank");
$rank = str_replace("13", "<img src='http://help-cs.info/forum/images/ranks/vip.png' border='0'>", "$rank");


$web = $row['user_website'];
if ($web == '')
{
$siteno = "<br /><br /> Уеб сайт: Няма";
}
else
{
$site = "<br /><br /> Уеб сайт: <a href='$web'><font color='blue'>$web</font></a>";
}


echo" 
<tr><td><center>
Аватар <br /><hr width='20%' /><br />
<img src='$avatar' width='40%' height='60%'><br /><br /> $rank </center>
</td><td width='50%'><br />
Потребител: <b>$username</b>
<br />
Мнения: $user_posts
<br />
<font color='red'>Предопреждения</font>: <b>$warnings</b>
<br />



$site $siteno
";
}

?>

</table>
 

Back
Горе