Shoutbox: Get the timestamp form the client's browser July 28, 2014 06:30PM |
Registered: 9 years ago Posts: 10 |
Re: Shoutbox: Get the timestamp form the client's browser July 30, 2014 05:59AM |
Admin Registered: 13 years ago Posts: 4,680 |
Re: Shoutbox: Get the timestamp form the client's browser July 31, 2014 10:47PM |
Registered: 9 years ago Posts: 10 |
clienttimestamp =os.environ["SHOUTBOX_CLIENT_TIMESTAMP"]in psogen.py only works when I add the variable to the env file in the directory /conf/lighttpd. I tried to change the generate_lighttpd_env() function in generate_config_files.sh so that the variable will be added to the env file, but it didn't work.
generate_lighttpd_env() { local GLOBAL_CHAT=$1 local GLOBAL_DEST="$2" local PYTHONPATH=$3 local SHOUTBOX_GEN_HTMLFILE=$4 local PIRATEBOX=$5 local SHOUTBOX_CHATFILE=$6 local SHOUTBOX_CLIENT_TIMESTAMP=$7 echo "Generating Environment-config for lighttpd ....." LIGHTTPD_ENV_BR_LINE="" if [ "$GLOBAL_CHAT" = "yes" ] ; then LIGHTTPD_ENV_BR_LINE=" \"SHOUTBOX_BROADCAST_DESTINATIONS\" => \"$GLOBAL_DEST\" , " fi LIGHTTPD_ENV="setenv.add-environment = ( \"PYTHONPATH\" => \"$PYTHONPATH:$PIRATEBOX/python_lib\", \"SHOUTBOX_GEN_HTMLFILE\" => \"$SHOUTBOX_GEN_HTMLFILE\" , \"SHOUTBOX_CHATFILE\" => \"$SHOUTBOX_CHATFILE\" , \"SHOUTBOX_CLIENT_TIMESTAMP\" => \"$SHOUTBOX_CLIENT_TIMESTAMP\" , $LIGHTTPD_ENV_BR_LINE )" echo $LIGHTTPD_ENV > $LIGHTTPD_ENV_CONFIG } ... generate_lighttpd_env $GLOBAL_CHAT "$GLOBAL_DEST" $PIRATEBOX_PYTHONPATH $GEN_CHATFILE $PIRATEBOX_FOLDER $CHATFILE $SHOUTBOX_CLIENT_TIMESTAMP
export SHOUTBOX_CLIENT_TIMESTAMP=$SHOUTBOX_CLIENT_TIMESTAMPto the shoutbox_stuff.sh file and
SHOUTBOX_CLIENT_TIMESTAMP="no"to the piratebox.conf file.
Re: Shoutbox: Get the timestamp form the client's browser August 04, 2014 05:37PM |
Admin Registered: 13 years ago Posts: 4,680 |