Gdzie umieścić kod z pdwarning_v103 po instalacji innych modułów?
|
morawcik |
Dodany dnia 05.08.2007 11:41:19
|
Przedszkolak
Postów: 2
Data rejestracji: 05.08.2007 11:35
|
Próbuję zainstalować pdwarning_v103 do PHP-fusion 6.01-10 ale mam problem. Nie wiem gdzie mam wkleić:
<td width='1%' class='tbl2' style='white-space:nowrap'><b>".$locale['PDWA200']."</b></td>";
$user_points = show_warning_points($data[user_id]);
echo "<td class='tbl2'>
<a href='".INFUSIONS."pd_warning/warning.php?lookup=".$data[user_id]."' title='".$user_points." ".($user_points==1 ? "Punkt" : "Punkte")."'>".show_warning_symbols(show_warning_points($data[user_id]))."</a></td>
</tr>
Ma się to znaleźć miedzy : </tr> a </table>\n";
w tym kodzie:
<tr>
<td width='1%' class='tbl1' style='white-space:nowrap'><b>".$locale['u043']."</b></td>
<td class='tbl1'>".number_format($data['user_posts'])."</td>
</tr>
</table>\n";
I tu jest problem. Zainstalowałem między innymi profile mod v2 i nie ma tego kawałka kodu co potrzeba. Gdzie to mam wkleić?
To mój plik 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
+----------------------------------------------------*/
/*---------------------------------------------------+
| Profile Page MOD for PHP-Fusion v6
+----------------------------------------------------+
| author: Fuzed Themes - Riadi © 2006-2007
| web: http://phpfusion-themes.com/
+----------------------------------------------------+
| Released under the terms and conditions of
| the GNU General Public License (Version 2)
+----------------------------------------------------*/
/* Profile Page settings */
// turn on or off the listing of forum threads, forum posts, news items and articles.
// set to true for on, false for off.
$profile_display['forum_threads'] = true;
$profile_display['forum_posts'] = true;
$profile_display['news_items'] = true;
$profile_display['articles'] = true;
// set the number of results being displayed for all listings in the normal profile view.
$profile_sql['normal_limit'] = 2;
// set the number of results being displayed in the listing view.
$profile_sql['list_limit'] = 20;
// set the maximum number of query results for the listing view.
$profile_sql['list_max_history'] = 200;
// set the width for the profile table.
$profile_width = 600;
// do you want to include side_right.php
$profile_include_sideright = true;
// color value for the named user levels.. Super Administartor, Administrator and Member.
$rank_color['103'] = "#CC0000";
$rank_color['102'] = "#006600";
$rank_color['101'] = "#3333CC";
// no need to edit below this line..
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";
//include pd_warning functions
include INFUSIONS."pd_warning/warning.inc.php";
if (file_exists(LOCALE.LOCALESET."members-profile-mod.php")) {
include LOCALE.LOCALESET."members-profile-mod.php";
} else {
include LOCALE."English/members-profile-mod.php";
}
if (isset($_GET['lookup']) && isNum($_GET['lookup'])) define('lookup', $_GET['lookup']);
if (isset($_GET['group_id']) && isNum($_GET['group_id'])) define('group_id', $_GET['group_id']);
if (defined('lookup') && !defined('group_id')) {
$list_types = array();
foreach ($profile_display as $key => $value)
{
if ($value) array_push($list_types, $key);
}
// checking to see if we should use a list type layout or the normal profile layout
if (isset($_GET['list'])) {
if (!in_array($_GET['list'], $list_types)) fallback(FUSION_SELF."?lookup=".lookup);
define('currentlist', $_GET['list']);
} else {
define('currentlist', 'profile');
}
$result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='".lookup."'");
if (dbrows($result) == 1) {
/* start: profile page generation when the $_GET['lookup'] is found in the users db table. */
$data = dbarray($result);
$button_width = 100;
opentable($locale['420']);
echo "<br>\n<table align='center' cellpadding='0' cellspacing='0' width='".$profile_width."'>\n<tr>\n<td>\n";
$profile = "<table cellpadding='0' cellspacing='1' class='tbl-border' width='100%'>\n<tr>\n";
# start of first cell
$profile .= "<td align='center' class='tbl1' valign='top'>\n";
// adding user avatar if exists
if ($data['user_avatar'] && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
if ($size = @getimagesize(IMAGES."avatars/".$data['user_avatar'])) { if ($size[0] > $button_width && currentlist == 'profile') $button_width = $size[0]; }
$profile .= "<img alt='' src='".IMAGES."avatars/".$data['user_avatar']."'>";
if (currentlist == 'profile') $profile .= "<hr>\n";
} elseif (currentlist != 'profile') $profile .= "<div style='width:".$button_width."px'></div>\n";
$button_style = "style='margin-bottom:1px;width:".$button_width."px'";
$added = false;
$buttons_buffer = "";
// user email button
if ($data['user_hide_email'] != 1 || iADMIN) {
$added = true;
$inherit = str_replace("@","@",$data['user_email']);
$buttons_buffer .= "<input class='button' type='button' onclick=\"window.location = 'mailto:".$inherit."';\" ".$button_style." title='".$inherit."' value='".$locale['u051']."'>";
$buttons_buffer .= (currentlist == 'profile' ? "<br>" : " ")."\n";
}
// user website button
if ($data['user_web']) {
$added = true;
$inherit = (!strstr($data['user_web'], "http://") ? "http://" : "").$data['user_web'];
$buttons_buffer .= "<input class='button' onclick=\"window.open('".$inherit."');\" ".$button_style." title='".$inherit."' type='button' value='".$locale['u052']."'>";
$buttons_buffer .= (currentlist == 'profile' ? "<br>" : " ")."\n";
}
// user pm button
if (!isset($userdata['user_id']) || $data['user_id'] != $userdata['user_id']) {
$added = true;
$inherit = "messages.php?msg_send=".$data['user_id'];
$buttons_buffer .= "<input class='button' onclick=\"window.location = '".$inherit."';\" ".$button_style." title='".$locale['u060']."' type='button' value='".$locale['u053']."'>";
$buttons_buffer .= (currentlist == 'profile' ? "<br>" : " ")."\n";
}
// making the aim, icq, msn, yahoo buttons only available in the normal profile lookup.
if (currentlist == 'profile') {
if ($data['user_aim'] || $data['user_icq'] || $data['user_msn'] || $data['user_yahoo']) {
if ($added) $buttons_buffer .= "<hr>\n";
$added = false;
// user aim button
if ($data['user_aim']) {
$added = true;
$buttons_buffer .= "<input class='button' onclick=\"alert('".$data['user_aim']."');\" ".$button_style." title='".$data['user_aim']."' type='button' value='".$locale['pm100']."'><br>\n";
}
// user icq button
if ($data['user_icq']) {
$added = true;
$buttons_buffer .= "<input class='button' onclick=\"alert('".$data['user_icq']."');\" ".$button_style." title='".$data['user_icq']."' type='button' value='".$locale['pm101']."'><br>\n";
}
// user msn button
if ($data['user_msn']) {
$added = true;
$buttons_buffer .= "<input class='button' onclick=\"alert('".$data['user_msn']."');\" ".$button_style." title='".$data['user_msn']."' type='button' value='".$locale['pm102']."'><br>\n";
}
// user yahoo button
if ($data['user_yahoo']) {
$added = true;
$buttons_buffer .= "<input class='button' onclick=\"alert('".$data['user_yahoo']."');\" ".$button_style." title='".$data['user_yahoo']."' type='button' value='".$locale['pm103']."'><br>\n";
}
}
}
// user ip button
if (iSUPERADMIN) {
if ($added && currentlist == 'profile') $buttons_buffer .= "<hr>\n";
$buttons_buffer .= "<input class='button' onclick=\"alert('".$data['user_ip']."');\" ".$button_style." title='".$data['user_ip']."' type='button' value='".$locale['pm104']."'>";
$buttons_buffer .= (currentlist == 'profile' ? "<br>" : " ")."\n";
}
// add the buttons to the profile variable here in the normal profile lookup
if (currentlist == 'profile') $profile .= $buttons_buffer."<br>\n";
$profile .= "</td>\n";
# end of first cell
# start of second cell
$profile .= "<td class='tbl1' valign='top' width='100%'>\n";
$profile .= "<table cellpadding='0' cellspacing='0' width='100%'>\n";
$profile .= "<tr>\n";
// user name, rank and rank color prefix
$rank = "<font color='".$rank_color[$data['user_level']]."'>".getuserlevel($data['user_level'])."</font>";
$profile .= "<td nowrap><strong>".$data['user_name']."</strong><br>".$rank."</td>\n";
// user online / offline status
$lastvisit = (time() - $data['user_lastvisit']);
if ($lastvisit < 60) $status = "<font color='#006600'>".$locale['pm000']."</font>";
elseif ($lastvisit < 300) $status = "<font color='#006600'>".$locale['pm001']."</font>";
else $status = "<font color='#AA0000'>".$locale['pm002']."</font>";
$profile .= "<td align='right' valign='bottom'>".$status."</td>\n";
$profile .= "</tr>\n";
// divider
$profile .= "<tr>\n<td colspan='2'><br><hr></td>\n</tr>\n";
if (currentlist == 'profile') {
// user location
$profile .= "<tr><td class='small' nowrap width='30%'>".$locale['u009']."</td><td class='small2'>".($data['user_location'] ? $data['user_location'] : $locale['u048'])."</td>\n</tr>\n";
// user birthday
if ($data['user_birthdate'] != "0000-00-00") {
$months = explode("|", $locale['months']);
$user_birthdate = explode("-", $data['user_birthdate']);
$birthdate = number_format($user_birthdate['2'])." ".$months[number_format($user_birthdate['1'])]." ".$user_birthdate['0'];
} else {
$birthdate = $locale['u048'];
}
$profile .= "<tr><td class='small' nowrap width='30%'>".$locale['u010']."</td><td class='small2'>".$birthdate."</td>\n</tr>\n";
// divider
$profile .= "<tr>\n<td colspan='2'><br><hr></td>\n</tr>\n";
// user joined
$profile .= "<tr>\n<td class='small' width='30%'>".$locale['u040']."</td><td class='small2'>".showdate("longdate", $data['user_joined'])."</td>\n</tr>\n";
// user lastvisit
$profile .= "<tr>\n<td class='small' width='30%'>".$locale['u044']."</td><td class='small2'>".($data['user_lastvisit'] != 0 ? showdate("longdate", $data['user_lastvisit']) : $locale['u049'])."</td>\n</tr>\n";
// user shoutbox posts
$profile .= "<tr>\n<td class='small' width='30%'>".$locale['u041']."</td><td class='small2'>".number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'"))."</td>\n</tr>\n";
// user comments posted
$profile .= "<tr>\n<td class='small' width='30%'>".$locale['u042']."</td><td class='small2'>".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))."</td>\n</tr>\n";
// user forum posts
$profile .= "<tr>\n<td class='small' width='30%'>".$locale['u043']."</td><td class='small2'>".number_format($data['user_posts'])."</td>\n</tr>\n";
// user groups
if ($data['user_groups']) {
// divider
$profile .= "<tr>\n<td colspan='2'><br><hr></td>\n</tr>\n";
$usergroups = "";
$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++) {
$usergroups .= "<a class='small2' href='".FUSION_SELF."?group_id=".$user_groups[$i]."'><strong>".getgroupname($user_groups[$i])."</strong></a>";
if ($i != (count($user_groups)-1)) { $usergroups .= ","; }
}
$profile .= "<tr>\n<td class='small' width='30%'>".$locale['423']."</td><td class='small2'>".$usergroups."</td>\n</tr>\n";
}
} else {
// add the buttons to the profile variable here when not in the normal profile lookup
$profile .= "<tr>\n<td colspan='2'>".$buttons_buffer."</td>\n</tr>\n";
}
$profile .= "</table>\n";
if (currentlist == 'profile') $profile .= "<br>\n";
$profile .= "</td>\n";
# end of second cell
$profile .= "</tr>\n</table>\n<br>\n";
if (currentlist == 'profile') {
$profile .= "<script language='javascript' type='text/javascript'>\n"
."function expandcollaps(img, id) {"
."var currentstatus = img.src.indexOf('_on') == -1 ? '_on' : '_off';"
."var newstatus = currentstatus == '_on' ? '_off' : '_on';"
."document.getElementById(id).style.display = newstatus == '_on' ? '' : 'none';"
."img.src = img.src.replace(newstatus, currentstatus);"
."}"
."</script>\n";
}
$limit = (currentlist == 'profile' ? $profile_sql['normal_limit'] : $profile_sql['list_limit']);
$rowstart = ((!isset($_GET['rowstart']) || !isNum($_GET['rowstart']) || currentlist == 'profile') ? 0 : $_GET['rowstart']);
$maxlimit = (currentlist == 'profile' ? ($limit + 1) : $profile_sql['list_max_history']);
foreach ($list_types as $list)
{
if (currentlist != 'profile' && $list != currentlist) continue;
switch ($list) {
case 'forum_threads':
$sql = "SELECT tt.*, tf.* FROM ".$db_prefix."threads tt
INNER JOIN ".$db_prefix."forums tf USING(forum_id)
WHERE ".groupaccess('forum_access')." AND thread_author='".lookup."'
ORDER BY thread_lastpost DESC LIMIT ";
$result1 = dbquery($sql.$maxlimit);
$result2 = dbquery($sql.$rowstart.",".$limit);
$colspan = 4; $title = $locale['pm300']; $norows = $locale['pm301'];
$header = "<tr>\n<td class='tbl2' width='25%'><strong>".$locale['pm201']."</strong></td>\n<td class='tbl2'><strong>".$locale['pm202']."</strong></td>\n<td class='tbl2' width='15%'><strong>".$locale['pm203']."</strong></td>\n<td class='tbl2' width='15%'><strong>".$locale['pm204']."</strong></td>\n</tr>\n";
break;
case "forum_posts":
$sql = "SELECT tp.*, tf.* FROM ".$db_prefix."posts tp
INNER JOIN ".$db_prefix."forums tf USING(forum_id)
WHERE ".groupaccess('forum_access')." AND post_author='".lookup."'
ORDER BY post_datestamp DESC LIMIT ";
$result1 = dbquery($sql.$maxlimit);
$result2 = dbquery($sql.$rowstart.",".$limit);
$colspan = 3; $title = $locale['pm400']; $norows = $locale['pm401'];
$header = "<tr>\n<td class='tbl2' width='25%'><strong>".$locale['pm201']."</strong></td>\n<td class='tbl2'><strong>".$locale['pm205']."</strong></td>\n<td class='tbl2' width='30%'><strong>".$locale['pm206']."</strong></td>\n</tr>\n";
break;
case 'news_items':
$sql = "SELECT * FROM ".$db_prefix."news
WHERE ".groupaccess('news_visibility')." AND (news_start='0'||news_start<=".time().") AND (news_end='0'||news_end>=".time().") AND news_name='".lookup."'
ORDER BY news_datestamp DESC LIMIT ";
$result1 = dbquery($sql.$maxlimit);
$result2 = dbquery($sql.$rowstart.",".$limit);
$colspan = 2; $title = $locale['pm500']; $norows = $locale['pm501'];
$header = "<tr>\n<td class='tbl2'><strong>".$locale['pm205']."</strong></td>\n<td class='tbl2' width='30%'><strong>".$locale['pm206']."</strong></td>\n</tr>\n";
break;
case 'articles':
$sql = "SELECT a.*, ac.* FROM ".$db_prefix."articles a
LEFT JOIN ".$db_prefix."article_cats ac ON a.article_cat=ac.article_cat_id
WHERE ".groupaccess('ac.article_cat_access')." AND article_name='".lookup."'
ORDER BY article_datestamp DESC LIMIT ";
$result1 = dbquery($sql.$maxlimit);
$result2 = dbquery($sql.$rowstart.",".$limit);
$colspan = 2; $title = $locale['pm600']; $norows = $locale['pm601'];
$header = "<tr>\n<td class='tbl2'><strong>".$locale['pm205']."</strong></td>\n<td class='tbl2' width='30%'><strong>".$locale['pm206']."</strong></td>\n</tr>\n";
break;
}
$profile .= "<table cellpadding='0' cellspacing='1' class='tbl-border' width='100%'>\n<tr>\n";
$profile .= "<td class='tbl1' valign='top'>\n";
$profile .= "<table cellpadding='0' cellspacing='1' width='100%'>\n";
$profile .= "<tr>\n<td colspan='".$colspan."'>";
if (currentlist == 'profile') {
$profile .= "<span style='float:left'><strong>".$title." ".$data['user_name']."</strong></span><span style='float:right'>";
if (dbrows($result1) > $limit) $profile .= "<a href='".FUSION_SELF."?lookup=".$data['user_id']."&list=".$list."' style='vertical-align:middle'>".$locale['pm207']."</a> ";
$profile .= "<img alt='' onclick=\"expandcollaps(this, '".$list."')\" src='".THEME."images/panel_".(dbrows($result1) == 0 ? "on" : "off").".gif' style='cursor:pointer;vertical-align:middle'></span>";
} else {
$profile .= "<strong>".$title." ".$data['user_name']."</strong>";
}
$profile .= "</td>\n</tr>\n";
$profile .= "<tr>\n<td colspan='".$colspan."'><hr></td>\n</tr>\n";
$profile .= "<tbody id='".$list."'".(currentlist == 'profile' && dbrows($result1) == 0 ? " style='display:none'" : "").">\n";
if (dbrows($result1) == 0) {
$profile .= "<tr><td align='center' class='tbl' colspan='".$colspan."'><strong>".$data['user_name']."</strong> ".$norows."</td>\n</tr>\n";
} else {
$profile .= $header;
while ($row = dbarray($result2)) {
switch ($list) {
case 'forum_threads':
$replies = dbcount("(thread_id)", "posts", "thread_id='".$row['thread_id']."'");
$profile .= "<tr>\n<td class='tbl'>".trimlink($row['forum_name'], 30)."</td>\n"
."<td class='tbl'><a style='font-weight:normal;' href='".FORUM."viewthread.php?forum_id=".$row['forum_id']."&thread_id=".$row['thread_id']."' title='".$row['thread_subject']."'>".trimlink($row['thread_subject'], 30)."</a></td>\n"
."<td class='tbl'>".$row['thread_views']."</td>\n"
."<td class='tbl'>".ceil($replies-1)."</td>\n</tr>\n";
break;
case "forum_posts":
$replies = dbcount("(thread_id)", "posts", "thread_id='".$row['thread_id']."'");
$rstart = ($replies > 20 ? "rowstart=".((ceil($replies / 20)-1)*20)."&" : "");
$profile .= "<tr>\n<td class='tbl'>".trimlink($row['forum_name'], 30)."</td>\n"
."<td class='tbl'><a style='font-weight:normal;' href='".FORUM."viewthread.php?".$rstart."forum_id=".$row['forum_id']."&thread_id=".$row['thread_id']."&pid=".$row['post_id']."#post_".$row['post_id']."' title='".$row['post_subject']."'>".trimlink($row['post_subject'], 30)."</a></td>\n"
."<td class='tbl'>".showdate("forumdate", $row['post_datestamp'])."</td>\n</tr>\n";
break;
case 'news_items':
$profile .= "<tr>\n<td class='tbl'><a style='font-weight:normal;' href='".BASEDIR."news.php?readmore=".$row['news_id']."'>".trimlink($row['news_subject'], 50)."</a></td>\n"
."<td class='tbl'>".showdate("forumdate", $row['news_datestamp'])."</td>\n</tr>\n";
break;
case 'articles':
$profile .= "<tr>\n<td class='tbl'><a style='font-weight:normal;' href='".BASEDIR."readarticle.php?article_id=".$row['article_id']."'>".trimlink(stripslashes($row['article_subject']), 50)."</a></td>\n"
."<td class='tbl'>".showdate("forumdate", $row['article_datestamp'])."</td>\n</tr>";
break;
}
}
}
$profile .= "</tbody>\n</table>\n";
$profile .= "</td>\n";
$profile .= "</tr>\n</table>\n<br>\n";
if (currentlist != 'profile') {
$profile .= "<table cellpadding='0' cellspacing='0' width='100%'><tr><td align='left'><a href='".FUSION_SELF."?lookup=".lookup."'>".$locale['pm208']."</a></td>"
."<td align='right'>".(dbrows($result1) > $limit ? makePageNav($rowstart,$limit,dbrows($result1),3,FUSION_SELF."?lookup=".lookup."&list=".$list."&") : " ")."</td></tr></table>\n<br>\n";
}
}
echo $profile;
echo "</td>\n</tr>\n</table>\n<br>\n";
closetable();
/* end: profile page generation when the $_GET['lookup'] is found in the users db table. */
} else {
/* start: profile page generation when the $_GET['lookup'] is not found in the users db table. */
opentable($locale['420']." - ".$locale['pm200']);
echo "<br>\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border' width='".$profile_width."'>\n<tr>\n<td align='center' class='tbl1'>\n";
echo str_replace("{LOOKUP}", "<strong>".lookup."</strong>", $locale['pm209'])."\n";
echo "</td>\n</tr>\n</table>\n<br>\n";
closetable();
/* end: profile page generation when the $_GET['lookup'] is not found in the users db table. */
}
} elseif (defined('group_id') && !defined('lookup')) {
$result = dbquery("SELECT * FROM ".$db_prefix."user_groups WHERE group_id='".group_id."'");
if (dbrows($result)) {
/* start: user group page generation when the $_GET['group_id'] is found in the user_goups db table. */
$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 "<br>\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border' width='".$profile_width."'>\n<tr>\n<td class='tbl1'>\n";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n";
echo "<tr>\n<td class='tbl'><strong>".$data['group_name']."</strong></td>\n"
."<td align='right' class='tbl'><span class=' small2'>( ".sprintf((dbrows($result) == 1 ? $locale['411'] : $locale['412']), dbrows($result))." )</span></td>\n</tr>\n";
echo "<tr>\n<td colspan='2'><hr></td>\n</tr>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='tbl' width='75%'><a href='".FUSION_SELF."?lookup=".$data['user_id']."'>".$data['user_name']."</a></td>"
."<td class='tbl' nowrap><font color='".$rank_color[$data['user_level']]."'>".getuserlevel($data['user_level'])."</font></td>\n</tr>\n";
}
echo "</table>\n";
echo "</td>\n</tr>\n</table>\n<br>\n";
closetable();
/* end: user group page generation when the $_GET['group_id'] is found in the user_goups db table. */
} else {
/* start: user group page generation when the $_GET['group_id'] is not found in the user_goups db table. */
opentable($locale['410']." - ".$locale['pm200']);
echo "<br>\n<table align='center' cellpadding='0' cellspacing='1' class='tbl-border' width='".$profile_width."'>\n<tr>\n<td align='center' class='tbl1'>\n";
echo str_replace("{GROUP_ID}", "<strong>".group_id."</strong>", $locale['pm210'])."\n";
echo "</td>\n</tr>\n</table>\n<br>\n";
closetable();
/* end: user group page generation when the $_GET['group_id'] is not found in the user_goups db table. */
}
} else {
redirect(BASEDIR."index.php");
}
if ($profile_include_sideright) require_once "side_right.php";
else echo "</td>\n";
require_once "footer.php";
?>
Z góry dzięki.
Popraw proszę tytuł tematu bo poleci do kosza. - grześ
Edytowane przez morawcik dnia 05.08.2007 12:55:45
|
|
|
|
Wścibski Gość |
Dodany dnia 26.11.2024 04:49:00
|
Pan Kontekstualny
Postów: n^x
Data rejestracji: Zawsze
|
|
IP: localhost |
|
|
Grzes |
Dodany dnia 05.08.2007 13:36:18
|
Zaawansowany
Postów: 1656 Pomógł: 42
Data rejestracji: 28.04.2005 20:28
|
W profile.php masz linijki:
// user forum posts
$profile .= "<tr>\n<td class='small' width='30%'>".$locale['u043']."</td><td class='small2'>".number_format($data['user_posts'])."</td>\n</tr>\n";
Dodaj po niej dokładnie to:
$user_points = show_warning_points($data[user_id]);
$profile .= "<tr><td width='1%' class='tbl2' style='white-space:nowrap'><b>".$locale['PDWA200']."</b></td>
<td class='tbl2'>
<a href='".INFUSIONS."pd_warning/warning.php?lookup=".$data[user_id]."' title='".$user_points." ".($user_points==1 ? "Punkt" : "Punkte")."'>".show_warning_symbols(show_warning_points($data[user_id]))."</a></td>
</tr>";
Powinno śmigać jak się patrzy ;)
Często najmądrzejszą odpowiedzią jest milczenie
|
|
|
|
zimi27 |
Dodany dnia 22.01.2008 01:15:24
|
Przedszkolak
Postów: 76 Ostrzeżeń: 4
Data rejestracji: 13.06.2007 20:26
Złamana licencja
|
Po tej modyfikacji wprawdzie pojawia się "upomnienie" w profilu użytkownika ale nie można dać przez profil ostrzeżenia, działa to tylko na forum. |
|
|
|
bartek124 |
Dodany dnia 22.01.2008 08:35:40
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
I tak było zawsze. W starym i nowym profilu. Ostrzeżenie można dać tylko na forum.
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
zimi27 |
Dodany dnia 24.01.2008 00:18:54
|
Przedszkolak
Postów: 76 Ostrzeżeń: 4
Data rejestracji: 13.06.2007 20:26
Złamana licencja
|
Dzięki bartek124 za odpowiedź.
Szkoda, że przez profil nie da się dać "upomnienia", bo często zdarza się, że taki delikwent nie ma żadnych postów na forum i spamuje shoutbox lub/oraz pisze naganne komentarze przy newsach, artykułach itp.
Jakby ktoś zmodyfikował ten mod, to super
|
|
|
|
Dzoker |
Dodany dnia 14.02.2008 14:00:46
|
Przedszkolak
Postów: 32
Data rejestracji: 13.06.2005 03:26
|
Przydałoby się zmodyfikować, bo szukam i szukam, i znaleźć nie mogę możliwości dodawania przez profil, bo z forum fusiona np. ja nie korzystam Ech... Nie ma jakiejś alternatywy?
Edytowane przez Dzoker dnia 18.02.2008 15:20:59
|
|
|
|
bartek124 |
Dodany dnia 14.02.2008 15:16:25
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Jest alternatywa. Warnings, wtyczka jest na Becie, powinna niedługo trafić do Labu .
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
luki_35 |
Dodany dnia 29.02.2008 23:15:00
|
Początkujący
Postów: 105
Data rejestracji: 02.09.2007 11:38
|
Ja mam problem z modyfikacją pliku viewtheard (dodam że go wcześniej troche sam modyfikowałem) Gdy zrobie wszystko z instrukcją to pokazuje mi sie tak:
http://www.hh-sty...=1&style=1
Mógł by mi ktoś zmodyfikować ten plik?
kod pliku po modyfikacji
kod przed modyfikacją |
|
|
|
bartek124 |
Dodany dnia 01.03.2008 08:38:43
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
<?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 INCLUDES."forum_functions_include.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
include LOCALE.LOCALESET."forum/main.php";
include LOCALE.LOCALESET."fusionboard.php";
include INFUSIONS."wob_rank_system/func/func.php";
require_once INCLUDES."comments_include.php";
require_once INCLUDES."ratings_include.php";
include FORUM."includes/warning_include.php";
include FORUM."includes/forum_includes.php";
$fboardControl = dbarray(dbquery("SELECT * FROM ".$db_prefix."fboard_control"));
if (file_exists(FORUM."locale/".$settings['locale'].".php")) {
include FORUM."locale/".$settings['locale'].".php";
} else {
include FORUM."locale/English.php";
}
$posts_per_page = 20;
update_warning();
if (!FUSION_QUERY || !isset($forum_id) || !isNum($forum_id) || !isset($thread_id) || !isNum($thread_id)) fallback("index.php");
$result = dbquery(
"SELECT f.*, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
LEFT JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE f.forum_id='".$forum_id."'"
);
if (dbrows($result)) {
$fdata = dbarray($result);
if (!checkgroup($fdata['forum_access']) || !$fdata['forum_cat']) fallback("index.php");
} else {
fallback("index.php");
}
$can_post = checkgroup($fdata['forum_posting']);
$can_reply = checkgroup($fdata['forum_reply']);
$can_edit = $fdata['forum_edit'];
if(isset($_GET['style']) && is_numeric($_GET['style'])){ $style=$_GET['style']; }else{ $style = $fboardControl['fbc_view']; }
$forum_mods = explode(".", $fdata['forum_moderators']);
if (iMEMBER && in_array($userdata['user_id'], $forum_mods)) { define("iMOD", true); } else { define("iMOD", false); }
$result = dbquery("SELECT * FROM ".$db_prefix."threads WHERE thread_id='".$thread_id."' AND forum_id='".$fdata['forum_id']."'");
if (dbrows($result)) { $tdata = dbarray($result); } else { fallback("index.php"); }
$caption = $fdata['forum_cat_name']." | <a href='viewforum.php?forum_id=".$fdata['forum_id']."'>".$fdata['forum_name']."</a>";
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_views=thread_views+1 WHERE thread_id='$thread_id'");
if (iMEMBER && $can_post && !$tdata['thread_locked'] && isset($_POST['postquickreply'])) { //patch for pf 6.01.8
$flood = false;
$message = stripinput(censorwords($_POST['message']));
if ($message != "") {
$result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'");
if (dbrows($result) > 0) {
$data = dbarray($result);
if ((time() - $data['last_post']) < $settings['flood_interval']) {
$flood = true;
$result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')");
if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'");
}
fallback("viewforum.php?forum_id=$forum_id");
}
}
if (!$flood) {
$sig = ($userdata['user_sig'] ? '1' :'0');
$smileys = isset($_POST['disable_smileys']) ? "0" : "1";
$subject = "RE: ".$tdata['thread_subject'];
$result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'");
$result = dbquery("UPDATE ".$db_prefix."threads SET thread_lastpost='".time()."', thread_lastuser='".$userdata['user_id']."' WHERE thread_id='$thread_id'");
$result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')");
$newpost_id = mysql_insert_id();
$result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'");
redirect("postify.php?post=reply&error=0&forum_id=$forum_id&thread_id=$thread_id&post_id=$newpost_id");
}
}
}
opentable($locale['500']);
echo "<table cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td class='smallalt'><a href='index.php'>".$settings['sitename']."</a> | $caption</td>\n";
if (iMEMBER) {
echo "<td align='right'>\n";
if (!$tdata['thread_locked'] && $can_reply) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
if ($can_post)
{
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a></td>\n";
}
}
echo "</tr>
</table>\n";
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
echo "<br /><table cellpadding='0' cellspacing='0' class='tbl-border' align='right'>
<tr>
<td class='tbl1'><b><a href='printthread.php?forum_id=$forum_id&thread_id=$thread_id&rowstart=$rowstart'>".$locale['fb_j100']."</a></b></td>
<td class='tbl1'><b><a href='#rate'>".$locale['fb_j101']."</a></b></td>
<td class='tbl1'><b>".($style == "1" || !$style ? "<a href='".FUSION_SELF."?forum_id=".$forum_id."&thread_id=".$thread_id."&style=2'>".$locale['fb_j102']."</a>" : "<a href='".FUSION_SELF."?forum_id=".$forum_id."&thread_id=".$thread_id."&style=1'>".$locale['fb_j103']."</a>")."</b></td>
</tr>
</table><br /><br />";
$rows = dbcount("(thread_id)", "posts", "thread_id='$thread_id'");
if (isset($pid) && isNum($pid)) {
$reply_count = dbcount("(post_id)", "posts", "thread_id='".$tdata['thread_id']."' AND post_id<='".$pid."'");
if ($reply_count > $posts_per_page) $rowstart = ((ceil($reply_count / $posts_per_page)-1)*$posts_per_page);
}
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;margin-bottom:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
if($style == "1"){
/* begin fusion style */
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = parseubb_extra($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td width='145' class='tbl2'>".$locale['501']."</td>
<td class='tbl2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']."</td>
</tr>
<tr>
<td valign='top' rowspan='4' width='145' class='tbl1'>
<b><a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></b>
";
if($fboardControl['fbc_ranks'] == "1") echo getRank($data['user_id'])."";
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'><br><br>\n";
$height = "210";
} else {
echo "<img src='".FORUM."images/noav.gif' alt='".$locale['567']."'><br><br>\n";
$height = "210";
}
if($fboardControl['fbc_ranks'] == "1") echo show_medals($data['user_id']);
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined'])."<br /><br />";$user_points = show_warning_points($data[user_id]);
echo "<br /><small><a style='cursor:help;' onClick=\"h1171915583();\">".$locale['PDWA200']."</a></small><br />
<a href='".INFUSIONS."pd_warning/warning.php?postid=".$data[post_id]."' title='".$user_points." ".($user_points==1 ? $locale['PDWA201'] : $locale['PDWA202'])."'>".show_warning_symbols($user_points)."</a>"; echo "</td>
<td>
<table cellspacing='0' cellpadding='0' width='100%'>
<tr>
<td class='tbl1'>".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
<td align='right' class='tbl1'>\n";
if (iMEMBER && $can_reply) {
if (!$tdata['thread_locked']) {
if (($userdata['user_id'] == $data['post_author'] && $can_edit) || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' height='$height' class='tbl1'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td></tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim'] && file_exists(THEME."forum/aim.gif")) {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://web.icq.com/wwp?Uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='mailto:$data[user_msn]'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://uk.profiles.yahoo.com/$data[user_yahoo]' target='_blank'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>
</td>
</tr>\n";
}
}
echo "</table>\n";
/* end fusion style */
} else {
/* begin vbulletin style */
echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."\n\n<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb_extra($message);
$message = parseubb($message);
$message = nl2br($message);
if ($data['post_edittime'] != "0") {
$edituser = "<a href='../profile.php?lookup=".$data['post_edituser']."'>".$data['edit_name']."</a>";
$edittime = showdate("forumdate", $data['post_edittime']);
}
$is_mod = in_array($data['user_id'], $forum_mods) && $data['user_level'] < "102" ? true : false;
echo "<tr>
<td class='tbl2' colspan='2'><a name='post_".$data['post_id']."' id='post_".$data['post_id']."'></a>".$data['post_subject']." -
".$locale['505'].showdate("forumdate", $data['post_datestamp'])."</td>
</tr>
<tr>
<td colspan='2'>
<table cellspacing='0' cellpadding='0' width='100%' class='tbl-border'>
<tr>
<td width='100px' valign='middle' class='tbl1'>";
if ($data['user_avatar'] != "") {
echo "<img src='".IMAGES."avatars/".$data['user_avatar']."' alt='".$locale['567']."'>\n";
} else {
echo "<img src='".FORUM."images/noav.gif' alt='".$locale['567']."'>\n";
}
echo "</td>
<td align='left' class='tbl1' valign='top'>
<span style='font-size: 24px;'><a href='../profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></span><br />
" . ($fboardControl['fbc_ranks'] == "1" ? getRank($data['user_id']) : ""). "
".($fboardControl['fbc_medals'] == "1" ? $locale['fb_a100']."<br />
".show_medals($data['user_id']) : "")."
</td><td align='right' class='tbl1' valign='top'>";
show_level();
echo "<br><br>\n";
echo "<span class='alt'>".$locale['502']."</span> ".$data['user_posts']."<br>\n";
if ($data['user_location']) echo "<span class='alt'>".$locale['503']."</span> ".$data['user_location']."<br>\n";
echo "<span class='alt'>".$locale['504']."</span> ".showdate("%d.%m.%y", $data['user_joined'])."\n<br /><br />";
echo show_warning();
echo "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign='top' class='tbl1' colspan='2'>
$message";
if ($data['attach_id']) {
if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM."attachments/".$data['attach_name'])) {
echo "<hr>\n".$data['user_name'].$locale['506']."<br><br>\n<img src='".FORUM."attachments/".$data['attach_name']."'>";
} else {
echo "<hr>\n".$data['user_name'].$locale['507']."<br>\n<a href='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&getfile=".$data['post_id']."'>".$data['attach_name']."</a>";
}
}
if ($data['post_edittime'] != "0") {
echo "<hr>\n".$locale['508'].$edituser.$locale['509']."$edittime";
}
echo "</td></tr>
<tr>
<td class='tbl1'>\n";
if ($data['user_aim'] && file_exists(THEME."forum/aim.gif")) {
echo "<a href='aim:goim?screenname=".str_replace(" ", "+", $data['user_aim'])."' target='_blank'><img src='".THEME."forum/aim.gif' alt='".$data['user_aim']."' style='border:0px;'></a> ";
}
if ($data['user_icq']) {
echo "<a href='http://web.icq.com/wwp?Uin=".$data['user_icq']."' target='_blank'><img src='".THEME."forum/icq.gif' alt='".$data['user_icq']."' style='border:0px;'></a> ";
}
if ($data['user_msn']) {
echo "<a href='mailto:$data[user_msn]'><img src='".THEME."forum/msn.gif' alt='".$data['user_msn']."' style='border:0px;'></a> ";
}
if ($data['user_yahoo']) {
echo "<a href='http://uk.profiles.yahoo.com/$data[user_yahoo]' target='_blank'><img src='".THEME."forum/yahoo.gif' alt='".$data['user_yahoo']."' style='border:0px;'></a> ";
}
if ($data['user_web']) {
if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".THEME."forum/web.gif' alt='".$data['user_web']."' style='border:0px;'></a> ";
}
echo "<a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."'><img src='".THEME."forum/pm.gif' alt='".$locale['571']."' style='border:0px;'></a>";
if (iMEMBER && $can_post) {
if (!$tdata['thread_locked']) {
echo "</td><td class='tbl1' align='right' width='165px'>";
if ($userdata['user_id'] == $data['post_author'] || iMOD || iSUPERADMIN) {
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
}
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id'].""e=".$data['post_id']."'><img src='".THEME."forum/quote.gif' alt='".$locale['569']."' style='border:0px;'></a>\n";
if (iMOD || iSUPERADMIN && $data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
} else {
if (iMOD || iSUPERADMIN) {
if($tdata['thread_locked']) echo "</td><td class='tbl1' align='right' width='165px'>";
echo "<a href='post.php?action=edit&forum_id=$forum_id&thread_id=".$data['thread_id']."&post_id=".$data['post_id']."'><img src='".THEME."forum/edit.gif' alt='".$locale['568']."' style='border:0px;'></a>\n";
if ($data['post_ip'] != "0.0.0.0" && file_exists(THEME."forum/ip.gif")) echo "<img src='".THEME."forum/ip.gif' alt='".$locale['570']."' title='".$data['post_ip']."' style='border:0px;'>\n";
}
}
}
echo "</td>
</tr>\n";
}
}
echo "</table>\n";
/* end fusion style */
}
if ($rows > $posts_per_page) {
echo "<div align='center' style='margin-top:5px;'>
".makePageNav($rowstart,$posts_per_page,$rows,3,FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id&")."
</div>\n";
}
echo "<table cellpadding='0' cellspacing='0' width='100%' style='margin-top:5px;'>\n<tr>\n";
$forum_list = ""; $current_cat = "";
$result = dbquery(
"SELECT f.forum_id, f.forum_name, f2.forum_name AS forum_cat_name
FROM ".$db_prefix."forums f
INNER JOIN ".$db_prefix."forums f2 ON f.forum_cat=f2.forum_id
WHERE ".groupaccess('f.forum_access')." AND f.forum_cat!='0' ORDER BY f2.forum_order ASC, f.forum_order ASC"
);
while ($data = dbarray($result)) {
if ($data['forum_cat_name'] != $current_cat) {
if ($current_cat != "") $forum_list .= "</optgroup>\n";
$current_cat = $data['forum_cat_name'];
$forum_list .= "<optgroup label='".$data['forum_cat_name']."'>\n";
}
$sel = ($data['forum_id'] == $fdata['forum_id'] ? " selected" : "");
$forum_list .= "<option value='".$data['forum_id']."'$sel>".$data['forum_name']."</option>\n";
}
$forum_list .= "</optgroup>\n";
echo "<td align='left' class='tbl'>".$locale['540']."<br>
<select name='jump_id' class='textbox' onChange=\"jumpForum(this.options[this.selectedIndex].value);\">
$forum_list</select></td>\n";
if (iMEMBER && ($can_post || $can_reply)) {
if (iMOD || iSUPERADMIN) {
echo "<td align='right' class='tbl'>
<form name='modopts' method='post' action='options.php?forum_id=$forum_id&thread_id=$thread_id'>
".$locale['520']."<br>
<select name='step' class='textbox'>
<option value='none'> </option>
<option value='renew'>".$locale['527']."</option>
<option value='delete'>".$locale['521']."</option>\n";
if (!$tdata['thread_locked']) {
echo "<option value='lock'>".$locale['522']."</option>\n";
} else {
echo "<option value='unlock'>".$locale['523']."</option>\n";
}
if (!$tdata['thread_sticky']) {
echo "<option value='sticky'>".$locale['524']."</option>\n";
} else {
echo "<option value='nonsticky'>".$locale['525']."</option>\n";
}
echo "<option value='move'>".$locale['526']."</option>\n";
echo "</select>
<input type='submit' name='go' value='".$locale['528']."' class='button'>
</form>
</td>
</tr>\n";
}
}
echo "</table>\n";
if (iMEMBER) {
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
if ($settings['thread_notify']) {
echo "<td valign='top' class='tbl'>";
if (dbcount("(thread_id)", "thread_notify", "thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'")) {
$result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_datestamp='".time()."', notify_status='1' WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'");
$notify_link = "<a href='postify.php?post=off&forum_id=$forum_id&thread_id=$thread_id'>".$locale['515']."</a>";
} else {
$notify_link = "<a href='postify.php?post=on&forum_id=$forum_id&thread_id=$thread_id'>".$locale['516']."</a>";
}
echo "$notify_link</td>\n";
}
if ($can_post || $can_reply) {
echo "<td align='right' class='tbl'>";
if (!$tdata['thread_locked'] && $can_reply) {
echo "<a href='post.php?action=reply&forum_id=$forum_id&thread_id=$thread_id'><img src='".THEME."forum/reply.gif' alt='".$locale['565']."' style='border:0px;'></a>\n";
}
if ($can_post)
{
echo "<a href='post.php?action=newthread&forum_id=$forum_id'><img src='".THEME."forum/newthread.gif' alt='".$locale['566']."' style='border:0px;'></a>\n";
}
echo "</td>\n";
}
echo "</tr>\n</table>\n";
}
closetable();
echo "<a name='rate' id='rate'></a>";
showratings("F",$thread_id,FUSION_SELF."?".FUSION_QUERY);
if (iMEMBER && $can_reply && !$tdata['thread_locked']) {
echo "<br />";
opentable($locale['512']);
echo "<form name='inputform' method='post' action='".FUSION_SELF."?forum_id=$forum_id&thread_id=$thread_id'>
<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>
<tr>
<td align='center' class='tbl1'><textarea name='message' cols='80' rows='7' class='textbox'></textarea><br>
<input type='button' value='b' class='button' style='font-weight:bold;width:25px;' onClick=\"addText('message', '[b]', '[/b]');\">
<input type='button' value='i' class='button' style='font-style:italic;width:25px;' onClick=\"addText('message', '[i]', '[/i]');\">
<input type='button' value='u' class='button' style='text-decoration:underline;width:25px;' onClick=\"addText('message', '[u]', '[/u]');\">
<input type='button' value='url' class='button' style='width:30px;' onClick=\"addText('message', '[url]', '[/url]');\">
<input type='button' value='mail' class='button' style='width:35px;' onClick=\"addText('message', '[mail]', '[/mail]');\">
<input type='button' value='img' class='button' style='width:30px;' onClick=\"addText('message', '[img]', '[/img]');\">
<input type='button' value='center' class='button' style='width:45px;' onClick=\"addText('message', '[center]', '[/center]');\">
<input type='button' value='small' class='button' style='width:40px;' onClick=\"addText('message', '[small]', '[/small]');\">
<input type='button' value='code' class='button' style='width:40px;' onClick=\"addText('message', '[code]', ' ');\">
<input type='button' value='quote' class='button' style='width:45px;' onClick=\"addText('message', '', ' ');\">".extra_bb_codes()."</td>
</tr>
<tr>
<td align='center' class='tbl2'>".displaysmileys("message")."<br>
<input type='checkbox' name='disable_smileys' value='1'>".$locale['513']."</td>
</tr>
<tr>
<td align='center' class='tbl1'><input type='submit' name='postquickreply' value='".$locale['514']."' class='button'></td>
</tr>
</table>
</form>\n";
closetable();
}
echo "<script type='text/javascript'>
function jumpForum(forumid) {
document.location.href='".FORUM."viewforum.php?forum_id='+forumid;
}
</script>\n";
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>[/code]
Tak poprawnie powinien wyglądać kod.
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
luki_35 |
Dodany dnia 01.03.2008 13:32:27
|
Początkujący
Postów: 105
Data rejestracji: 02.09.2007 11:38
|
Nie działa niestety - podmieniłem plik możesz zobaczyć jak to teraz wygląda . (link wyżej) |
|
|
|
bartek124 |
Dodany dnia 01.03.2008 13:37:45
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Zapomniałem o include :P.
include INFUSIONS."pd_warning/warning.inc.php";
dodaj po:
require_once "../maincore.php";
na przykład ;).
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
luki_35 |
Dodany dnia 01.03.2008 14:02:18
|
Początkujący
Postów: 105
Data rejestracji: 02.09.2007 11:38
|
edit:
Ej dobra wszystko działa, tylko mam jeszcze jeden problem(?), bo w tym czymyś w widoku tematu obok nicku pojawia sie tytuł użytkownika, pokazuje sie "Admin Admin" obok siebie, chciałbym usunąć ten tytuł usera - jak to zrobić?
Edytowane przez luki_35 dnia 01.03.2008 15:31:48
|
|
|
|
bartek124 |
Dodany dnia 01.03.2008 15:43:50
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
Jeszcze raz na wklejto.pl proszę kod działającego pliku viewthread.php.
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
luki_35 |
Dodany dnia 01.03.2008 15:47:30
|
Początkujący
Postów: 105
Data rejestracji: 02.09.2007 11:38
|
Dobra już mam działa wszystko, tylko nie wiem jak usunąć ten tytuł usera. |
|
|
|
bartek124 |
Dodany dnia 01.03.2008 15:53:58
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
No to do jasnej anielki daj mi ten kod!
Nie pomagam na komunikatorach oraz PW!
|
|
|
|
luki_35 |
Dodany dnia 01.03.2008 16:14:22
|
Początkujący
Postów: 105
Data rejestracji: 02.09.2007 11:38
|
http://www.wklejt... ;] |
|
|
|
bartek124 |
Dodany dnia 03.03.2008 17:57:32
|
Weteran
Postów: 3264 Pomógł: 236
v7.02.06 Data rejestracji: 26.05.2007 12:25
|
To kontroluje System Rang. W tym systemie usuń tytul rangi zostaw tylko obrazek i będzie git.
Nie pomagam na komunikatorach oraz PW!
|
|
|