1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Styling and Customization Questions' started by Numenorean7, Jul 25, 2013.

  1. Numenorean7

    Numenorean7 Member

    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!
     
  2. Brentnauer

    Brentnauer Well-Known Member

    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.
     
  3. Brentnauer

    Brentnauer Well-Known Member

    You may have to escape the / characters; my PHP is rusty and limited.
     
  4. Brentnauer

    Brentnauer Well-Known Member

  5. EQnoble

    EQnoble Well-Known Member

    Where is your chat tab being created from, manually, from an addon?
     
  6. Brentnauer

    Brentnauer Well-Known Member

    He's using XenHabla
     
    Numenorean7 likes this.

Share This Page