That PHP I posted should output a whole ton of formatted HTML that fully describes your HTML setup. Sounds to me like your server doesn't have PHP installed. Either that or the web server is not configured properly.

    and what's the url of the file where you put that code I posted?

      OK yes your server handles PHP properly (you should probably take that test.php file down so hackers don't come sniffing around).

      I was just trying to understand what you mean when you said "i just see code".

      Sounds like PHPNuke takes the code in your PHP file and somehow intercepts it rather than just outputting it. That seems really weird to me, but I don't know how PHPNuke works. I recommend you find their forum and ask there. You'll probably have better luck.

      Another possibility is that you just add the javascript widget to your header or footer. Or start reading your source code to find out what the heck is going on.

        Ok, thanks for your time. Phpnuke forums have no clue.

        Ill take your advice and try the header, thank you for your time and patience with this.

          One thing occurs to me...what filename are you using for these files you are writing this PHP in? Are you saving them as filename.php or filename.txt or some other extension?

            I am naming them .php My last attempt was block-twitter.php.

            Just to be sure...... this code is correct?

            <?php
            if (!eregi("modules.php", $PHP_SELF)) {
            die ("You can't access this file directly...");

            }
            require_once("mainfile.php");
            $module_name = basename(dirname(FILE));
            get_lang($module_name);
            include("header.php");
            $index = 0;
            OpenTable();
            echo"<script src=\"http://widgets.twimg.com/j/2/widget.js\"></script>"
            . "script>"
            . "ew TWTR.Widget({"
            . " version: 2,"
            . " type: 'profile',"
            . " rpp: 4,"
            . " interval: 6000,"
            . " width: 'auto',"
            . " height: 300,"
            . " theme: {"
            . " shell: {"
            . " background: '#11a7ed',"
            . " color: '#000000'"
            . " },"
            . " tweets: {"
            . " background: '#ffffff',"
            . " color: '#000000',"
            . " links: '#11a7ed'"
            . " }"
            . " },"
            . " features: {"
            . " scrollbar: false,"
            . " loop: false,"
            . " live: false,"
            . " hashtags: true,"
            . " timestamp: true,"
            . " avatars: false,"
            . " behavior: 'all'"
            . " }"
            . ").render().setUser('ArmedBadgerCom').start();"
            . "/script>";
            CloseTable();
            include("footer.php");

            ?>

            And if I remove the include for the header and footer, I should the be able to insert it into my header?

            Again, thank you for your help!

              Not being familiar with PHPNuke, I have no idea what any of that code is going to do in the context of PHPNuke. You haven't been very specific about your file structure, and I know so little about PHPNuke that I'm not going to be helpful. For example, I don't see you accessing any block-twitter.php file directly so I'm guessing that it's some how included from some other PHPNuke which I haven't seen.

              As I'm sure you know, trying to [man]echo[/man] something with all kinds of comments in it is a pain in the ass. You might try something like this

              <?php
              // i am block-twitter.php
              // note the javascript is after the closing PHP tag:
              ?>
              <script src="http://widgets.twimg.com/j/2/widget.js"></script>
              <script>
              new TWTR.Widget({
              version: 2,
              type: 'profile',
              rpp: 4,
              interval: 6000,
              width: 'auto',
              height: 300,
              theme: {
              shell: {
              background: '#11a7ed',
              color: '#000000'
              },
              tweets: {
              background: '#ffffff',
              color: '#000000',
              links: '#11a7ed'
              }
              },
              features: {
              scrollbar: false,
              loop: false,
              live: false,
              hashtags: true,
              timestamp: true,
              avatars: false,
              behavior: 'all'
              }
              }).render().setUser('ArmedBadgerCom').start();
              </script>
              

                I would create a block from within phpnuke. I would the call for block-twitter.php to be the content for that block.

                If you look at the site the news, userinfo, polls and all the other content are inside what phpnuke calls blocks. At the very bottom and left of the page is the first code you gave me. It is in a block-test.php. I then created the test box and called the block-test.php. You can see the results.

                I need a shower and some food. I will add your code to the header in about an 1/2 hour.

                Really, thank you so much for your time and help.

                  I'd say your problem has nothing to do with PHP and everything to do with PHP-Nuke. The 'phpinfo' part that is showing up on your index looks like the code is being translated into HTML-safe text (e.g. '<' becomes '&lt;', line breaks become "<br>", etc.) and then inserted into part of the template.

                  I don't know how you added that code, nor do I know how PHP-Nuke works, but my guess is that you're attempting to use PHP code in a template area of PHP-Nuke that is expecting plain text.

                    You are a GOD. I will sacrifice cans in Coke Zero in your honor! It had to be my code.

                    I simply took your code and created block-twitter.php and called for it in my twitter box and IT WORKS!

                    I did the same thing I've been doing for hours and hours and hours, but this time I used you fixed code.

                    My deepest and most heartfelt thanks to you!

                      Write a Reply...