Post
Topic
Board Meta
Merits 2 from 1 user
Re: [BRAINSTORM] Any requests for custom extensions/user scripts for BitcoinTalk?
by
Initscri
on 22/06/2019, 18:57:28 UTC
⭐ Merited by LoyceV (2)
~snip

Good job man! You're fast.

What system/PHP version are you running?

I tried running on my local system. When you pull merit.all.txt, is it showing spaces for you, or tabs? For me, locally, it's showing tabs, so the top had to be changed to the following.

Code:
$url = "http://loyce.club/Merit/merit.all.txt";
$file = file($url);
$file = str_replace("\t", ",", $file);
$file = str_replace("\r\n", "",$file);

I'm not sure why there's a difference, perhaps it's environmental. But, I'd maybe switch to a regex to permit both spaces/tabs just in case.

Also, the return null; within the functions aren't allowing the table to be finished semantically (no ), so I'd drop those, or move the echo up.

Code:
echo "";
return null;

For todos, it's probably a good idea to accept no parameters as well, combining the script to allow the user to specify a output method (JSON, or table format)

I can help out providing modifications to your code, but I wanna grab your permission first. Your code after all.

Good job though, and thanks!