Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3909028
D1173.id2997.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1173.id2997.diff
View Options
diff --git a/gadgets/motd-variations.php b/gadgets/motd-variations.php
--- a/gadgets/motd-variations.php
+++ b/gadgets/motd-variations.php
@@ -1,10 +1,23 @@
<!-- Actions -->
- <div id="action-icons"><a href="" title="Refresh this page"><i class="general foundicon-refresh"></i></a></div>
+ <div id="action-icons">
+ <a href="" title="Refresh this page">
+ <i class="general foundicon-refresh"></i>
+ </a>
+ </div>
<!-- Content -->
<?php
- $content = `/home/dereckson/public_html/variants.tcl`;
- $pos1 = strpos($content, '<h2>');
- $pos2 = strpos($content, '</body>');
- $content = str_replace('<h2>', '<h3>', $content);
- echo substr($content, $pos1, $pos2 - $pos1);
+ $fortune = rtrim(`/usr/games/fortune`);
+ echo " <h3>English text</h3>\n";
+ echo " <p>$fortune</p>\n\n";
+
+ $variants = [
+ 'jive',
+ 'valspeak',
+ ];
+
+ foreach ($variants as $variant) {
+ echo " <h3>English variant — $variant</h3>\n";
+ $text = escapeshellarg($fortune);
+ echo " <p>", rtrim(`echo $text | $variant`), "</p>\n\n";
+ }
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 17:58 (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2306505
Default Alt Text
D1173.id2997.diff (1 KB)
Attached To
Mode
D1173: Switch gadgets/motd-variations to pure PHP
Attached
Detach File
Event Timeline
Log In to Comment