Ok, so I'm working on a redesign for my site http://www.mikhailtech.com and seeing as how I have no PHP skills (or time, as a full time college student), I'm using PHP-Nuke. You can see what I'm doing at http://test.mikhailtech.com. Can someone answer some of my noob questions? I understand modules are part of blocks and to change a module you modify the language .php file for that module, but how do you make your own (say to have a simple link in the nav bar)? Also, what's the difference between articles, sections, categories, topics, stories, etc? More questions to come, hope someone here can help as I can't find a bigger php forum.

    Not sure if you have been here but they have helped me alot.

    http://www.nukeforums.com/

    Modules are only part of the modules block. they can be removed, editted and moved within that block. to rename a module you need to rename the directory. at least in nuke 5 that is how it works.

    If you are using a Block all you have to do is put the code you want into the sample block that comes in phpnuke and anything you want to be displayed in the block has to be put in a variable called $content. anything you put in $content will be displayed on the page in a block.

    modules are a bit harder. I know you need to echo anything you want displayed. I have not figured them out entirely so I will not offer anymore on those although they do have a sample module in the package too.

      If you are using a Block all you have to do is put the code you want into the sample block that comes in phpnuke and anything you want to be displayed in the block has to be put in a variable called $content. anything you put in $content will be displayed on the page in a block.

      Ok, but doesn't that just create a separate block? I want to modify an existing block (like the navigation bar on the left) and add some links that are independent, like "Forums" for http://forums.mikhailtech.com. How do I do that?

      And I'm still confused on sections, articles, stories, content, categories, topics, etc. What's the difference between all those?

      I tried nukeforums.com but they're a lot slower at getting back to people.

      Any why should I not use PHP-Nuke no matter what? I've seen some very good sites developed from it, like http://www.bench-house.com.

        Thats the point, they didn't develop it, php nuke did

          If you are using a Block all you have to do is put the code you want into the sample block that comes in phpnuke and anything you want to be displayed in the block has to be put in a variable called $content. anything you put in $content will be displayed on the page in a block.

          The second I put HTML in there (or anything that's not normal text) I get parse a parse error. So it doesn't exactly work that way. Here's what I get whenever I tried to put in some <a href> tags.

          Parse error: parse error in /usr/local/psa/home/vhosts/test.mikhailtech.com/httpdocs/blocks/block-Sample_Block.php on line 20

            Okay i think i did say that wrong. sorry 🙁

            I have only built one block so i appologize.

            I built a block to parse a web page and display parts of that page inside a block. I put the php code in the block but the only part i had displayed was the variable that was the end result of the code that parsed the web page.

            does that make sense?

            over simplified example:

            <?php

            if (eregi("block-test.php", $PHP_SELF)) {
            Header("Location: index.php");
            die();
            }

            $display = "Now is the time for all good men to come to the aid of thier country";

            $content = "$display <a href=http://www.airforce.com/>Click Here</a>";

            ?>

            If you want to cut and paste to test it it does work. i just tried.
            I hope that helps.

              Thanks for the tip, but most of that was unnecessary. It turns out you can't use <a href="http://www.whatever.com">whatever</a> since the quotation marks screw up the quotes opening and closing the $content value. That makes sense. Glad to know I can use HTML in there though 🙂

                Write a Reply...