TheGodFather Extensions 2
Bible, Dictionaries, Horoscopes, Jokes, Haiku
All extensions require version 20.09+. An extension is a separate PHP file that TheGodFather calls when a keyword match is found in a message. All extensions are set to work with FGC=https://YOUR-URL.COM/path-to-file.php
(in the Phrases box of the subset) which tells TheGodFather to make the call internally using php-curl
or file_get_contents
. A redirection is another option if the extension file is on the same server: RDR=https://YOUR-URL.COM/path-to-file.php
. In case you want to change the keywords - any change in AdminCP ยป Machines ยป TheGodFather ยป {subset} requires adjusting the code of the extension file.
TIP! It would be easier to maintain your extensions if you put the files in a separate folder outside the chat folder. The extensions that require a connection to a MySQL database - import the tables in a separate database (all extensions in one database is ok). The tables are large and you don't need to make regular backups as they don't change.
The Good Book
Description
- TheGodFather replies with a verse from the Bible when requested
- TheGodFather replies with a cross-reference from the Bible if a key to a verse is found
- TheGodFather provides a hint how to request a verse when the name of any book is found
How it works
- You: Romans 2:2 ยป TheGodFather: (Romans 2:2) And we know that the judgment of God is according to truth against them that practise such things.
- You: ...as Paul says in Romans 3:4... ยป TheGodFather: (Psalm 51:4) Against thee, thee only, have I sinned, And done that which is evil in thy sight; That thou mayest be justified when thou speakest, And be clear when thou judgest.
- You: What about Samuel? ยป TheGodFather: Any verse from the Bible can be displayed with the following syntax: Revelation 1:1 Deuteronomy 6:1-2 2 Corinthians 1:1-5. When the same is found in a message a cross-reference is returned.
How to install
It is recommended to use a separate MySQL database. bible-mysql.sql
and cross_reference-mysql.sql
can be downloaded from this GitHub repo or bible-mysql. You have to import bible-mysql.sql
and cross_reference-mysql.sql
in the MySQL database using phpMyAdmin or Adminer.
Import SQL files with Adminer
method 1: select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS] ยป Browse... ยป Execute
method 2: (an alternative for big files) select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS], upload the .sql file as adminer.sql
then Run file.
-
Download The Good Book, unzip, set MySQL database credentials in the PHP file (Database name, MySQL user & password) and review the other settings at the beginning of the file and upload
tgf_thegoodbook.php
to your server. -
AdminCP ยป Machines ยป TheGodFather ยป New Subset ยป Subset ยป IMPORT
- Replace Triggered in the PM box for the selected userID with the actual userID of TheGodFather
- Replace
https://YOUR-URL.COM/tgf_thegoodbook.php
with the proper URL (subset ยป Phrases). - Save with OKAY
Horoscopes
Description
TheGodFather replies with the horoscope of the day. The syntax is: horoscope aquarius or horoscope libra tomorrow or horoscope gemini 2 where 2 is the day after tomorrow and values between 0 and 6 are accepted (0 = today).
How it works
You: horoscope aquarius tomorrow ยป TheGodFather: Aquarius ๐บ October 7th, Thursday โก You need to let certain people know that you no longer care what they say or what they do. That might sound a bit extreme but if you don't do it now they will keep annoying you and make an even bigger falling-out more likely later on.
How to install
It is recommended to use a separate MySQL database. Download Horoscopes MySQL Data. You have to import horoscope.sql.gz
in the MySQL database using phpMyAdmin or Adminer.
Import SQL files with Adminer
method 1: select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS] ยป Browse... ยป Execute
method 2: (an alternative for big files) select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS], upload the .sql.gz file as adminer.sql.gz
then Run file.
-
Download Horoscopes, unzip, set MySQL database credentials in the PHP file (Database name, MySQL user & password) and upload
tgf_horoscope.php
to your server. -
AdminCP ยป Machines ยป TheGodFather ยป New Subset ยป Subset ยป IMPORT
- Replace
https://YOUR-URL.COM/tgf_horoscope.php
with the proper URL (subset ยป Phrases). - Save with OKAY
Jokes
Description
TheGodFather replies with a random joke from all jokes or from a category.
How it works
- You: joke ยป TheGodFather: I was teaching my 6-year-old daughter how to unbuckle her seat belt. She asked, "Do I click the square?" I said yes. She then asked me, "Single click or double click?" ๐คฃ๐คฃ๐คฃ found in Children
- You: joke animals ยป TheGodFather: What does the lion say to his friends before they go out hunting for food? "Let us prey." ๐คฃ๐คฃ๐คฃ found in Animals
How to install
It is recommended to use a separate MySQL database. Download Jokes MySQL. You have to import jokes.sql.gz
in the MySQL database using phpMyAdmin or Adminer.
Import SQL files with Adminer
method 1: select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS] ยป Browse... ยป Execute
method 2: (an alternative for big files) select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS], upload the .sql.gz file as adminer.sql.gz
then Run file.
-
Download Jokes, unzip, set MySQL database credentials in the PHP file (Database name, MySQL user & password) and upload
tgf_jokes.php
to your server. -
AdminCP ยป Machines ยป TheGodFather ยป New Subset ยป Subset ยป IMPORT
- Replace
https://YOUR-URL.COM/tgf_jokes.php
with the proper URL (subset ยป Phrases). - Save with OKAY
Webster Dictionary
Description
TheGodFather replies with a definition from Webster's Revised Unabridged Dictionary 1913.
How it works
You: define boat ยป TheGodFather: boat (n.) A small open vessel, or water craft, usually moved by cars or paddles, but often by a sail.
How to install
It is recommended to use a separate MySQL database. Download Webster MySQL. You have to import webster.sql.gz
in the MySQL database using phpMyAdmin or Adminer.
Import SQL files with Adminer
method 1: select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS] ยป Browse... ยป Execute
method 2: (an alternative for big files) select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS], upload the .sql.gz file as adminer.sql.gz
then Run file.
-
Download Webster Dictionary, unzip, set MySQL database credentials in the PHP file (Database name, MySQL user & password) and upload
tgf_webster.php
to your server. -
AdminCP ยป Machines ยป TheGodFather ยป New Subset ยป Subset ยป IMPORT
- Replace
https://YOUR-URL.COM/tgf_webster.php
with the proper URL (subset ยป Phrases). - Save with OKAY
Wordset Dictionary
Description
TheGodFather replies with results from WordSet.org (abandoned project).
How it works
- You: describe hell ยป TheGodFather: hell (noun) means any place of pain and turmoil. Synonym: snake pit, inferno, hell on earth, hellhole Example: the hell of battle
- You: synonym hell ยป TheGodFather: hell = snake pit, inferno, hell on earth, hellhole
How to install
It is recommended to use a separate MySQL database. Download Wordset MySQL. You have to import wordset.sql.gz
in the MySQL database using phpMyAdmin or Adminer.
Import SQL files with Adminer
method 1: select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS] ยป Browse... ยป Execute
method 2: (an alternative for big files) select target database from the drop-down menu ยป Import [uncheck STOP ON ERRORS], upload the .sql.gz file as adminer.sql.gz
then Run file.
-
Download Wordset Dictionary, unzip, set MySQL database credentials in the PHP file (Database name, MySQL user & password) and upload
tgf_wordset.php
to your server. -
AdminCP ยป Machines ยป TheGodFather ยป New Subset ยป Subset ยป IMPORT
- Replace
https://YOUR-URL.COM/tgf_wordset.php
with the proper URL (subset ยป Phrases). - Save with OKAY
Haiku
Description
Returns a random haiku from a list of 5000.
How it works
- You: haiku ยป TheGodFather: obsidian night | the white sound | of rain
How to install
- Download Haiku.
- Unzip and upload
tgf_haiku.php
andtgf_haiku.txt
to your server. - AdminCP ยป Machines ยป TheGodFather ยป New Subset ยป Subset ยป IMPORT
- Replace
https://YOUR-URL.COM/tgf_haiku.php
with the proper URL (subset ยป Phrases). - Save with OKAY
Pure Fun
Description
Returns a funny phrase (input: row number, random or input) from a list (tgf_purefun.txt) without showing the input.
This extension requires version 22.01 and the following stopword in AdminCP ยป Machines:
/purefun
How it works
- Number: You: /purefun 12 ยป TheGodFather: I always say "Morning" instead of "Good morning" โ if it were a good morning, I'd still be sleeping and not talking to people!
- Random: You: /purefun ยป TheGodFather: After millions of years of evolution, you're kind of a disappointment.
- Input: You: /purefun Oh, that's hellish! ยป TheGodFather: Oh, that's hellish!
How to install
- Download Pure Fun.
- Unzip and upload
tgf_purefun.php
andtgf_purefun.txt
to your server. - AdminCP ยป Machines ยป TheGodFather ยป New Subset ยป Subset ยป IMPORT
- Replace
https://YOUR-URL.COM/tgf_purefun.php
with the proper URL (subset ยป Phrases). - Save with OKAY