Skip to content

Commit 47ded17

Browse files
NeertiZomgPonies
authored andcommitted
Changes the wiki proc to accept player input to reach a specific page, or search for one if the wiki can't find it.
You can use it by typing 'wiki [query]' in the command box, for example 'wiki cult' brings up the cult guide, or clicking the wiki button at the top-right and typing what you want to look for. It uses wikiurl, so other servers should be compilable, if they change their wikiurl. Conflicts: interface/interface.dm
1 parent ac68d07 commit 47ded17

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Diff for: code/controllers/configuration.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777
var/server
7878
var/banappeals
79-
var/wikiurl = "http://baystation12.net/wiki/index.php?title=Main_Page"
79+
var/wikiurl = "http://baystation12.net/wiki"
8080
var/forumurl = "http://baystation12.net/forums/"
8181

8282
var/media_base_url = "http://80.244.78.90/media" // http://ss13.nexisonline.net/media

Diff for: interface/interface.dm

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
//Please use mob or src (not usr) in these procs. This way they can be called in the same fashion as procs.
2-
/client/verb/wiki()
2+
/client/verb/wiki(query as text)
33
set name = "wiki"
4-
set desc = "Visit the wiki."
4+
set desc = "Type what you want to know about. This will open the wiki on your web browser."
55
set hidden = 1
6-
if( config.wikiurl )
7-
if(alert("This will open the wiki in your browser. Are you sure?",,"Yes","No")=="No")
8-
return
9-
src << link(config.wikiurl)
6+
if(config.wikiurl)
7+
if(query)
8+
var/output = config.wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
9+
src << link(output)
10+
else
11+
src << link(config.wikiurl)
1012
else
11-
src << "\red The wiki URL is not set in the server configuration."
13+
src << "<span class='danger'>The wiki URL is not set in the server configuration.</span>"
1214
return
1315

1416
#define CHANGELOG "http://80.244.78.90/phpBB3/viewtopic.php?f=10&t=36"

0 commit comments

Comments
 (0)