Anyone here familiar with smarty templates?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scroto
    Confirmed User
    • Nov 2005
    • 2804

    #1

    Anyone here familiar with smarty templates?

    Just curious if anyone might be able to assist. Been googling my ass off and no real luck so far lol

    Basically what I'm trying to do is add the atx trade script codes. One in the header and one in footer. Nothing works, it's just blank.. doesn't print anything.

    tried all these..
    {include file='myfile.html'}

    {php}my code..{/php}

    {fileinc file="path/to/file"}

    the atx codes:
    Code:
    for the footer
    <?php
    
    include 'top50.html';
    
    ?>
    
     
    for the header
    <?php virtual ("/cgi-bin/atx/in.cgi"); ?>
  • Scroto
    Confirmed User
    • Nov 2005
    • 2804

    #2
    bump for me

    Comment

    • munki
      Do Fun Shit.
      • Dec 2004
      • 13393

      #3
      Originally posted by Scroto
      Just curious if anyone might be able to assist. Been googling my ass off and no real luck so far lol

      Basically what I'm trying to do is add the atx trade script codes. One in the header and one in footer. Nothing works, it's just blank.. doesn't print anything.

      tried all these..
      {include file='myfile.html'}

      {php}my code..{/php}

      {fileinc file="path/to/file"}

      the atx codes:
      Code:
      for the footer
      <?php
      
      include 'top50.html';
      
      ?>
      
       
      for the header
      <?php virtual ("/cgi-bin/atx/in.cgi"); ?>
      Try...

      Code:
      {literal}
      <?php include 'top50.html' ?>
      {/literal}
      
      {literal}
      <?php virtual ("/cgi-bin/atx/in.cgi"); ?>
      {/literal}
      If smartys still has php parsing on, should work.

      I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

      Comment

      • Scroto
        Confirmed User
        • Nov 2005
        • 2804

        #4
        Originally posted by munki
        Try...

        Code:
        {literal}
        <?php include 'top50.html' ?>
        {/literal}
        
        {literal}
        <?php virtual ("/cgi-bin/atx/in.cgi"); ?>
        {/literal}
        If smartys still has php parsing on, should work.
        just sends the code without parsing it

        I also tried
        {php}
        include('path/to/file');
        {/php}

        The header i found a temp solution, I just added the code into some php that was already in the header template right at the end. lol

        I suppose if all else, I'll iframe the top list..

        Comment

        • TheDoc
          Too lazy to set a custom title
          • Jul 2001
          • 13827

          #5
          Originally posted by Scroto
          Just curious if anyone might be able to assist. Been googling my ass off and no real luck so far lol

          Basically what I'm trying to do is add the atx trade script codes. One in the header and one in footer. Nothing works, it's just blank.. doesn't print anything.

          tried all these..
          {include file='myfile.html'}

          {php}my code..{/php}

          {fileinc file="path/to/file"}

          the atx codes:
          Code:
          for the footer
          <?php
          
          include 'top50.html';
          
          ?>
          
           
          for the header
          <?php virtual ("/cgi-bin/atx/in.cgi"); ?>
          I think if you use include file, then the file has to be in the smarty/templates directory. It doesn't take the full path because it pulls from the smarty dir.
          {include file="somefile.tpl"}

          {include_php file='full/path/to/cgi.file'}

          I don't know if include_php will work, but I can include html, tpl, and php without issue doing it this way. Maybe it will work with the atx path and file.
          ~TheDoc - ICQ7765825
          It's all disambiguation

          Comment

          • Scroto
            Confirmed User
            • Nov 2005
            • 2804

            #6
            Originally posted by TheDoc
            I think if you use include file, then the file has to be in the smarty/templates directory. It doesn't take the full path because it pulls from the smarty dir.
            {include file="somefile.tpl"}

            {include_php file='full/path/to/cgi.file'}

            I don't know if include_php will work, but I can include html, tpl, and php without issue doing it this way. Maybe it will work with the atx path and file.
            yeah that's what I was thinking as well, no joy though.

            the place where i add the code just shows up blank like i didnt add it at all (when i view source)

            Comment

            • Scroto
              Confirmed User
              • Nov 2005
              • 2804

              #7
              may sound odd, but it worked like this

              {include file='../../top50.html'}

              Comment

              Working...