forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: h3lium on January 14, 2005, 06:45:16 pm
-
hello,
first of all sorry for my english ;-) i'm a german, but i try to do my best...
im currently working on a guestbook for my gallery.
everything is working, exept of one thing, the user have to enter their names manually.
thats what i want to change.
but i dont know how to get the username.
does somebody know how to handle that?
i just need to set the current variable ($name - which the user have to fill in by a form) to the variable of the gallery...
it would be very cool if somebody could help me, cuz spend many hours for this allready :)
greeting
christian
-
this has been asked only recently - search the forum (for "guestbook").
Joachim
-
sorry, i allready searched, and tried it again now, but i didnt found anything that could match...
thats also why i registered :) , usually i try to find anything befor i register...
in SMF (simply machines forum) its just a simple thing. like "$context['user']['name']"
and thats it...
is there nothing like this in coopermine?
-
If you can include init.inc.php then you have USER_NAME available. If you can't include it then you can use the authentication mod to give you the same.
-
i included it...
- require('include/init.inc.php');
and i'm using "$user['user_name']" but that doesn't work ...
i dont know why :(
-
Because there is no such variable! - that's why I said to use USER_NAME :)
-
that doesnt work too :(
i donna why...
here is a small part of the code:
...
<tr>
<td><b>';
echo 'Name:';
echo'</b></td>
<td>';
echo $USER_NAME;
echo'</td>
</tr>
<tr>
...
require('include/init.inc.php');
-
I don't understand why you refuse to use USER_NAME
<?
define('IN_COPPERMINE', 1);
include 'include/init.inc.php';
echo USER_NAME;
?>
-
uff...
now its working... :) thanks alot!!!
you really helped me!
problem is solved :)
greetings
chris
-
you just found out what a php constant is ;) - see http://www.php.net/manual/en/language.constants.php
Joachim