Dodatkowa funkcja w profilu użytkownika, extreme fusion


(Kio114) #1

Witam, mam pytanie: czy w pliku profile.php ( extreme fusion 4 ) da się zrobić taką dodatkową funkcję jak, wyświetlenie newsów, postów, artykułów itp. napisanych przez danego użytkownika?

Kod pliku profile.php

<?php

/*---------------------------------------------------+

| PHP-Fusion 6 Content Management System

+----------------------------------------------------+

| Copyright © 2002 - 2006 Nick Jones

| http://www.php-fusion.co.uk/

+----------------------------------------------------+

| Released under the terms & conditions of v2 of the

| GNU General Public License. For details refer to

| the included gpl.txt file or visit http://gnu.org

+----------------------------------------------------*/

require_once "maincore.php";

require_once "subheader.php";

require_once "side_left.php";

include LOCALE.LOCALESET."members-profile.php";

include LOCALE.LOCALESET."user_fields.php";



if (!isset($group_id)) {

	if (!isset($lookup) || !isNum($lookup)) fallback("index.php");

	$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$lookup'");

	if (dbrows($result)) { $data = dbarray($result); } else { redirect("index.php"); }

	opentable($locale['420']);

	echo "

|

| ".$data['user_name']." | ".getuserlevel($data['user_level'])." |

|
| \n"; echo genshadow($data['user_avatar'])." | ".$locale['u009']." | ".($data['user_location'] ? $data['user_location'] : $locale['u048'])." |
| ".$locale['u010']." | "; if ($data['user_birthdate'] != "0000-00-00") { $months = explode("|", $locale['months']); $user_birthdate = explode("-", $data['user_birthdate']); echo $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0']; } else { echo $locale['u048']; } echo " |
| ".$locale['u021']." | ".($data['user_aim'] ? $data['user_aim'] : $locale['u048'])." |
| ".$locale['u011']." | "; if ($data['user_icq']) { echo " online?icq=".$data[|
| ".$locale['u012']." | "; if ($data['user_msn']) { echo " status.asp?id=".$data[|
| \n"; if ($data['user_hide_email'] != "1" || iADMIN) { echo "[[".$locale['u051']."](mailto: "".str_replace("@","@",$data[")]\n"; } if ($data['user_web']) { $urlprefix = !strstr($data['user_web'], "http://") ? "http://" : ""; echo "[".$locale['u052']."]\n"; } if (!isset($userdata['user_id']) || $data['user_id'] != $userdata['user_id']) { echo "[".$locale['u053']."]\n"; } echo " | ".$locale['u013']." | "; if ($data['user_yahoo']) { echo " ?u=".$data[|
\n"; @include INFUSIONS.'extended_profile/includes/profile.php'; tablebreak(); echo "

| ".$locale['422']." |
| ".$locale['u040']." | ".showdate("longdate", $data['user_joined'])." |
| ".$locale['u044']." | ".($data['user_lastvisit'] != 0 ? showdate("longdate", $data['user_lastvisit']) : $locale['u049'])." |
| ".$locale['u041']." | ".number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'"))." |
| ".$locale['u054']." | ".number_format(dbcount("(news_id)", "news", "news_name='".$data['user_id']."'"))." |
| ".$locale['u055']." | ".number_format(dbcount("(article_id)", "articles", "article_name='".$data['user_id']."'"))." |
| ".$locale['u042']." | ".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))." |
| ".$locale['u043']." | ".number_format($data['user_posts'])." |
| ".$locale['EP_IP']." | ".$data['user_ip']." |
| ".$locale['560']." | ".check_rang($lookup)." |
| ".$locale['561']." | ".show_points($lookup)." |

\n"; if ($data['user_groups']) { tablebreak(); echo "

| ".$locale['423']." |
| \n"; $user_groups = (strpos($data['user_groups'], ".") == 0 ? explode(".", substr($data['user_groups'], 1)) : explode(".", $data['user_groups'])); for ($i = 0;$i count($user_groups);$i++) { echo "".getgroupname($user_groups[$i]).""; if ($i != (count($user_groups)-1)) { echo ",\n"; } else { echo "\n"; } } echo " |

\n"; } } else { if (!isNum($group_id)) fallback("index.php"); $result = dbquery("SELECT * FROM ".$db_prefix."user_groups WHERE group_id='$group_id'"); if (dbrows($result)) { $data = dbarray($result); $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_groups REGEXP('^\.{$group_id}$|\.{$group_id}\.|\.{$group_id}$') ORDER BY user_level DESC, user_name"); opentable($locale['410']); echo "

| ".$data['group_name']." (".sprintf((dbrows($result)==1?$locale['411']:$locale['412']), dbrows($result)).") |
| ".$locale['401']." | ".$locale['402']." |
| \n[".$data['user_name']."](profile.php?lookup=) | ".getuserlevel($data['user_level'])." |

\n"; } else { fallback(BASEDIR."index.php"); } } closetable(); if (isset($lookup) isNum($lookup)) { if (file_exists(INFUSIONS."cautions/locale/".$settings['locale'].".php")) { include INFUSIONS."cautions/locale/".$settings['locale'].".php"; } else { include INFUSIONS."cautions/locale/Polish.php"; } tablebreak(); opentable($locale['C_000']); $caution_r = dbquery("SELECT * from ".$db_prefix."cautions WHERE user_id=".$_GET['lookup']); $c_count = mysql_numrows($caution_r); echo "

| ".$locale['C_014']." | \n";

echo $c_count." |
| ".$locale['C_021']." ".$author['user_prefix'].$author['user_name']; { echo" [".$locale['C_015']." | ".$locale['C_016']." ] "; } echo" | \n"; echo "".$caution['why']." |

"; closetable(); require_once INFUSIONS."fusion_forum_view/fusion_forum_view.php"; } include INCLUDES."comments_include.php"; showcomments("U","users","user_id",$lookup,FUSION_SELF."?lookup=$lookup"); require_once "side_right.php"; require_once "footer.php"; ?[/code]


(Splocki) #2

Zerknij tu, co prawda jest to mod do PHP-Fusion 6.01, ale powinien działać

http://mods.php-fusion.pl/downloads.php ... oad_id=939

tak wygląda profil po zainstalowaniu.


(Kio114) #3

Wiem znam ten mod lecz nie chce go instalować :frowning: chciałbym tylko to z tymi newsami, postami, artykułami itp. pod profilem, nie chciałbym zmieniać całego wyglądu profilu. Da się może jakoś wyciągnąć ten kod z tymi newsami? tak abym mógł go wkleić do profile.php i by było ;p