How can I make my Wiki have random titles in the browser title bar?
A simple PHP hack, my dear Watson!
Inspired by a FireFox plugin that amusingly changes the browser title every time one starts the browser, to names such as "StormUnicorn" and "IcePanda", I decided to see if I could do something similar for my Wiki.
This plugin takes a selection of titles (ie, for
$WikiTitle, which is displayed in the browser bar) from a wiki page, Main.RandomTitle and chooses one at random each time a page is loaded or reloaded.
Example: http://54wiki.aenertia.net <== Dead Link 8/25/11
Notes and Comments
- This recipe was last tested on PmWiki version: 2.0beta37
- This recipe requires at least PmWiki version: ? I suspect it will work with most recent versions.
- I am a php newbie! Use this at your own risk!
And place it in the cookbook directory.
Create a page in your wiki, Main.RandomTitle. Fill it with titles, starting every title with two asterisks (**).
Open up config.php in an editor.
Comment out this line by placing ##'s in front of it:
$WikiTitle = "My Wiki";
So it now reads:
## $WikiTitle = "My Wiki";
Now add this line:
See if it works!
- Option to have a new random title on each session, rather than each page load/reload
- Option to have a new random title once a day, rather than every load/reload
MrAwesome - Contact me for feedback, problems, suggestions, etc.