|
|
Latest News |
Latest Threads |
|
 |
55.454 Posts & 4.945 Themen in 78 Foren |
|
|
|
 |
Forensuche |
|
Suchbegriff |
Benutzerauswahl |
Ergebnisse anzeigen |
 |
 |
Anpassung Forumspalte Autor 5 Beiträge in diesem Thema |
|
|
 |
|
|
 |
|
 |
31.03.2014 - 18:36 Uhr |
|
|
|
ich habe ein kleines problem. ich möchte im forum so wie hier mehr anzeigen lassen als sonst. zb registriert geschlecht alter usw. Nun habe ich im Admincenter 2 profilfelder erstellt. Postleitzahl u. wohnort. nun zu meinem problem entweder habe ich anstatt postleitzahl den ort stehen oder andersrum. bekomme es nicht hin das die postleitzahl übereinstimmt genauso wie mit dem wohnort. bin auch vorgegangen laut install anleitung. klappt einfach nicht. füge anhang bei
Nun die 2 dateien die man editieren muß damit es paßt.
showthread_row_htm:
Hier ist die showthread.php datei
Hier klicken zum aufklappen 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | | PHP-Quelltext
include ("forum/kopf.php");
if (!$threadid>0) {header ("location: include.php?path=forum/main.phpsession_id()); exit();}
elseif ((getrights($forumcat['forumcat_rrights'])=="true" || userrights($forumcat['forumcat_mods'],$forumcat['forumcat_rrights'])=="true" || userrights($forumcat['forumcat_user'],$forumcat['forumcat_rrights'])=="true")) {
if ($forumthread['forumthread_title']!='') $config['site_title'].=" - ".$forumthread['forumthread_title'];
if (userrights($forumcat['forumcat_mods'])=="true" && $_POST['actionmod']=="Go" && isset($_POST['quick_mod']) && $_POST['quick_mod']!="-1") {
$quick_mod=$_POST['quick_mod'];
if ($quick_mod=='cs0' || $quick_mod=='cs1' || $quick_mod=='cs2' || $quick_mod=='cs3') {
if ($quick_mod=='cs0') $cs=0;
elseif ($quick_mod=='cs1') $cs=1;
elseif ($quick_mod=='cs2') $cs=2;
elseif ($quick_mod=='cs3') $cs=3;
$DB->query("UPDATE ".$db_tab['forumthread']." SET forumthread_status='".$cs."' WHERE forumthread_id='".$threadid."'");
}
elseif (intval($quick_mod)>0) $DB->query("UPDATE ".$db_tab['forumthread']." SET forumthread_catid='".$quick_mod."' WHERE forumthread_id='".$threadid."'");
elseif ($quick_mod=="del") {header("location: include.php?path=forum/moderate.php&threadid=".$threadid."&alter_delete=1session_id()); exit();}
header("location: include.php?path=forum/showthread.php&threadid=".$threadid."session_id()); exit();
}
if (intval($_REQUEST['entries'])>0) $entries=$_REQUEST['entries'];
else $entries=0;
if (isset($_REQUEST['postid'])) {
$postid=$_REQUEST['postid'];
if ($postid=='new') $sqlcommand="AND forumpost_time>'".$posttime."' ORDER by forumpost_time ".$config['forum_postorder'];
elseif ($postid=='last') $sqlcommand="ORDER by forumpost_time DESC";
else $sqlcommand=" AND forumpost_id='".intval($postid)."'";
$info=$DB->fetch_array($DB->query("SELECT forumpost_time, forumpost_id FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' ".$sqlcommand." LIMIT 1"));
if ($info['forumpost_id']>0) {
if ($config['forum_postorder']=='ASC') $sqlcommand='<';
else $sqlcommand='>';
$cinfo=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_time".$sqlcommand."='".$info['forumpost_time']."' AND forumpost_threadid='".$threadid."'"));
if ($cinfo[0]>$forumcat['forumcat_posts']) {
$entries=0;
while (($entries+$forumcat['forumcat_posts'])<$cinfo[0]) {
$entries=$entries+$forumcat['forumcat_posts'];
}
}
if ($forum_style[0]!=1) {header ("location: include.php?path=forum/showthread.php&threadid=".$threadid."&entries=".$entries."session_id()."#post".$info['forumpost_id']); exit();}
}
else unset($postid);
}
$postcount=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."'"));
$replycount=$postcount[0]-1;
if (!$postcount[0]>0 && !$catid) {header("location: include.php?path=fourm/main.phpsession_id()); exit();}
elseif (!$postcount[0]>0 && $catid>0) {header("location: include.php?path=fourm/showcat.php&catid=".$catid."session_id()); exit();}
elseif ($postcount[0]>0) {
if (!eregi("forum/showthread.php&threadid=".$threadid."",$record_referer)) {
$lastpost=$DB->fetch_array($DB->query("SELECT forumpost_autor, forumpost_autorid, forumpost_time FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' ORDER by forumpost_time DESC LIMIT 1"));
$DB->query("UPDATE ".$db_tab['forumthread']." SET forumthread_viewcount=forumthread_viewcount+1,forumthread_replycount='".$replycount."', forumthread_lastreply_autor='".$lastpost['forumpost_autor']."',forumthread_lastreply_autorid='".$lastpost['forumpost_autorid']."',forumthread_lastreply_time='".$lastpost['forumpost_time']."' WHERE forumthread_id='".$threadid."'");
}
if ($postcount[0]!=1) {$s="s";}
if ($user_id!=0) {
$newpost=$DB->fetch_array($DB->query("SELECT forumpost_id FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' AND forumpost_time>'".$posttime."' ORDER by forumpost_time ASC LIMIT 1"));
if ($newpost['forumpost_id']>0) eval ("\$newpostlink= \"".getTemplate("forum/showthread_newpostlink")."\";");
}
if ($forum_style[0]!=1) $sqlcommand=" LIMIT ".$entries.", ".$forumcat['forumcat_posts'];
else unset($sqlcommand);
$getforumpost=$DB->query("SELECT * FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$forumthread['forumthread_id']."' ORDER by forumpost_time ".$config['forum_postorder'].$sqlcommand);
unset($firstpost);
unset($sqlcommand);
while ($forumpost=$DB->fetch_array($getforumpost)) {
$post_cache[$forumpost['forumpost_id']]=$forumpost;
if (!$firstpost) $firstpost=$forumpost;
if ($forumpost['forumpost_autorid']>0) {
if ($sqlcommand) $sqlcommand.=" OR user_id='".$forumpost['forumpost_autorid']."'";
else $sqlcommand="SELECT * FROM ".$db_tab['user']." WHERE user_id='".$forumpost['forumpost_autorid']."'";
}
}
if ($sqlcommand) {
$getuserinfo=$DB->query($sqlcommand);
while ($userinfo=$DB->fetch_array($getuserinfo)) {$user_cache[$userinfo['user_id']]=$userinfo;}
}
foreach($post_cache as $forumpost) {
if ($forum_style[0]==0 || ($forum_style[0]==1 && ($postid==$forumpost['forumpost_id'] || $postid==""))) {
$row=rowcolor($row);
if ($forumpost['forumpost_autorid']>0) $userinfo=$user_cache[$forumpost['forumpost_autorid']];
if ($userinfo['user_id']>0) {
if (isonline($userinfo['user_id'])) eval ("\$info_os= \"".getTemplate("member_os_online")."\";");
else eval ("\$info_os= \"".getTemplate("member_os_offline")."\";");
if ($userinfo['user_status']=='admin' && $userinfo['user_sex']=='w') eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_admin_w")."\";");
elseif ($userinfo['user_status']=='admin') eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_admin")."\";");
elseif ($userinfo['user_status']=="mod" && $userinfo['user_sex']=='w') eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_mod_w")."\";");
elseif ($userinfo['user_status']=="mod") eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_mod")."\";");
if ($userinfo['user_posts']==0) {
$postings=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_autorid='".$userinfo['user_id']."'"));
$DB->query("UPDATE ".$db_tab['user']." SET user_posts='".$postings[0]."' WHERE user_id='".$userinfo['user_id']."' LIMIT 1");
$userinfo['user_posts']=$postings[0];
}
$post_count=postcount($userinfo['user_posts'],$userinfo['user_postdelay'],0);
if (trim($userinfo['user_hpage'])!='') {
if (ereg("http://",$userinfo['user_hpage'])) $info_link=$userinfo['user_hpage'];
else $info_link='http://'.$userinfo['user_hpage'];
eval ("\$info_hpage= \"".getTemplate("forum/member_hpage_iconlink")."\";");
}
if ($userinfo['user_emailshow']==1) {
if ($config['member_mailer']==1) eval ("\$info_email= \"".getTemplate("forum/member_email_iconlink2")."\";");
else eval ("\$info_email= \"".getTemplate("forum/member_email_iconlink")."\";");
}
if ($userinfo['user_icqid']>0) eval ("\$info_icq= \"".getTemplate("forum/member_icq_iconlink")."\";");
if ($userinfo['user_imoption']==1) eval ("\$info_im= \"".getTemplate("forum/member_sendim_iconlink")."\";");
if ($config['avatar_eod']!=0 && $userinfo['user_avatar']!="" && filecheck($config['avatar_path'].'/'.$userinfo['user_avatar'])) {
$avatar_dimension=@getimagesize($config['avatar_path']."/".$userinfo['user_avatar']);
eval ("\$avatar_show= \"".getTemplate("user_avatar_show")."\";");
}
if ($USER['sigoption']!=0 && trim($userinfo['user_sig'])!='') {
$info_sig=$PARSE->parse($userinfo['user_sig'], 0,$config['text_ubb'],$config['text_smilies'],$config['text_images'],1);
eval ("\$info_sig= \"".getTemplate("member_signatur")."\";");
}
eval ("\$info_user= \"".getTemplate("forum/member_userinfo_iconlink")."\";");
eval ("\$post_autor= \"".getTemplate("forum/member_showprofil_textlink")."\";");
eval ("\$info_buddie= \"".getTemplate("forum/member_buddie_iconlink")."\";");
}
if (($forumthread['forumthread_status']==1 || $forumthread['forumthread_status']==2) && (getrights($forumcat['forumcat_wrights'])=="true" || userrights($forumcat['forumcat_mods'],$forumcat['forumcat_rrights'])=="true" || userrights($forumcat['forumcat_user'],$forumcat['forumcat_rrights'])=="true")) eval ("\$quote_answer=\"".getTemplate("forum/showthread_quote")."\";");
if (($forumpost['forumpost_autorid']==$USER['id'] && $USER['id']>0 && ($forumthread['forumthread_status']==1 || $forumthread['forumthread_status']==2)) || userrights($forumcat['forumcat_mods'])=="true") eval ("\$post_edit= \"".getTemplate("forum/showthread_edit")."\";");
if ($forumpost['forumpost_icon']!='') {
$post_icon="icons/".$forumpost['forumpost_icon'];
eval ("\$post_icon= \"".getTemplate("forum/showthread_row_posticon")."\";");
}
if ($post_autor=='') {
eval ("\$info_os= \"".getTemplate("guest_os_icon")."\";");
$post_autor=htmlentities($forumpost['forumpost_autor']);
$post_count=$lang['guest'];
}
if ($forumpost['forumpost_editcount']>0) {
$edit_time=formattime($forumpost['forumpost_edittime']);
eval ("\$edit_message= \"".getTemplate("forum/showthread_row_editmessage")."\";");
}
if (userrights($forumcat['forumcat_mods'])=="true") eval ("\$post_ip= \"".getTemplate("forum/showthread_ip")."\";");
else eval ("\$post_ip= \"".getTemplate("forum/showthread_report")."\";");
$post_time=formattime($forumpost['forumpost_time']);
$post_title=htmlentities($forumpost['forumpost_title']);
$post_text=$PARSE->parse($forumpost['forumpost_text'],0,$forumpost['forumpost_bbcode'],$forumpost['forumpost_smilies'],$config['forum_image'],1);
$info_signin=formattime($userinfo['signin'],'','date');
if ($userinfo['logtime']>0) {$info_logtime=formattime($userinfo['logtime']);} else {$userinfo_logtime=" - ";}
if ($userinfo['user_sex']=="w") $info_sex=$lang['female'];
elseif ($userinfo['user_sex']=="m") $info_sex=$lang['male'];
else $info_sex=$lang['not_specified'];
$info_birthday.=$lang['age'].": ".getAge($userinfo[user_bd_day],$userinfo[user_bd_month],$userinfo[user_bd_year]);
$userfields=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['userfields']." WHERE userid='".$userinfo['user_id']."' LIMIT 1"));
$info_extended='';
$getprofilefields=$DB->query("SELECT * FROM ".$db_tab['profilefields']." ORDER by profilefields_order DESC");
while ($profilefields=$DB->fetch_array($getprofilefields)) {
$f="field_".$profilefields['profilefields_id'];
if (($fieldcontent=htmlentities($userfields[$f]))=='') $fieldcontent=$lang['not_specified'];
$fieldname=$profilefields['profilefields_name'];
}
$userfields=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['userfields']." WHERE userid='".$userinfo['user_id']."' LIMIT 1"));
$info_extended='';
$getprofilefields=$DB->query("SELECT * FROM ".$db_tab['profilefields']." ORDER by profilefields_order ASC");
while ($profilefields=$DB->fetch_array($getprofilefields)) {
$f="field_".$profilefields['profilefields_id'];
if (($fieldcontent=htmlentities($userfields[$f]))=='') $fieldcontent=$lang['not_specified'];
$fieldname=$profilefields['profilefields_name'];
}
// *** Punktesystem Pro *** Start ***
$psp_info = $DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['psp_config'].""));
$psp_punkte="";
if ($userinfo['user_id']!=0 && $psp_info['psp_aktiv']==1) {
$psp_punkte="".$userinfo['psp_punkte']." ".$psp_info['psp_waehrung']."";
}
// *** Punktesystem Pro *** Ende ***
eval ("\$showthread_row.= \"".getTemplate("forum/showthread_row")."\";");
if ($y<$forumpost['forumpost_time']) {
$x=$forumpost['forumpost_threadid'];
$y=$forumpost['forumpost_time'];
}
unset($avatar_show);
unset($post_icon);
unset($info_sig);
unset($post_autor_status);
unset($edit_time);
unset($post_count);
unset($post_autor);
unset($info_os);
unset($userinfo);
unset($post_edit);
unset($info_user);
unset($info_email);
unset($info_im);
unset($info_hpage);
unset($info_icq);
unset($info_buddie);
unset($edit_message);
unset($post_ip);
unset($info_birthday);
if ($forum_style[0]==1) {break;}
}
}
$i=$isreaded_thread_id[$x];
if ($y>$i[1]) $HTTP_SESSION_VARS['isreaded_thread_id'][$x]=$_SESSION['isreaded_thread_id'][$x]=$isreaded_thread_id[$x]=array($x,$y);
if ($forum_style[0]==1) {
foreach($post_cache as $forumpost) {
if (!$postid>0) $postid=$firstpost['forumpost_id'];
if ($forumpost['forumpost_autorid']>0) $userinfo=$user_cache[$forumpost['forumpost_autorid']];
if ($userinfo['user_id']>0) eval ("\$post_autor= \"".getTemplate("forum/member_showprofil_textlink")."\";");
if ($post_autor=='') {
$post_autor=$forumpost['forumpost_autor'];
$post_count=$lang['guest'];
}
if ($forumpost['forumpost_title']=='') $forumpost['forumpost_title']=$firstpost['forumpost_title'];
if ($forumpost['forumpost_id']!=$firstpost['forumpost_id']) {
eval ("\$tree_spacer= \"".getTemplate("forum/showthread_tree_row_spacer")."\";");
if ($forumpost['forumpost_reply']>0) {
$replyto=$forumpost['forumpost_reply'];
while ($replyto>0) {
eval ("\$tree_spacer.= \"".getTemplate("forum/showthread_tree_row_iconline")."\";");
$id=$post_cache[$replyto];
$replyto=$id['forumpost_reply'];
}
}
}
if ($forumpost['forumpost_icon']!='') {
$post_icon='icons/'.$forumpost['forumpost_icon'];
eval ("\$post_icon= \"".getTemplate("forum/showthread_tree_row_posticon")."\";");
}
else eval ("\$post_icon= \"".getTemplate("forum/showthread_tree_row_icondir")."\";");
$post_time=formattime($forumpost['forumpost_time']);
if ($postid==$forumpost['forumpost_id']) eval ("\$showthread_tree_row.= \"".getTemplate("forum/showthread_tree_row_highlight")."\";");
else eval ("\$showthread_tree_row.= \"".getTemplate("forum/showthread_tree_row")."\";");
unset($post_time);
unset($post_autor);
unset($tree_spacer);
unset($id);
}
eval ("\$showthread_tree= \"".getTemplate("forum/showthread_tree")."\";");
}
else $sidelink=sidelinkfull($postcount[0],$forumcat['forumcat_posts'],$entries,'include.php?path=forum/showthread.php&threadid='.$forumthread['forumthread_id'],'sitebodysmall');
if ($forumthread['forumthread_status']==1) $thread_statusinfo=$lang['open'];
elseif ($forumthread['forumthread_status']==2) $thread_statusinfo=$lang['fixed'];
elseif ($forumthread['forumthread_status']==3) $thread_statusinfo=$lang['fixed'].' & '.$lang['closed'];
else $thread_statusinfo=$lang['closed'];
if ($USER['sigoption']==1) {$setsig=0; $sigoption=$lang['hide'];}
else {$setsig=1; $sigoption=$lang['show'];}
if ($forum_style[0]==1) eval ("\$board_style= \"".getTemplate("forum/showthread_boardstyle_board")."\";");
else eval ("\$board_style= \"".getTemplate("forum/showthread_boardstyle_tree")."\";");
if ($USER['id']>0) {
eval ("\$add_favorit= \"".getTemplate("forum/showthread_addfavorit")."\";");
if (userrights($forumcat['forumcat_mods'])=="true") {
if (is_array($forumcat_cache_byname)) {
foreach($forumcat_cache_byname as $catinfo) {
if ((getrights($catinfo['forumcat_rrights'])=="true" || userrights($catinfo['forumcat_mods'],$catinfo['forumcat_rrights'])=="true" || userrights($catinfo['forumcat_user'],$catinfo['forumcat_rrights'])=="true") && $catinfo['forumcat_id']!=$catid) eval ("\$quickmod_catlist.= \"".getTemplate("forum/showthread_quickmod_option")."\";");
}
}
eval ("\$showthread_quickmod= \"".getTemplate("forum/showthread_quickmod")."\";");
eval ("\$thread_moderate= \"".getTemplate("forum/showthread_moderate")."\";");
}
}
if ($forumthread['forumthread_votetitle']!='') {
unset($showthread_vote_rows);
unset($row);
unset($i);
$getforumvote=$DB->query("SELECT * FROM ".$db_tab['forumvote']." WHERE forumvote_threadid='".$threadid."' ORDER by forumvote_id ASC");
while($forumvote=$DB->fetch_array($getforumvote)) {
$i=$i+$forumvote['forumvote_count'];
$forumvote_cache[]=$forumvote;
}
if (is_array($forumvote_cache)) {
foreach ($forumvote_cache as $forumvote) {
$row=rowcolor($row);
if ($i>0) $forumvote_percent=number_format((($forumvote['forumvote_count']*100)/$i),0,",",".");
else $forumvote_percent=0;
$vote_answer=stripslashes(htmlentities($forumvote['forumvote_answer']));
eval ("\$showthread_vote_rows.= \"".getTemplate("forum/showthread_vote_row")."\";");
unset($vote_answer);
unset($forumvote_percent);
}
}
if ($showthread_vote_rows) {
$showthread_vote_title=htmlentities($forumthread['forumthread_votetitle']);
eval ("\$showthread_vote= \"".getTemplate("forum/showthread_vote")."\";");
}
}
$removeto=urlencode($current_path);
eval ("\$site_body.= \"".getTemplate("forum/showthread")."\";");
}
}
else {$event=1; include ("admin/config/event.php");}
include ("forum/fuss.php");
| |  |
|
|
|
|
|
|
|
 |
|
 |
31.03.2014 - 19:01 Uhr |
|
|
|
Du (oder wer auch immer dir den Code gab) versuchst in der PHP-Datei mit einer Schleife (=dynamisch) die Profilfelder zu verarbeiten - dazu das ganze sogar zweimal  ; und im Template wird dies statisch, also fest, integriert. Das sind zwei Sachen die sich beißen ôo
Das geht so nicht. Du must in der PHP-Datei innerhalb der Schleife entweder die Ausgabe direkt eintragen oder einer anderen Datei übergeben, z.B. einen Template.
Bspw. so:
- forum/showthread.php
- Öffne o.g. Datei und suche das:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | | PHP-Quelltext $userfields=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['userfields']." WHERE userid='".$userinfo['user_id']."' LIMIT 1"));
$info_extended='';
$getprofilefields=$DB->query("SELECT * FROM ".$db_tab['profilefields']." ORDER by profilefields_order DESC");
while ($profilefields=$DB->fetch_array($getprofilefields)) {
$f="field_".$profilefields['profilefields_id'];
if (($fieldcontent=htmlentities($userfields[$f]))=='') $fieldcontent=$lang['not_specified'];
$fieldname=$profilefields['profilefields_name'];
}
$userfields=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['userfields']." WHERE userid='".$userinfo['user_id']."' LIMIT 1"));
$info_extended='';
$getprofilefields=$DB->query("SELECT * FROM ".$db_tab['profilefields']." ORDER by profilefields_order ASC");
while ($profilefields=$DB->fetch_array($getprofilefields)) {
$f="field_".$profilefields['profilefields_id'];
if (($fieldcontent=htmlentities($userfields[$f]))=='') $fieldcontent=$lang['not_specified'];
$fieldname=$profilefields['profilefields_name'];
} | |  |
Und mach daraus das:
| PHP-Quelltext $userfields=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['userfields']." WHERE userid='".$userinfo['user_id']."' LIMIT 1"));
$info_extended='';
$getprofilefields=$DB->query("SELECT * FROM ".$db_tab['profilefields']." ORDER by profilefields_order ASC");
while ($profilefields=$DB->fetch_array($getprofilefields)) {
$f="field_".$profilefields['profilefields_id'];
if (($fieldcontent=htmlentities($userfields[$f]))=='') $fieldcontent=$lang['not_specified'];
$fieldname=$profilefields['profilefields_name'];
eval ("\$post_profilefields.= \"".getTemplate("forum/showthread_row_profilefields")."\";");
} | |
- templates/forum/showthread_row.htm
- Öffne o.g. Datei und suche das:
| Quellcode <tr>
<td><font class="small">Postleitzahl:$fieldcontent</font>
</td>
</tr>
<tr>
<td><font class="small">Wohnort:$fieldcontent2</font>
</td>
</tr> | |
Und mache daraus das:
| Quellcode $post_profilefields | |
- templates/forum/showthread_row_profilefields.htm
- Erstelle o.g. Datei (kopier eine andere und benenn sie wie oben um) und füge folgenden Inhalt ein:
| Quellcode <tr>
<td><span class="small">$fieldname:$fieldcontent</span></td>
</tr> | |
Wenn alles gut geht sollte es funktionieren 
|
|
|
|
|
|
|
 |
|
 |
01.04.2014 - 15:57 Uhr |
|
|
|
Wenn ich alles so mache wie´s beschrieben war geht es nicht so ganz Anhang beigefügt sind bilder unterschiedlich um zu zeigen wie´s aussieht
Hier noch die editierten Dateien
showthread.php
Hier klicken zum aufklappen 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | | PHP-Quelltext
<?php
include ("forum/kopf.php");
if (!$threadid>0) {header ("location: include.php?path=forum/main.phpsession_id()); exit();}
elseif ((getrights($forumcat['forumcat_rrights'])=="true" || userrights($forumcat['forumcat_mods'],$forumcat['forumcat_rrights'])=="true" || userrights($forumcat['forumcat_user'],$forumcat['forumcat_rrights'])=="true")) {
if ($forumthread['forumthread_title']!='') $config['site_title'].=" - ".$forumthread['forumthread_title'];
if (userrights($forumcat['forumcat_mods'])=="true" && $_POST['actionmod']=="Go" && isset($_POST['quick_mod']) && $_POST['quick_mod']!="-1") {
$quick_mod=$_POST['quick_mod'];
if ($quick_mod=='cs0' || $quick_mod=='cs1' || $quick_mod=='cs2' || $quick_mod=='cs3') {
if ($quick_mod=='cs0') $cs=0;
elseif ($quick_mod=='cs1') $cs=1;
elseif ($quick_mod=='cs2') $cs=2;
elseif ($quick_mod=='cs3') $cs=3;
$DB->query("UPDATE ".$db_tab['forumthread']." SET forumthread_status='".$cs."' WHERE forumthread_id='".$threadid."'");
}
elseif (intval($quick_mod)>0) $DB->query("UPDATE ".$db_tab['forumthread']." SET forumthread_catid='".$quick_mod."' WHERE forumthread_id='".$threadid."'");
elseif ($quick_mod=="del") {header("location: include.php?path=forum/moderate.php&threadid=".$threadid."&alter_delete=1session_id()); exit();}
header("location: include.php?path=forum/showthread.php&threadid=".$threadid."session_id()); exit();
}
if (intval($_REQUEST['entries'])>0) $entries=$_REQUEST['entries'];
else $entries=0;
if (isset($_REQUEST['postid'])) {
$postid=$_REQUEST['postid'];
if ($postid=='new') $sqlcommand="AND forumpost_time>'".$posttime."' ORDER by forumpost_time ".$config['forum_postorder'];
elseif ($postid=='last') $sqlcommand="ORDER by forumpost_time DESC";
else $sqlcommand=" AND forumpost_id='".intval($postid)."'";
$info=$DB->fetch_array($DB->query("SELECT forumpost_time, forumpost_id FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' ".$sqlcommand." LIMIT 1"));
if ($info['forumpost_id']>0) {
if ($config['forum_postorder']=='ASC') $sqlcommand='<';
else $sqlcommand='>';
$cinfo=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_time".$sqlcommand."='".$info['forumpost_time']."' AND forumpost_threadid='".$threadid."'"));
if ($cinfo[0]>$forumcat['forumcat_posts']) {
$entries=0;
while (($entries+$forumcat['forumcat_posts'])<$cinfo[0]) {
$entries=$entries+$forumcat['forumcat_posts'];
}
}
if ($forum_style[0]!=1) {header ("location: include.php?path=forum/showthread.php&threadid=".$threadid."&entries=".$entries."session_id()."#post".$info['forumpost_id']); exit();}
}
else unset($postid);
}
$postcount=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."'"));
$replycount=$postcount[0]-1;
if (!$postcount[0]>0 && !$catid) {header("location: include.php?path=fourm/main.phpsession_id()); exit();}
elseif (!$postcount[0]>0 && $catid>0) {header("location: include.php?path=fourm/showcat.php&catid=".$catid."session_id()); exit();}
elseif ($postcount[0]>0) {
if (!eregi("forum/showthread.php&threadid=".$threadid."",$record_referer)) {
$lastpost=$DB->fetch_array($DB->query("SELECT forumpost_autor, forumpost_autorid, forumpost_time FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' ORDER by forumpost_time DESC LIMIT 1"));
$DB->query("UPDATE ".$db_tab['forumthread']." SET forumthread_viewcount=forumthread_viewcount+1,forumthread_replycount='".$replycount."', forumthread_lastreply_autor='".$lastpost['forumpost_autor']."',forumthread_lastreply_autorid='".$lastpost['forumpost_autorid']."',forumthread_lastreply_time='".$lastpost['forumpost_time']."' WHERE forumthread_id='".$threadid."'");
}
if ($postcount[0]!=1) {$s="s";}
if ($user_id!=0) {
$newpost=$DB->fetch_array($DB->query("SELECT forumpost_id FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$threadid."' AND forumpost_time>'".$posttime."' ORDER by forumpost_time ASC LIMIT 1"));
if ($newpost['forumpost_id']>0) eval ("\$newpostlink= \"".getTemplate("forum/showthread_newpostlink")."\";");
}
if ($forum_style[0]!=1) $sqlcommand=" LIMIT ".$entries.", ".$forumcat['forumcat_posts'];
else unset($sqlcommand);
$getforumpost=$DB->query("SELECT * FROM ".$db_tab['forumpost']." WHERE forumpost_threadid='".$forumthread['forumthread_id']."' ORDER by forumpost_time ".$config['forum_postorder'].$sqlcommand);
unset($firstpost);
unset($sqlcommand);
while ($forumpost=$DB->fetch_array($getforumpost)) {
$post_cache[$forumpost['forumpost_id']]=$forumpost;
if (!$firstpost) $firstpost=$forumpost;
if ($forumpost['forumpost_autorid']>0) {
if ($sqlcommand) $sqlcommand.=" OR user_id='".$forumpost['forumpost_autorid']."'";
else $sqlcommand="SELECT * FROM ".$db_tab['user']." WHERE user_id='".$forumpost['forumpost_autorid']."'";
}
}
if ($sqlcommand) {
$getuserinfo=$DB->query($sqlcommand);
while ($userinfo=$DB->fetch_array($getuserinfo)) {$user_cache[$userinfo['user_id']]=$userinfo;}
}
foreach($post_cache as $forumpost) {
if ($forum_style[0]==0 || ($forum_style[0]==1 && ($postid==$forumpost['forumpost_id'] || $postid==""))) {
$row=rowcolor($row);
if ($forumpost['forumpost_autorid']>0) $userinfo=$user_cache[$forumpost['forumpost_autorid']];
if ($userinfo['user_id']>0) {
if (isonline($userinfo['user_id'])) eval ("\$info_os= \"".getTemplate("member_os_online")."\";");
else eval ("\$info_os= \"".getTemplate("member_os_offline")."\";");
if ($userinfo['user_status']=='admin' && $userinfo['user_sex']=='w') eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_admin_w")."\";");
elseif ($userinfo['user_status']=='admin') eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_admin")."\";");
elseif ($userinfo['user_status']=="mod" && $userinfo['user_sex']=='w') eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_mod_w")."\";");
elseif ($userinfo['user_status']=="mod") eval ("\$post_autor_status= \"".getTemplate("forum/showthread_userstatus_mod")."\";");
if ($userinfo['user_posts']==0) {
$postings=$DB->fetch_array($DB->query("SELECT COUNT(*) FROM ".$db_tab['forumpost']." WHERE forumpost_autorid='".$userinfo['user_id']."'"));
$DB->query("UPDATE ".$db_tab['user']." SET user_posts='".$postings[0]."' WHERE user_id='".$userinfo['user_id']."' LIMIT 1");
$userinfo['user_posts']=$postings[0];
}
$post_count=postcount($userinfo['user_posts'],$userinfo['user_postdelay'],0);
if (trim($userinfo['user_hpage'])!='') {
if (ereg("http://",$userinfo['user_hpage'])) $info_link=$userinfo['user_hpage'];
else $info_link='http://'.$userinfo['user_hpage'];
eval ("\$info_hpage= \"".getTemplate("forum/member_hpage_iconlink")."\";");
}
if ($userinfo['user_emailshow']==1) {
if ($config['member_mailer']==1) eval ("\$info_email= \"".getTemplate("forum/member_email_iconlink2")."\";");
else eval ("\$info_email= \"".getTemplate("forum/member_email_iconlink")."\";");
}
if ($userinfo['user_icqid']>0) eval ("\$info_icq= \"".getTemplate("forum/member_icq_iconlink")."\";");
if ($userinfo['user_imoption']==1) eval ("\$info_im= \"".getTemplate("forum/member_sendim_iconlink")."\";");
if ($config['avatar_eod']!=0 && $userinfo['user_avatar']!="" && filecheck($config['avatar_path'].'/'.$userinfo['user_avatar'])) {
$avatar_dimension=@getimagesize($config['avatar_path']."/".$userinfo['user_avatar']);
eval ("\$avatar_show= \"".getTemplate("user_avatar_show")."\";");
}
if ($USER['sigoption']!=0 && trim($userinfo['user_sig'])!='') {
$info_sig=$PARSE->parse($userinfo['user_sig'], 0,$config['text_ubb'],$config['text_smilies'],$config['text_images'],1);
eval ("\$info_sig= \"".getTemplate("member_signatur")."\";");
}
eval ("\$info_user= \"".getTemplate("forum/member_userinfo_iconlink")."\";");
eval ("\$post_autor= \"".getTemplate("forum/member_showprofil_textlink")."\";");
eval ("\$info_buddie= \"".getTemplate("forum/member_buddie_iconlink")."\";");
}
if (($forumthread['forumthread_status']==1 || $forumthread['forumthread_status']==2) && (getrights($forumcat['forumcat_wrights'])=="true" || userrights($forumcat['forumcat_mods'],$forumcat['forumcat_rrights'])=="true" || userrights($forumcat['forumcat_user'],$forumcat['forumcat_rrights'])=="true")) eval ("\$quote_answer=\"".getTemplate("forum/showthread_quote")."\";");
if (($forumpost['forumpost_autorid']==$USER['id'] && $USER['id']>0 && ($forumthread['forumthread_status']==1 || $forumthread['forumthread_status']==2)) || userrights($forumcat['forumcat_mods'])=="true") eval ("\$post_edit= \"".getTemplate("forum/showthread_edit")."\";");
if ($forumpost['forumpost_icon']!='') {
$post_icon="icons/".$forumpost['forumpost_icon'];
eval ("\$post_icon= \"".getTemplate("forum/showthread_row_posticon")."\";");
}
if ($post_autor=='') {
eval ("\$info_os= \"".getTemplate("guest_os_icon")."\";");
$post_autor=htmlentities($forumpost['forumpost_autor']);
$post_count=$lang['guest'];
}
if ($forumpost['forumpost_editcount']>0) {
$edit_time=formattime($forumpost['forumpost_edittime']);
eval ("\$edit_message= \"".getTemplate("forum/showthread_row_editmessage")."\";");
}
if (userrights($forumcat['forumcat_mods'])=="true") eval ("\$post_ip= \"".getTemplate("forum/showthread_ip")."\";");
else eval ("\$post_ip= \"".getTemplate("forum/showthread_report")."\";");
$post_time=formattime($forumpost['forumpost_time']);
$post_title=htmlentities($forumpost['forumpost_title']);
$post_text=$PARSE->parse($forumpost['forumpost_text'],0,$forumpost['forumpost_bbcode'],$forumpost['forumpost_smilies'],$config['forum_image'],1);
$info_signin=formattime($userinfo['signin'],'','date');
if ($userinfo['logtime']>0) {$info_logtime=formattime($userinfo['logtime']);} else {$userinfo_logtime=" - ";}
if ($userinfo['user_sex']=="w") $info_sex=$lang['female'];
elseif ($userinfo['user_sex']=="m") $info_sex=$lang['male'];
else $info_sex=$lang['not_specified'];
$info_birthday.=$lang['age'].": ".getAge($userinfo[user_bd_day],$userinfo[user_bd_month],$userinfo[user_bd_year]);
$userfields=$DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['userfields']." WHERE userid='".$userinfo['user_id']."' LIMIT 1"));
$info_extended='';
$getprofilefields=$DB->query("SELECT * FROM ".$db_tab['profilefields']." ORDER by profilefields_order ASC");
while ($profilefields=$DB->fetch_array($getprofilefields)) {
$f="field_".$profilefields['profilefields_id'];
if (($fieldcontent=htmlentities($userfields[$f]))=='') $fieldcontent=$lang['not_specified'];
$fieldname=$profilefields['profilefields_name'];
eval ("\$post_profilefields.= \"".getTemplate("forum/showthread_row_profilefields")."\";");
}
// *** Punktesystem Pro *** Start ***
$psp_info = $DB->fetch_array($DB->query("SELECT * FROM ".$db_tab['psp_config'].""));
$psp_punkte="";
if ($userinfo['user_id']!=0 && $psp_info['psp_aktiv']==1) {
$psp_punkte="".$userinfo['psp_punkte']." ".$psp_info['psp_waehrung']."";
}
// *** Punktesystem Pro *** Ende ***
eval ("\$showthread_row.= \"".getTemplate("forum/showthread_row")."\";");
if ($y<$forumpost['forumpost_time']) {
$x=$forumpost['forumpost_threadid'];
$y=$forumpost['forumpost_time'];
}
unset($avatar_show);
unset($post_icon);
unset($info_sig);
unset($post_autor_status);
unset($edit_time);
unset($post_count);
unset($post_autor);
unset($info_os);
unset($userinfo);
unset($post_edit);
unset($info_user);
unset($info_email);
unset($info_im);
unset($info_hpage);
unset($info_icq);
unset($info_buddie);
unset($edit_message);
unset($post_ip);
unset($info_birthday);
if ($forum_style[0]==1) {break;}
}
}
$i=$isreaded_thread_id[$x];
if ($y>$i[1]) $HTTP_SESSION_VARS['isreaded_thread_id'][$x]=$_SESSION['isreaded_thread_id'][$x]=$isreaded_thread_id[$x]=array($x,$y);
if ($forum_style[0]==1) {
foreach($post_cache as $forumpost) {
if (!$postid>0) $postid=$firstpost['forumpost_id'];
if ($forumpost['forumpost_autorid']>0) $userinfo=$user_cache[$forumpost['forumpost_autorid']];
if ($userinfo['user_id']>0) eval ("\$post_autor= \"".getTemplate("forum/member_showprofil_textlink")."\";");
if ($post_autor=='') {
$post_autor=$forumpost['forumpost_autor'];
$post_count=$lang['guest'];
}
if ($forumpost['forumpost_title']=='') $forumpost['forumpost_title']=$firstpost['forumpost_title'];
if ($forumpost['forumpost_id']!=$firstpost['forumpost_id']) {
eval ("\$tree_spacer= \"".getTemplate("forum/showthread_tree_row_spacer")."\";");
if ($forumpost['forumpost_reply']>0) {
$replyto=$forumpost['forumpost_reply'];
while ($replyto>0) {
eval ("\$tree_spacer.= \"".getTemplate("forum/showthread_tree_row_iconline")."\";");
$id=$post_cache[$replyto];
$replyto=$id['forumpost_reply'];
}
}
}
if ($forumpost['forumpost_icon']!='') {
$post_icon='icons/'.$forumpost['forumpost_icon'];
eval ("\$post_icon= \"".getTemplate("forum/showthread_tree_row_posticon")."\";");
}
else eval ("\$post_icon= \"".getTemplate("forum/showthread_tree_row_icondir")."\";");
$post_time=formattime($forumpost['forumpost_time']);
if ($postid==$forumpost['forumpost_id']) eval ("\$showthread_tree_row.= \"".getTemplate("forum/showthread_tree_row_highlight")."\";");
else eval ("\$showthread_tree_row.= \"".getTemplate("forum/showthread_tree_row")."\";");
unset($post_time);
unset($post_autor);
unset($tree_spacer);
unset($id);
}
eval ("\$showthread_tree= \"".getTemplate("forum/showthread_tree")."\";");
}
else $sidelink=sidelinkfull($postcount[0],$forumcat['forumcat_posts'],$entries,'include.php?path=forum/showthread.php&threadid='.$forumthread['forumthread_id'],'sitebodysmall');
if ($forumthread['forumthread_status']==1) $thread_statusinfo=$lang['open'];
elseif ($forumthread['forumthread_status']==2) $thread_statusinfo=$lang['fixed'];
elseif ($forumthread['forumthread_status']==3) $thread_statusinfo=$lang['fixed'].' & '.$lang['closed'];
else $thread_statusinfo=$lang['closed'];
if ($USER['sigoption']==1) {$setsig=0; $sigoption=$lang['hide'];}
else {$setsig=1; $sigoption=$lang['show'];}
if ($forum_style[0]==1) eval ("\$board_style= \"".getTemplate("forum/showthread_boardstyle_board")."\";");
else eval ("\$board_style= \"".getTemplate("forum/showthread_boardstyle_tree")."\";");
if ($USER['id']>0) {
eval ("\$add_favorit= \"".getTemplate("forum/showthread_addfavorit")."\";");
if (userrights($forumcat['forumcat_mods'])=="true") {
if (is_array($forumcat_cache_byname)) {
foreach($forumcat_cache_byname as $catinfo) {
if ((getrights($catinfo['forumcat_rrights'])=="true" || userrights($catinfo['forumcat_mods'],$catinfo['forumcat_rrights'])=="true" || userrights($catinfo['forumcat_user'],$catinfo['forumcat_rrights'])=="true") && $catinfo['forumcat_id']!=$catid) eval ("\$quickmod_catlist.= \"".getTemplate("forum/showthread_quickmod_option")."\";");
}
}
eval ("\$showthread_quickmod= \"".getTemplate("forum/showthread_quickmod")."\";");
eval ("\$thread_moderate= \"".getTemplate("forum/showthread_moderate")."\";");
}
}
if ($forumthread['forumthread_votetitle']!='') {
unset($showthread_vote_rows);
unset($row);
unset($i);
$getforumvote=$DB->query("SELECT * FROM ".$db_tab['forumvote']." WHERE forumvote_threadid='".$threadid."' ORDER by forumvote_id ASC");
while($forumvote=$DB->fetch_array($getforumvote)) {
$i=$i+$forumvote['forumvote_count'];
$forumvote_cache[]=$forumvote;
}
if (is_array($forumvote_cache)) {
foreach ($forumvote_cache as $forumvote) {
$row=rowcolor($row);
if ($i>0) $forumvote_percent=number_format((($forumvote['forumvote_count']*100)/$i),0,",",".");
else $forumvote_percent=0;
$vote_answer=stripslashes(htmlentities($forumvote['forumvote_answer']));
eval ("\$showthread_vote_rows.= \"".getTemplate("forum/showthread_vote_row")."\";");
unset($vote_answer);
unset($forumvote_percent);
}
}
if ($showthread_vote_rows) {
$showthread_vote_title=htmlentities($forumthread['forumthread_votetitle']);
eval ("\$showthread_vote= \"".getTemplate("forum/showthread_vote")."\";");
}
}
$removeto=urlencode($current_path);
eval ("\$site_body.= \"".getTemplate("forum/showthread")."\";");
}
}
else {$event=1; include ("admin/config/event.php");}
include ("forum/fuss.php");
?>
| |  |
Hier die showthread_row.htm
|
|
|
|
|
|
|
 |
|
 |
01.04.2014 - 17:59 Uhr |
|
|
|
Wieso ist in deinen Template das?
| Quellcode <tr>
<td><font class="small">Postleitzahl:$post_profilefields</font>
</td>
</tr>
<tr>
<td><font class="small">Wohnort:$post_profilefields</font>
</td>
</tr> | |
Schmeis das raus und ersetz es durch das:
| Quellcode $post_profilefields | |
Die Variable $post_profilefields gibt dann das Template templates/forum/showthread_row.htm aus, welcher am Ende die Profilfelder wiedergibt.
Und was das andere Problem angeht:
Suche mal das:
| PHP-Quelltext $info_extended=''; | |
Und mache daraus das:
| PHP-Quelltext $post_profilefields=NULL; | |
Dann sollten die Einträge nur noch einmal erscheinen ôo
|
|
|
|
|
|
|
 |
|
 |
03.04.2014 - 14:23 Uhr |
|
|
|
Jo paßt. danke dir für deine hilfe.
|
|
|
|
|
|
|
 |
Ähnliche Themen |
|
|
|
|
|
|
|
|