XF 1.1 Include the content of a few characters HTML file.

I'm trying to include the number which comes from the following page, into a phrase if that's possible:
http://usercount.geekshed.net/?chan=paranormalis&noimage

It would allow me to make my Chat tab look like this: Chat (4), if there are 4 people in the chat channel.

If I'm not going to do it with the phrase, would there be a way to do it in a template?

Thanks!

Put this somewhere in your navigation tab templates:

PHP:
$chaturl = “http://usercount.geekshed.net\?chan=paranormalis&noimage”;
$chatcount = file_get_contents($chaturl);

Then edit your chat tab template and add (<php print $chatcount ?>) after the call to the Chat phrase.

Untested, but should work.
 
Put this somewhere in your navigation tab templates:

PHP:
$chaturl = “http://usercount.geekshed.net\?chan=paranormalis&noimage”;
$chatcount = file_get_contents($chaturl);

Then edit your chat tab template and add (<php print $chatcount ?>) after the call to the Chat phrase.

Untested, but should work.
You may have to escape the / characters; my PHP is rusty and limited.
 
I'm trying to include the number which comes from the following page, into a phrase if that's possible:
http://usercount.geekshed.net/?chan=paranormalis&noimage

It would allow me to make my Chat tab look like this: Chat (4), if there are 4 people in the chat channel.

If I'm not going to do it with the phrase, would there be a way to do it in a template?

Thanks!
Where is your chat tab being created from, manually, from an addon?
 
Top Bottom