1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Php code messed up in footer

Discussion in 'Programming & Webmastering' started by freaksavior, Jun 4, 2011.

  1. freaksavior

    freaksavior To infinity ... and beyond!

    Joined:
    Dec 11, 2006
    Messages:
    8,058 (2.89/day)
    Thanks Received:
    897
    Hey guys,

    I modified the code in this footer.php file but I have no idea why it's not being formatted right. Before I messed with it, it worked.

    <?php
    ?>

    <!-- FOOTER -->
    <div id="footer">

    <?php if(GetDCCPInterface()->getIGeneral()->showFooterLinks()) { ?>
    <div class="links-info-container">


    <div class="clear-both"></div>
    </div> <!--links-info-container-->
    <?php } ?>

    <?php if(GetDCCPInterface()->getIGeneral()->showFooterWidgetized()) { ?>
    <div id="widgetized-footer">
    <div class="sidebar">
    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarA(); ?>
    </div>
    <div class="sidebar">
    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarB(); ?>
    </div>
    <div class="sidebar-last">
    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarC(); ?>
    </div>
    <div class="clear-both"></div>
    </div> <!--widgetized-footer-->

    <div class="links">
    <h6>ABOUT</h6>
    <a class="linkType3" href="#">History</a><br />
    <a class="linkType3" href="#">Jobs Information</a><br />
    <a class="linkType3" href="#">Our Services</a><br />
    <a class="linkType3" href="#">Our Stuff</a>
    </div>

    <div class="links">
    <h6>SERVICES</h6>
    <a class="linkType3" href="#">Website Templates</a><br />
    <a class="linkType3" href="#">Logo Design</a><br />
    <a class="linkType3" href="#">Mobile Applications</a><br />
    <a class="linkType3" href="#">Graphic Design</a>
    </div>

    <div class="links">
    <h6>TEMPLATES</h6>
    <a class="linkType3" href="#">Image positioning</a><br />
    <a class="linkType3" href="#">List examples</a><br />
    <a class="linkType3" href="#">Text and Table</a><br />
    <a class="linkType3" href="#">Full Page examples</a>
    </div>

    <div class="links">
    <h6>CONTACT / HELP</h6>
    <a class="linkType3" href="#">Help/FAQ</a><br />
    <a class="linkType3" href="#">Contact</a><br />
    <a class="linkType3" href="#">Office Locations</a><br />
    <a class="linkType3" href="#">Company Headquarter</a>
    </div>

    <div class="info">
    <h6>COMPANY INFO</h6>
    <p>Company street adress 12</p>
    <p>State 1234</p>
    <p>precious@ourdomain.com</p>
    <p>Phone: (550) 2343-1234</p>
    <p>Fax: (550) 2343-123</p>
    </div>

    <?php }


    $fb_style = ' style="';
    $show_copy = GetDCCPInterface()->getIGeneral()->showFooterCopy();
    $show_line = GetDCCPInterface()->getIGeneral()->showFooterLine();

    if(!$show_line)
    {
    $fb_style .= 'background-image:none;';
    }
    $fb_style .= '" ';

    echo '<div id="footer-bottom" '.$fb_style.'>';

    if($show_copy)
    {
    echo GetDCCPInterface()->getIGeneral()->getFooterCopy().'<br />';
    }

    if(GetDCCPInterface()->getIGeneral()->showFooterLogo())
    {
    ?>

    <a href="<?php echo get_bloginfo('url'); ?>"><img src="<?php echo GetDCCPInterface()->getIGeneral()->getFooterLogoPath(); ?>" style="margin-top:8px;" alt="" /></a><br />

    <?php } ?>
    </div> <!--footer-bottom-->

    </div> <!--footer-->



    <?php wp_footer(); GetDCCPInterface()->getIGeneral()->printFooterTrackingCode(); ?>
    </body>
    </html>

    <?php ob_end_flush(); ?>

    It looks like this right now
    Screen shot 2011-06-04 at 12.52.32 PM.png
    but it should look like
    Screen shot 2011-06-04 at 12.53.49 PM.png

    What did I do wrong?
    Original code is this
    <?php

    ?>

    <!-- FOOTER -->
    <div id="footer">

    <?php if(GetDCCPInterface()->getIGeneral()->showFooterLinks()) { ?>
    <div class="links-info-container">

    <div class="links">
    <h6>ABOUT</h6>
    <a class="linkType3" href="#">History</a><br />
    <a class="linkType3" href="#">Jobs Information</a><br />
    <a class="linkType3" href="#">Our Services</a><br />
    <a class="linkType3" href="#">Our Stuff</a>
    </div>

    <div class="links">
    <h6>SERVICES</h6>
    <a class="linkType3" href="#">Website Templates</a><br />
    <a class="linkType3" href="#">Logo Design</a><br />
    <a class="linkType3" href="#">Mobile Applications</a><br />
    <a class="linkType3" href="#">Graphic Design</a>
    </div>

    <div class="links">
    <h6>TEMPLATES</h6>
    <a class="linkType3" href="#">Image positioning</a><br />
    <a class="linkType3" href="#">List examples</a><br />
    <a class="linkType3" href="#">Text and Table</a><br />
    <a class="linkType3" href="#">Full Page examples</a>
    </div>

    <div class="links">
    <h6>CONTACT / HELP</h6>
    <a class="linkType3" href="#">Help/FAQ</a><br />
    <a class="linkType3" href="#">Contact</a><br />
    <a class="linkType3" href="#">Office Locations</a><br />
    <a class="linkType3" href="#">Company Headquarter</a>
    </div>

    <div class="info">
    <h6>COMPANY INFO</h6>
    <p>Company street adress 12</p>
    <p>State 1234</p>
    <p>precious@ourdomain.com</p>
    <p>Phone: (550) 2343-1234</p>
    <p>Fax: (550) 2343-123</p>
    </div>
    <div class="clear-both"></div>
    </div> <!--links-info-container-->
    <?php } ?>

    <?php if(GetDCCPInterface()->getIGeneral()->showFooterWidgetized()) { ?>
    <div id="widgetized-footer">
    <div class="sidebar">
    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarA(); ?>
    </div>
    <div class="sidebar">
    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarB(); ?>
    </div>
    <div class="sidebar-last">
    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarC(); ?>
    </div>
    <div class="clear-both"></div>
    </div> <!--widgetized-footer-->
    <?php }


    $fb_style = ' style="';
    $show_copy = GetDCCPInterface()->getIGeneral()->showFooterCopy();
    $show_line = GetDCCPInterface()->getIGeneral()->showFooterLine();

    if(!$show_line)
    {
    $fb_style .= 'background-image:none;';
    }
    $fb_style .= '" ';

    echo '<div id="footer-bottom" '.$fb_style.'>';

    if($show_copy)
    {
    echo GetDCCPInterface()->getIGeneral()->getFooterCopy().'<br />';
    }

    if(GetDCCPInterface()->getIGeneral()->showFooterLogo())
    {
    ?>
    <a href="<?php echo get_bloginfo('url'); ?>"><img src="<?php echo GetDCCPInterface()->getIGeneral()->getFooterLogoPath(); ?>" style="margin-top:8px;" alt="" /></a><br />
    <?php } ?>
    </div> <!--footer-bottom-->

    </div> <!--footer-->



    <?php wp_footer(); GetDCCPInterface()->getIGeneral()->printFooterTrackingCode(); ?>
    </body>
    </html>

    <?php ob_end_flush(); ?>

    I need the widgets above the messed up area so I know i'm headed in the right direction but I'm just not sure what is wrong.
    Thanks for the help guys
    Crunching for Team TPU
  2. freaksavior

    freaksavior To infinity ... and beyond!

    Joined:
    Dec 11, 2006
    Messages:
    8,058 (2.89/day)
    Thanks Received:
    897
    Figured it out afterall. I tried for almost two days.

    Code:
    <?php
    /**********************************************************************
    * PRESTIGE WORDPRESS EDITION 
    * (Ideal For Business And Personal Use: Portfolio or Blog)     
    * 
    * File name:   
    *      footer.php
    * Brief:       
    *      Footer code for all theme files
    * Author:      
    *      #####
    * Author URI:
    *      #####
    * Contact:
    *      ######  
    ***********************************************************************/
    ?>
    
        <!-- FOOTER -->      
        <div id="footer">
        
            <?php if(GetDCCPInterface()->getIGeneral()->showFooterLinks()) { ?>
            
            <?php } ?>
            
            <?php if(GetDCCPInterface()->getIGeneral()->showFooterWidgetized()) { ?>
            <div id="widgetized-footer">
                <div class="sidebar">
                    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarA(); ?>
                </div>
                <div class="sidebar">
                    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarB(); ?> 
                </div>
                <div class="sidebar-last">
                    <?php GetDCCPInterface()->getIGeneral()->renderFooterSidebarC(); ?> 
                </div>
                <div class="clear-both"></div>                        
            </div> <!--widgetized-footer-->
    
            <div class="links-info-container">
        
                <div class="links">
                    <h6>ABOUT</h6>
                    <a class="linkType3" href="#">History</a><br />
                    <a class="linkType3" href="#">Jobs Information</a><br />
                    <a class="linkType3" href="#">Our Services</a><br />
                    <a class="linkType3" href="#">Our Stuff</a>
                   </div>
                
                <div class="links">
                    <h6>SERVICES</h6>
                    <a class="linkType3" href="#">Website Templates</a><br />
                    <a class="linkType3" href="#">Logo Design</a><br />
                    <a class="linkType3" href="#">Mobile Applications</a><br />
                    <a class="linkType3" href="#">Graphic Design</a>
                   </div>
                
                <div class="links">
                    <h6>TEMPLATES</h6>
                    <a class="linkType3" href="#">Image positioning</a><br />
                    <a class="linkType3" href="#">List examples</a><br />
                    <a class="linkType3" href="#">Text and Table</a><br />
                    <a class="linkType3" href="#">Full Page examples</a>
                   </div>
                
                <div class="links">
                    <h6>CONTACT / HELP</h6>
                    <a class="linkType3" href="#">Help/FAQ</a><br />
                    <a class="linkType3" href="#">Contact</a><br />
                    <a class="linkType3" href="#">Office Locations</a><br />
                    <a class="linkType3" href="#">Company Headquarter</a>
                   </div>
                
                <div class="info">
                    <h6>COMPANY INFO</h6>
                    <p>Company street adress 12</p>
                    <p>State 1234</p>
                    <p>precious@ourdomain.com</p>
                    <p>Phone: (550) 2343-1234</p>
                    <p>Fax: (550) 2343-123</p>
                </div>
                <div class="clear-both"></div> 
    
            <?php } 
            
    
                $fb_style = ' style="';
                $show_copy = GetDCCPInterface()->getIGeneral()->showFooterCopy();
                $show_line = GetDCCPInterface()->getIGeneral()->showFooterLine();
    
                if(!$show_line)
                {
                    $fb_style .= 'background-image:none;';     
                }
                $fb_style .= '" ';
                
                echo '<div id="footer-bottom" '.$fb_style.'>';
                
                    if($show_copy)
                    {
                        echo GetDCCPInterface()->getIGeneral()->getFooterCopy().'<br />';
                    }
                    
                    if(GetDCCPInterface()->getIGeneral()->showFooterLogo())
                    {              
                ?>
                <a href="<?php  echo get_bloginfo('url'); ?>"><img src="<?php  echo GetDCCPInterface()->getIGeneral()->getFooterLogoPath(); ?>" style="margin-top:8px;" alt="" /></a><br />
                <?php } ?>
            </div> <!--footer-bottom-->  
            
        </div> <!--footer-->
        
    
      
        <?php wp_footer(); GetDCCPInterface()->getIGeneral()->printFooterTrackingCode(); ?>
    </body>
    </html>
    
    <?php ob_end_flush(); ?>
    
    Crunching for Team TPU

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page