Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Converting PHP to Html?

    Hello,

    I have this little piece of php code and was wondering if anyone knew some good converters or knows how. I am rather new at this but would like this to be used in a little project of mine.

    Any insight or help would be great.

    Thanks.

    PHP Code:
    OPEN includes/functions_evo.php

    FIND
    ?>

    BEFORE ADD

    function NetworkBar() {
        $content .= "<script>\r\n";
        $content .= "function change(url) {\r\n";
        $content .= "    if(url != \"\") {\r\n";
        $content .= " location = url;\r\n";
        $content .= "    }\r\n";
        $content .= "}\r\n";
        $content .= "</script>\r\n";
        $content .= "<table width=\"100%\" height=\"20\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n";
        $content .= "    <tr valign=\"middle\">\r\n";
        $content .= "        <td>\r\n";
        $content .= "            <a href=\"http://Evo-Links.com\" target=\"_blank\"><img src=\"images/evo-network.gif\" width=\"245\" height=\"20\" border=\"0\" alt=\"\"></a></td>\r\n";
        $content .= "        <td width=\"100%\" height=\"20\" align=\"right\" valign=\"middle\" background=\"images/evo-networkbg.gif\">\r\n";
        
        $news = array();
        $links = array();
        $networkData = eval(@file_get_contents('http://Evo-Links.com/networkData.txt'));
        $num = array_rand($news);
        $nNews = $news[$num];
        $nNews = explode('|', $nNews);
        $title = $nNews[0];
        $url = $nNews[1];
        $content .= "            <a href=\"" . $url . "\"><span style=\"color: #D4D4D4;\">" . $title . "</span></a> \r\n";
        $content .= "            <select style=\"background: rgb(52, 64, 85) none repeat scroll 0%; width: 230px; font-size: 11px; color: white; border-color: #D4D4D4;\" onChange=\"return change(this.options[this.selectedIndex].value);\">\r\n";
        for($i=0,$maxi=count($links);$i<$maxi;$i++) {
            $link = explode('|', $links[$i]);
            $title = $link[0];
            $url = $link[1];
            $content .= "                <option value=\"" . $url . "\">" . $title . "</option>\r\n";
        }
        $content .= "            </select>\r\n";
        $content .= "         \r\n";
        $content .= "        </td>\r\n";
        $content .= "    </tr>\r\n";
        $content .= "</table>\r\n";
        $content .= "\r\n";
        echo $content;
    }

    OPEN header.php

    FIND
        themeheader();
    BEFORE ADD
        NetworkBar(); 
    --------------------------------------
    PHP Code:
    $news[] = "[Evo-Mods] MOD Database opened at Evo-Mods!|http://Evo-Mods.com/modules.php?name=Mods";
    $news[] = "[Evo Release] Nuke-Evolution Basic 1.0.1|http://www.nuke-evolution.com/modules.php?name=Forums&file=viewtopic&t=3251";
    $news[] = "[Evo-Themes] Themes for Nuke-Evolution|http://www.evo-themes.com/modules.php?name=Forums&file=viewforum&f=12";
    $news[] = "[Security FIX] Nuke-Evolution Basic Exploit FIX|http://www.nuke-evolution.com/modules.php?name=Forums&file=viewtopic&t=4056";

    $links[] = "Select an Evo Site|";
    $links[] = "|";
    $links[] = "Official Support Sites|";
    $links[] = "------------------------------|";
    $links[] = "Nuke-Evolution|http://Nuke-Evolution.com";
    $links[] = "Nuke-Evolution Mods|http://Evo-Mods.com";
    $links[] = "Nuke-Evolution Themes|http://Evo-Themes.com";
    $links[] = "Nuke-Evolution Wiki|http://Evo-Docs.com";
    $links[] = "|";
    $links[] = "Multilingual Support|";
    $links[] = "------------------------------|";
    $links[] = "Nuke-Evolution Italia|http://Nuke-Evolution.it";
    $links[] = "Nuke-Evolution German|http://Evo-German.com";
    $links[] = "Nuke-Evolution Espanol|http://mundo-nuke.com";
    $links[] = "|";
    $links[] = "Sponsored Sites|";
    $links[] = "------------------------------|";
    $links[] = "Evo-Clans|http://Evo-Clans.com";
    $links[] = "Evolution Art|http://www.nuke-evolution-art.com"
    This is the original I found but like how it looks and would like for it to do the same in Html.

    I am rather new to this stuff, but wanted some insight how I could get the same effect in Html.

    Thanks. MR. Noob.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Why not just echo it? PHP does get parsed as html.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Like Aero just said. Just vist that page on whatever server it is on. View the source of the page and copy and paste it. Only the HTML will be outputted to your browser.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #4
    New Coder
    Join Date
    Feb 2006
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Never thought about that...thank you. It worked, Im just sorta trying to learn myself. Remembering that will def help me.

    ----------------------

    Now I have the piece above and it works great. I also have it in subfolders one up from my root.

    Code:
    http://www.mysite.com/folder/html piece
    Now when Im in the subfolder the links arent working that are on the same level.

    Code:
    http://www.mysite.com/folder/html piece1
    http://www.mysite.com/folder/html piece2
    http://www.mysite.com/folder/html piece3
    When Im in 2 the link doesnt work for me to get to 3, or any combination.

    Now Im guessing I have to add the echo tags but not sure where they go?

    Am I correct on this or what to look for?

    Thank you.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •