Relay override help

Turtle

New member
I'm trying to customize my bUMRATS file a little bit to append some information to the Wormwood page so I can stop double checking the wiki to make sure I'm remembering which place to go. Using the town_right override as a template, I made:

Code:
void turtle_wormwood() {
	buffer results;
	results.append(visit_url());
	
	results.replace_string("</tbody></table><center>", "</tbody></table><center>Test Test Test <br> Test test test <br>");
	
	results.write();
}
and, of course,
Code:
case "wormwood.php":
	turtle_wormwood();
break;
But no changes are occurring on the page itself. I've done some changes with bumrats before, such as with the top menu and on the town_left and town_right pages, but this is eluding me.
 

slyz

Developer
Code:
> use 1 tiny bot abs

Using 1 tiny bottle of absinthe...
You acquire an effect: Absinthe-Minded (duration: 10 Adventures)
Finished using 1 tiny bottle of absinthe.

> ash contains_text( visit_url( "wormwood.php"), "</tbody></table><center>" );

Returned: false

Here is the HTML of wormwwod.php:
 

Attachments

  • wormwood.txt
    2.6 KB · Views: 39

StDoodle

Minion
The problem is that a lot of browsers, like firefox, will show you the "cleaned" version of a page's source, with no indication that it's been modified. So it will often insert <tbody> and </tbody> as well as fixing attributes that have no quotes in an element. It's best to use an alternate method of viewing the page source, sadly. :(
 

slyz

Developer
To view the HTML source, you can simply use this alias:

Code:
alias tohtml => ashq string[int]h; h[0]=visit_url("%%");map_to_file(h,"mafiahtml.txt");print("Done!","green");

Then you can simply do:
Code:
> tohtml wormwood.php

Done!
and check your /data folder for mafiahtml.txt. This method adds a 0 and a tab that you will need to remove if you want the text file to contain only the HTML.
 
Top