Loading ...
Sorry, an error occurred while loading the content.

Displaying headlines on .tpl file

Expand Messages
  • psgzone
    Hi guys. I m currently working with a coder to make news posting PHP script, but I have a tricky situation here because our news script is using .tpl for
    Message 1 of 7 , May 2, 2004
    • 0 Attachment
      Hi guys.

      I'm currently working with a coder to make news posting PHP
      script, but I have a tricky situation here because our news script
      is using .tpl for template. He said he used SMARTY template module
      or something but I have no idea what the heck that is. It looks
      like .tpl is same as .html and .tpl template works fine with the
      script he made. But the problem is I can't display the headlines
      from my php FORUM script. Those forum headlines have to be displayed
      on footer.tpl. I know how to include them on php page(footer.php),
      but I don't know what to do with tpl page(footer.tpl). Please let me
      know how I can display the PHP forum headlines on .tpl page.

      Thanks...
    • Dr Tarique Sani
      ... First read up on http://smarty.php.net ... Then tell us which Forum are you using Tarique
      Message 2 of 7 , May 2, 2004
      • 0 Attachment
        --- In in-phpug@yahoogroups.com, "psgzone" <ppk038@a...> wrote:
        First read up on http://smarty.php.net

        > script he made. But the problem is I can't display the headlines
        > from my php FORUM script. Those forum headlines have to be displayed

        Then tell us which Forum are you using

        Tarique
      • Nirav Mehta
        Hi, ... .tpl is a Smarty template file. Please refer to the Smarty manuals from http://smarty.php.net for more info on Smarty. You can not simply include a
        Message 3 of 7 , May 2, 2004
        • 0 Attachment
          Hi,

          > on footer.tpl. I know how to include them on php page(footer.php),
          > but I don't know what to do with tpl page(footer.tpl). Please let me
          > know how I can display the PHP forum headlines on .tpl page.

          .tpl is a Smarty template file. Please refer to the Smarty manuals from
          http://smarty.php.net for more info on Smarty.

          You can not simply include a .tpl file in PHP. You have to instantiate a
          Smarty class and then call the display() function with the name of the
          template to display it. Of course, you need to do assign() to set
          variables and a lot of other things based on your requirements.

          A look through the Smarty docs should clarify most of the things.

          HTH.

          Regards,
          Nirav
          ======================================================
          | GNU/Linux - Web Apps - Mobile Solutions - Flash |
          |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
          | tangible, customized solutions for your e-business |
          |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
          | http://www.magnet-i.com/ |
          ======================================================
        • webmaster@php-india.net
          Hi You dont need to put the variable in smarty and assign the value of fotter.php to it. If you have footer.php file then you can have couple of ways by which
          Message 4 of 7 , May 3, 2004
          • 0 Attachment
            Hi

            You dont need to put the variable in smarty and assign the value of fotter.php to it.
            If you have footer.php file then you can have couple of ways by which you can do this in samrty, like you can use all php function in smarty by defininng php tag eg. {php} require("footer.php");{/php} or for this specific reason you can also use smarty function like

            {* absolute path, or relative path*}
            {include_php file="fotter.php"}

            if you have template file to be include in fotter then it is quite simple
            {include file="footer.tpl"}

            Try

            all the best

            Chirag


            Nirav Mehta <nirav@...> wrote:
            Hi,

            > on footer.tpl. I know how to include them on php page(footer.php),
            > but I don't know what to do with tpl page(footer.tpl). Please let me
            > know how I can display the PHP forum headlines on .tpl page.

            .tpl is a Smarty template file. Please refer to the Smarty manuals from
            http://smarty.php.net for more info on Smarty.

            You can not simply include a .tpl file in PHP. You have to instantiate a
            Smarty class and then call the display() function with the name of the
            template to display it. Of course, you need to do assign() to set
            variables and a lot of other things based on your requirements.

            A look through the Smarty docs should clarify most of the things.

            HTH.

            Regards,
            Nirav
            ======================================================
            | GNU/Linux - Web Apps - Mobile Solutions - Flash |
            |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
            | tangible, customized solutions for your e-business |
            |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
            | http://www.magnet-i.com/ |
            ======================================================




            Read Posting Guidelines at
            http://groups.yahoo.com/group/in-phpug/files/guidelines.html



            ---------------------------------
            Yahoo! Groups Links

            To visit your group on the web, go to:
            http://groups.yahoo.com/group/in-phpug/

            To unsubscribe from this group, send an email to:
            in-phpug-unsubscribe@yahoogroups.com

            Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



            Webmaster
            www.php-india.net
            An endeavor to cheer PHP in India



            ---------------------------------
            Do you Yahoo!?
            Win a $20,000 Career Makeover at Yahoo! HotJobs

            [Non-text portions of this message have been removed]
          • psgzone
            Thanks for your help guys. But, I still don t understand clearly. I did check the Smarty homepage but I had no idea what the heck they re talking about... I m
            Message 5 of 7 , May 5, 2004
            • 0 Attachment
              Thanks for your help guys. But, I still don't understand clearly. I
              did check the Smarty homepage but I had no idea what the heck
              they're talking about... I'm not familiar with programming. All I
              know is the basic INCLUDE php tag to display headlines on .php file.
              That's all I know. Other than that, I just copy and paste the tags
              on readme.doc.

              I think this's the best way to show you guys some examples:

              This is the include tag that must go on top of the page(between
              <head></head>).

              <?
              $_zb_url = "http://www.mydomain.com/php-bin/bbs/";
              $_zb_path = "/path/to/php-bin/bbs/";
              include $_zb_path."outlogin.php";
              ?>

              And, this is "print_bbs" tag to display forum headlines.

              <? print_bbs("white/bb1", "Forum", "forum", 10, 12)?>

              If I put those tags on php file, everything works fine. But, I don't
              know what to do(how to change those) to make them work properly
              on .tpl... I think one of you guys talked about{php}{/php}...
              Actually, I've heard that before. But, I don't know how to use {php}
              tag. If possible, can you show me the sample?

              The main problem is I'm not used to with Smarty or tpl... I've only
              worked with scripts that have php extension templates. So, I'd like
              to know how hard it would be to replace Smarty template and tpl
              stuff to php extension templates I'm used to with... I've never
              heard of Smarty before so I didn't know Smarty uses its own template
              files. It sounds like I can solve this problem pretty easily, but
              please kindly let me know how I can solve it. I thought all of php
              scripts use php templates and this is an unexpected surprise to me.
              So, please help me guys.

              Thanks...



              --- In in-phpug@yahoogroups.com, "webmaster@p..." <php_love@y...>
              wrote:
              > Hi
              >
              > You dont need to put the variable in smarty and assign the value
              of fotter.php to it.
              > If you have footer.php file then you can have couple of ways by
              which you can do this in samrty, like you can use all php function
              in smarty by defininng php tag eg. {php} require("footer.php");
              {/php} or for this specific reason you can also use smarty function
              like
              >
              > {* absolute path, or relative path*}
              > {include_php file="fotter.php"}
              >
              > if you have template file to be include in fotter then it is quite
              simple
              > {include file="footer.tpl"}
              >
              > Try
              >
              > all the best
              >
              > Chirag
              >
              >
              > Nirav Mehta <nirav@m...> wrote:
              > Hi,
              >
              > > on footer.tpl. I know how to include them on php page
              (footer.php),
              > > but I don't know what to do with tpl page(footer.tpl). Please
              let me
              > > know how I can display the PHP forum headlines on .tpl page.
              >
              > .tpl is a Smarty template file. Please refer to the Smarty manuals
              from
              > http://smarty.php.net for more info on Smarty.
              >
              > You can not simply include a .tpl file in PHP. You have to
              instantiate a
              > Smarty class and then call the display() function with the name of
              the
              > template to display it. Of course, you need to do assign() to set
              > variables and a lot of other things based on your requirements.
              >
              > A look through the Smarty docs should clarify most of the things.
              >
              > HTH.
              >
              > Regards,
              > Nirav
              > ======================================================
              > | GNU/Linux - Web Apps - Mobile Solutions - Flash |
              > |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
              > | tangible, customized solutions for your e-business |
              > |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
              > | http://www.magnet-i.com/ |
              > ======================================================
              >
              >
              >
              >
              > Read Posting Guidelines at
              > http://groups.yahoo.com/group/in-phpug/files/guidelines.html
              >
              >
              >
              > ---------------------------------
              > Yahoo! Groups Links
              >
              > To visit your group on the web, go to:
              > http://groups.yahoo.com/group/in-phpug/
              >
              > To unsubscribe from this group, send an email to:
              > in-phpug-unsubscribe@yahoogroups.com
              >
              > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
              Service.
              >
              >
              >
              > Webmaster
              > www.php-india.net
              > An endeavor to cheer PHP in India
              >
              >
              >
              > ---------------------------------
              > Do you Yahoo!?
              > Win a $20,000 Career Makeover at Yahoo! HotJobs
              >
              > [Non-text portions of this message have been removed]
            • webmaster@php-india.net
              Hi Should be pretty simple, try this {php} $_zb_url = http://www.mydomain.com/php-bin/bbs/ ; $_zb_path = /path/to/php-bin/bbs/ ; include
              Message 6 of 7 , May 6, 2004
              • 0 Attachment
                Hi
                Should be pretty simple, try this

                {php}
                $_zb_url = "http://www.mydomain.com/php-bin/bbs/";
                $_zb_path = "/path/to/php-bin/bbs/";
                include $_zb_path."outlogin.php";

                {/php}

                If you php code is working fine then this should also work fine within tempate
                All the best

                Thanks
                Chirag




                psgzone <ppk038@...> wrote:
                Thanks for your help guys. But, I still don't understand clearly. I
                did check the Smarty homepage but I had no idea what the heck
                they're talking about... I'm not familiar with programming. All I
                know is the basic INCLUDE php tag to display headlines on .php file.
                That's all I know. Other than that, I just copy and paste the tags
                on readme.doc.

                I think this's the best way to show you guys some examples:

                This is the include tag that must go on top of the page(between
                <head></head>).

                <?
                $_zb_url = "http://www.mydomain.com/php-bin/bbs/";
                $_zb_path = "/path/to/php-bin/bbs/";
                include $_zb_path."outlogin.php";
                ?>

                And, this is "print_bbs" tag to display forum headlines.

                <? print_bbs("white/bb1", "Forum", "forum", 10, 12)?>

                If I put those tags on php file, everything works fine. But, I don't
                know what to do(how to change those) to make them work properly
                on .tpl... I think one of you guys talked about{php}{/php}...
                Actually, I've heard that before. But, I don't know how to use {php}
                tag. If possible, can you show me the sample?

                The main problem is I'm not used to with Smarty or tpl... I've only
                worked with scripts that have php extension templates. So, I'd like
                to know how hard it would be to replace Smarty template and tpl
                stuff to php extension templates I'm used to with... I've never
                heard of Smarty before so I didn't know Smarty uses its own template
                files. It sounds like I can solve this problem pretty easily, but
                please kindly let me know how I can solve it. I thought all of php
                scripts use php templates and this is an unexpected surprise to me.
                So, please help me guys.

                Thanks...



                --- In in-phpug@yahoogroups.com, "webmaster@p..." <php_love@y...>
                wrote:
                > Hi
                >
                > You dont need to put the variable in smarty and assign the value
                of fotter.php to it.
                > If you have footer.php file then you can have couple of ways by
                which you can do this in samrty, like you can use all php function
                in smarty by defininng php tag eg. {php} require("footer.php");
                {/php} or for this specific reason you can also use smarty function
                like
                >
                > {* absolute path, or relative path*}
                > {include_php file="fotter.php"}
                >
                > if you have template file to be include in fotter then it is quite
                simple
                > {include file="footer.tpl"}
                >
                > Try
                >
                > all the best
                >
                > Chirag
                >
                >
                > Nirav Mehta <nirav@m...> wrote:
                > Hi,
                >
                > > on footer.tpl. I know how to include them on php page
                (footer.php),
                > > but I don't know what to do with tpl page(footer.tpl). Please
                let me
                > > know how I can display the PHP forum headlines on .tpl page.
                >
                > .tpl is a Smarty template file. Please refer to the Smarty manuals
                from
                > http://smarty.php.net for more info on Smarty.
                >
                > You can not simply include a .tpl file in PHP. You have to
                instantiate a
                > Smarty class and then call the display() function with the name of
                the
                > template to display it. Of course, you need to do assign() to set
                > variables and a lot of other things based on your requirements.
                >
                > A look through the Smarty docs should clarify most of the things.
                >
                > HTH.
                >
                > Regards,
                > Nirav
                > ======================================================
                > | GNU/Linux - Web Apps - Mobile Solutions - Flash |
                > |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
                > | tangible, customized solutions for your e-business |
                > |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
                > | http://www.magnet-i.com/ |
                > ======================================================
                >
                >
                >
                >
                > Read Posting Guidelines at
                > http://groups.yahoo.com/group/in-phpug/files/guidelines.html
                >
                >
                >
                > ---------------------------------
                > Yahoo! Groups Links
                >
                > To visit your group on the web, go to:
                > http://groups.yahoo.com/group/in-phpug/
                >
                > To unsubscribe from this group, send an email to:
                > in-phpug-unsubscribe@yahoogroups.com
                >
                > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                Service.
                >
                >
                >
                > Webmaster
                > www.php-india.net
                > An endeavor to cheer PHP in India
                >
                >
                >
                > ---------------------------------
                > Do you Yahoo!?
                > Win a $20,000 Career Makeover at Yahoo! HotJobs
                >
                > [Non-text portions of this message have been removed]



                Read Posting Guidelines at
                http://groups.yahoo.com/group/in-phpug/files/guidelines.html


                Yahoo! Groups SponsorADVERTISEMENT


                ---------------------------------
                Yahoo! Groups Links

                To visit your group on the web, go to:
                http://groups.yahoo.com/group/in-phpug/

                To unsubscribe from this group, send an email to:
                in-phpug-unsubscribe@yahoogroups.com

                Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



                Webmaster
                www.php-india.net
                An endeavor to cheer PHP in India



                ---------------------------------
                Do you Yahoo!?
                Win a $20,000 Career Makeover at Yahoo! HotJobs

                [Non-text portions of this message have been removed]
              • webmaster@php-india.net
                Dear All Members, With the help of all the php lovers like you in India and around the world, we are growing considerably with site for php developers in
                Message 7 of 7 , May 10, 2004
                • 0 Attachment
                  Dear All Members,



                  With the help of all the php lovers like you in India and around the world, we are growing considerably with site for php developers in India.



                  After a year of successful launch of http://www.php-india.net/ to extend our commitment and devotion to php developers we are ready with next contribution to php development.



                  This is something different, new with the php development.



                  You can review it on following location



                  http://www.php-india.net/Akaar/



                  This is still under development and is at beta but you guys can surely have look at it. We are keen to get feedback from you.



                  Once again on first anniversary of http://www.php-india.net/ we take chance to convey our sincere thanks to all the php lovers in India and around the world.





                  We promise to continue our contribution to this great community.



                  Thanks



                  Chirag








                  Webmaster
                  www.php-india.net
                  An endeavor to cheer PHP in India



                  ---------------------------------
                  Do you Yahoo!?
                  Win a $20,000 Career Makeover at Yahoo! HotJobs

                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.