Hi there!
I've installed this wonderful aplication but have a question about the forum part. I've set it as to be visible only for users that are loged in, but then I want their usernames to be in the forum. How do I do that? Now, all I get is "guest" all the time, and it doesn't look that nice
Username in forum posts
Hi frosin,
the forum is still under developement.
If you need one at this time, please use an other forum-prg. via IFrame.
Knut
the forum is still under developement.
If you need one at this time, please use an other forum-prg. via IFrame.
Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
Hi again... There is another way
I've been looking around a bit in the code and found a way to make this possible. First I've installed the mod_login by markoehl wich you can find here: http://www.phpwcms.de/forum/viewtopic.php?t=9696
Here is how it's done:
Add a new row in table _phpwcms_forum
forum_user varchar(100) NULL = Yes Standard=NULL
in /include/inc_front/content/cnt53.article.inc.php
Add the following to row 175
$sql_topic .= "forum_user = '" .$_SESSION["wcs_user_name"] . "'";
and change row 174 to
$sql_topic .= "forum_text = '".aporeplace($content['forum']['topic']['message'])."', ";
change row 297
$CNT_TMP .= html_specialchars($GLOBALS['FE_USER'][$row_t['forum_uid']]['login']).' </span></td>'."\n";
to
$CNT_TMP .= $row_t["forum_user"].' </span></td>'."\n";
Add the following to row 367
$sql_reply .= "forum_user = '".$_SESSION["wcs_user_name"]."'";
and change row 366 to
$sql_reply .= "forum_text = '".aporeplace($content['forum']['reply']['message'])."', ";
change row 485
$CNT_TMP .= html_specialchars($GLOBALS['FE_USER'][$row_t['forum_uid']]['login'])."</td>\n";
to
$CNT_TMP .= $row_f["forum_user"]."</td>\n";
change row 511
$CNT_TMP .= html_specialchars($GLOBALS['FE_USER'][$row_p['forum_uid']]['login'])."</td>\n";
to
$CNT_TMP .= $row_p["forum_user"]."</td>\n";
If you instead want the username (not the users name) use $_SESSION["wcs_user"] instead of $_SESSION["wcs_user_name"]
Good luck!
I've been looking around a bit in the code and found a way to make this possible. First I've installed the mod_login by markoehl wich you can find here: http://www.phpwcms.de/forum/viewtopic.php?t=9696
Here is how it's done:
Add a new row in table _phpwcms_forum
forum_user varchar(100) NULL = Yes Standard=NULL
in /include/inc_front/content/cnt53.article.inc.php
Add the following to row 175
$sql_topic .= "forum_user = '" .$_SESSION["wcs_user_name"] . "'";
and change row 174 to
$sql_topic .= "forum_text = '".aporeplace($content['forum']['topic']['message'])."', ";
change row 297
$CNT_TMP .= html_specialchars($GLOBALS['FE_USER'][$row_t['forum_uid']]['login']).' </span></td>'."\n";
to
$CNT_TMP .= $row_t["forum_user"].' </span></td>'."\n";
Add the following to row 367
$sql_reply .= "forum_user = '".$_SESSION["wcs_user_name"]."'";
and change row 366 to
$sql_reply .= "forum_text = '".aporeplace($content['forum']['reply']['message'])."', ";
change row 485
$CNT_TMP .= html_specialchars($GLOBALS['FE_USER'][$row_t['forum_uid']]['login'])."</td>\n";
to
$CNT_TMP .= $row_f["forum_user"]."</td>\n";
change row 511
$CNT_TMP .= html_specialchars($GLOBALS['FE_USER'][$row_p['forum_uid']]['login'])."</td>\n";
to
$CNT_TMP .= $row_p["forum_user"]."</td>\n";
If you instead want the username (not the users name) use $_SESSION["wcs_user"] instead of $_SESSION["wcs_user_name"]
Good luck!
update
I did not know about this post.
I did it in a different way. It works (and a lot more too)
check this:
No database update is necessary!
http://www.phpwcms.de/forum/viewtopic.php?t=13134
P.S.: Your problems reason: the first post is the "topic post" this post is formatted somewhere else in the code: right above where you changed things.
I did it in a different way. It works (and a lot more too)
check this:
No database update is necessary!
http://www.phpwcms.de/forum/viewtopic.php?t=13134
P.S.: Your problems reason: the first post is the "topic post" this post is formatted somewhere else in the code: right above where you changed things.
2008