=> ๐Ÿ‘ฝ drunkpigeon

Honestly, I want to know how you people make guestbooks on here. I want to get into scripting to make my sites more interesting, but don't know where to start.

2 years ago ยท ๐Ÿ‘ jo, gritty, anthrax, alexlehm

Actions

=> ๐Ÿ‘‹ Join Station

5 Replies

=> ๐Ÿ‘ฝ alexlehm

I have started cgi-bin with Gemini using PHP recently and I have written a very small feedback script, a guestbook would be easy as well ยท 2 years ago

=> ๐Ÿ‘ฝ gritty

Gemini://tilde.team/~tomasino/journal/20220308-how-to-build-a-gemini-application.gmi ยท 2 years ago

=> Gemini://tilde.team/~tomasino/journal/20220308-how-to-build-a-gemini-application.gmi

=> ๐Ÿ‘ฝ jo

oh dont forget the # before the first line ofc, idk why it threw that out ยท 2 years ago

=> ๐Ÿ‘ฝ jo

!/bin/bash

guestbookfile=/path/to/file

address=gemini://redirect.address

decode_percent_encoding(){

echo "$1" | sed 's@+@ @g;s@%@\x@g' | xargs -0 printf "%b"

}

if [[ "$QUERY_STRING" != "" ]]; then

message=$(decode_percent_encoding "$QUERY_STRING")

sed -i.bak -e "/โœ sign/a>"$message"\n- at $(date +'%H:%M on %d.%m.%Y')\n

" "$guestbookfile" #replace 'โœ sign' with the line you wanna start the guestbook under

printf "30 $address\r\n" #redirect link

else

printf "10 leave a message\r\n" #input field

fi ยท 2 years ago

=> gemini://redirect.address

=> ๐Ÿ‘ฝ jo

oh i can help with that! i asked pretty much the same question on here a few months ago and its actually really not that hard. for a guestbook script youll need a capsule with cgi-support, i'm not sure how this works on yesterweb sadly but i can comment the script to my own, very basic guestbook hold on ยท 2 years ago

Proxy Information
Original URL
gemini://station.martinrue.com/drunkpigeon/b8c15f8dab894b5ba77b47241972b7d0
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
180.89751 milliseconds
Gemini-to-HTML Time
1.378297 milliseconds

This content has been proxied by September (3851b).