Shape 5

Joomla Templates => Your Store - July 2007 - Club => : sandyboone October 31, 2007, 10:49:39 PM



: Getting parse error after removing home bar
: sandyboone October 31, 2007, 10:49:39 PM
I'm trying to follow other instructions in forum for 1.) removing home bar and 2.) removing user 1 and increasing user 2 to take up space of user 1. Getting this error: "Parse error: syntax error, unexpected '}' in db/templates/yourstore/index.php on line 208"  Can you tell me what I've done wrong? (code below)

Thanks - Sandy

Here's how I adjusted the index.php file, beginning at line 189 and commented where I changed:

<div id="s5_mainwrap">
   <div id="topBlock">   
   <!-- replaced this code to remove user 1 and enlarge user 2 to take up space of user 1
  <?php if(mosCountModules('user1') || mosCountModules('user2') || mosCountModules('user3')) { ?>
      <div class="inner">
         <?php if(mosCountModules('user3')) { ?>
         <div class="block s5_user3">
            <?php mosloadmodules('user3',-2);?>
         </div>
         <div class="separator"><span>&nbsp;</span></div>
         <?php } ?>
         
         <?php if(mosCountModules('user2')) { ?>
         <div class="block s5_user2">
            <?php mosloadmodules('user2',-2);?>
         </div>
         <div class="separator"><span>&nbsp;</span></div>
         <?php } ?>
         <?php if(mosCountModules('user1')) { ?>
         <div class="block s5_user1">
            <?php mosloadmodules('user1',-2);?>
         </div>
         <?php } ?>
      </div>
    <?php } ?> -->
    <!-- added code below -->
    <div class="inner">
         <?php if(mosCountModules('user3')) { ?>
         <div class="block s5_user3">
            <?php mosloadmodules('user3',-2);?>
         </div>
         <div class="separator"><span>&nbsp;</span></div>
         <?php } ?>
         
         <?php if(mosCountModules('user2')) { ?>
         <div style="float:right;padding:0pt 0pt 5px;width:62%;">
            <?php mosloadmodules('user2',-2);?>
         </div>
         <?php } ?>
     
      </div>

   <!-- getting parse code error here <?php } ?> -->
    <!-- end of added code -->
    <?php if ( mosCountModules( 'user1' ) <= 0 && mosCountModules( 'user2' ) <= 0 && mosCountModules( 'user3' ) <= 0) { ?> 
    <div style="height:71px;"></div>
    <?php } ?>
   </div>
   <?php if ($s5_menu_style == "show")  { ?>
   <div class="s5_top">
      <div class="left">&nbsp;</div>
            <div class="middle">                        
                              <div id='navv'>
                                 <?php mosShowHFMenu2($params); ?>
                                 </div>
                        </div>
                     <div class="right">&nbsp;</div>
               </div>
               <?php } ?>
 <?php if(mosCountModules('banner')) { ?>
   <div class="banner">
      <div class="inner">
         <?php mosLoadModules ( 'banner', -3 ); ?>
      </div>
   </div>
   <?php } ?>
   
   <?php if (  mosCountModules( 'banner' ) <= 0 ) { ?> 
    <div style="height:19px;clear:both;"></div>
    <?php } ?>
   
   <!-- took out <div class="s5_top2">
            <div class="left">&nbsp;</div>
               <div class="middle">
                  <?php mosPathWay(); ?>
               </div>
            <div class="right">&nbsp;</div>
         </div> -->
   </div>
<?php if(mosCountModules('left')  ){ ?>




: Re: Getting parse error after removing home bar
: mikek November 01, 2007, 01:29:33 PM
Any chance you can post about the first 300 lines of your index.php file in the forum so I can see the code? There's just an extra } somewhere in there.


: Re: Getting parse error after removing home bar
: sandyboone November 01, 2007, 07:10:19 PM
Hey thanks. Here's the first part of the code (but I didn't change any of that originally):

// Template Configuration                                                          //
//////////////////////////////////////////////////////////////////////////////////////

// In this area you can fine tune exactly how you want your site to look. Please note that all items are case sensitive; please enter them exactly how you are instructed. Be careful not to delete any quotations, semicolons or other punctuation during this process. If you run into any problems or have any questions at all please post on our forum, we are here to help!


// What color style you would like to use. Refer to our demo page at http://demo.shape5.com for a full display of styles. Enter color1-10.
$s5_color = "color2";

//Would you like to enable the sliding Tools feature found at the top of the page? Enter yes or no.
$s5_sliding_tools = "no";

//Would you like to enable the popup user position box found at the top of the page? Enter yes or no.
$s5_box = "no";

//Would you like to enable the horizontal suckerfish menu system? Enter show or hide.
$s5_menu_style = "show";

//Would you like to enable the top tab that jumps the user to the top of the page? Enter show or hide.
$s5_top_tab = "show";

// Would you like your viewers to see the page width buttons across the top of the header? Type yes for visible and no for hidden.
$s5_width_selector = "yes";

// What would you like the default width of your site to be? Type 800, 1024 or fluid. As a fourth option you can type user choose to enable the page width adjusters found at the top of the page.
$s5_default_width = "1024";

//////////////////////////////////////////////////////////////////////////////////////
// End template configurations                                                      //
//////////////////////////////////////////////////////////////////////////////////////

// user 6,7,8,9 collapse calculations
if (mosCountModules("user6") && mosCountModules("user7") && mosCountModules("user8")  && mosCountModules("user9")) { $bottom4="25"; }
else if (!mosCountModules("user6") && mosCountModules("user7") && mosCountModules("user8") && mosCountModules("user9")) { $bottom4="33";  }
else if (mosCountModules("user6") && !mosCountModules("user7") && mosCountModules("user8") && mosCountModules("user9")) { $bottom4="33";  }
else if (mosCountModules("user6") && mosCountModules("user7") && !mosCountModules("user8") && mosCountModules("user9")) { $bottom4="33";  }
else if (mosCountModules("user6") && mosCountModules("user7") && mosCountModules("user8") && !mosCountModules("user9")) { $bottom4="33";  }
else if (!mosCountModules("user6") && !mosCountModules("user7") && mosCountModules("user8") && mosCountModules("user9")) { $bottom4="50"; }
else if (mosCountModules("user6") && !mosCountModules("user7") && !mosCountModules("user8") && mosCountModules("user9")) { $bottom4="50"; }
else if (mosCountModules("user6") && mosCountModules("user7") && !mosCountModules("user8") && !mosCountModules("user9")) { $bottom4="50"; }
else if (!mosCountModules("user6") && mosCountModules("user7") && mosCountModules("user8") && !mosCountModules("user9")) { $bottom4="50"; }
else if (!mosCountModules("user6") && mosCountModules("user7") && !mosCountModules("user8") && mosCountModules("user9")) { $bottom4="50"; }
else if (mosCountModules("user6") && !mosCountModules("user7") && mosCountModules("user8") && !mosCountModules("user9")) { $bottom4="50"; }
else if (mosCountModules("user6") && !mosCountModules("user7") && !mosCountModules("user8") && !mosCountModules("user9")) { $bottom4="100"; }
else if (!mosCountModules("user6") && mosCountModules("user7") && !mosCountModules("user8") && !mosCountModules("user9")) { $bottom4="100"; }
else if (!mosCountModules("user6") && !mosCountModules("user7") && mosCountModules("user8") && !mosCountModules("user9")) { $bottom4="100"; }
else if (!mosCountModules("user6") && !mosCountModules("user7") && !mosCountModules("user8") && mosCountModules("user9")) { $bottom4="100"; }
require($mosConfig_absolute_path."/templates/" . $mainframe->getTemplate() . "/s5_suckerfish.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php mosShowHead(); ?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/template_css.css" rel="stylesheet" type="text/css" media="screen" />

<?php if ($s5_default_width == "800") { ?>
<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/style2.css" rel="stylesheet" type="text/css" media="screen" />
<?php } ?>

<?php if ($s5_default_width == "1024") { ?>
<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/style1.css" rel="stylesheet" type="text/css" media="screen" />
<?php } ?>

<?php if ($s5_default_width == "fluid") { ?>
<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/style.css" rel="stylesheet" type="text/css" media="screen"/>
<?php } ?>


<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/<?php echo $s5_color; ?>.css" rel="stylesheet" type="text/css" media="screen" />
<?php if ($s5_default_width == "user choose") { ?>
<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/style1.css" rel="stylesheet" type="text/css" media="screen" title="1024"/>
<?php } ?>

<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/s5_accordion_vm_style.css" rel="stylesheet" type="text/css" media="screen"/>

<?php if ( $my->id ) { initEditor(); } ?>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/yourstore/js/s5_effects.js"></script>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/yourstore/js/s5_tools.js"></script>
<!--[if IE]>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/yourstore/js/s5_suckerfish.js"></script>
<![endif]-->
<!--[if IE 7]>
<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/s5_accordion_vm_style_ie7.css" rel="stylesheet" type="text/css" media="screen"/>
<script type="text/javascript" src="<?php echo $mosConfig_live_site;?>/templates/yourstore/js/s5_suckerfish.js"></script>
<![endif]-->
<link href="<?php echo $mosConfig_live_site;?>/templates/yourstore/css/s5_box.css" rel="stylesheet" type="text/css" media="screen" />

<?php
$br = strtolower($_SERVER['HTTP_USER_AGENT']); // what browser.
if(ereg("msie 6", $br)) {
$is_ie6 = "yes";
}
else {
$is_ie6 = "no";
}
?>


<?php
$br = strtolower($_SERVER['HTTP_USER_AGENT']); // what browser.
if(ereg("msie 7", $br)) {
$is_ie7 = "yes";
}
else {
$is_ie7 = "no";
}
?>

</head>

<body>
<a name="top">[/url]
<?php if ($s5_sliding_tools == "yes") { ?>   
<div id="transition_div" style="z-index:1; position:absolute; height: 0px; background:#E3E3E3; width: 100%; overflow: hidden">
<div id="control">
   <?php if(mosCountModules('cpanel')) { ?>
      <div id="s5_cpanel">
         <?php mosLoadModules ( 'cpanel', -1 ); ?>
      </div>
   <?php } ?>   
   <ul class="width">
      <li class="thin"><a href="#" onclick="chooseStyle(2);" style="text-decoration:none;">Thin width[/url]</li>
      <li class="fixed"><a href="#" onclick="chooseStyle(0);" style="text-decoration:none;">Fixed width[/url]</li>
      <li class="wide"><a href="#" onclick="chooseStyle(1);" style="text-decoration:none;">Wide width[/url]</li>
   </ul>


</div>
</div>

<?php } ?>
<div id="mainwrapper">
<div class="mainHolder">
<div id="s5_topbuttonswrap" style="z-index:1; position:relative;">
  <div id="s5_topbuttons"  style="z-index:1; position:relative;">
    <?php if ($s5_box == "yes") { ?>
    <?php if(mosCountModules('toolbar')) { ?>
    <?php if ($is_ie7 == "yes") { ?>
    <a href="javascript:shiftOpacity3ie('popup_divie');shiftOpacity2ie('popup_outerie');show_popupie()" style="text-decoration:none;">
    <?php } ?>
    <?php if ($is_ie7 == "no") { ?><a href="javascript:<?php if ($is_ie6 == "yes") { ?>ie_popup_fix();<?php } ?>shiftOpacity3('popup_div');shiftOpacity2('popup_outer');show_popup()" style="text-decoration:none;">
    <?php } ?>
    <img src="<?php echo $mosConfig_live_site;?>/templates/yourstore/images/myaccount.gif" border="0" alt="Tools"/>
    [/url]
    <?php } ?>
    <?php } ?>
    <?php if ($s5_sliding_tools == "yes") { ?>
    <a href="javascript:shiftOpacity('transition_div');transition_effect()" style="text-decoration:none;">
    <img src="<?php echo $mosConfig_live_site;?>/templates/yourstore/images/tools.gif" border="0" alt="Tools"/>
    [/url]
    <?php } ?>
  </div>
</div>


   <div id="leftColumn">
      <div class="logo">
         <a href="#">YourStore[/url]
      </div>
<?php if(mosCountModules('left')) { ?>
   <div id="leftbox">
      <div id="leftcol">
         
         <?php mosLoadModules ( 'left', -3 ); ?>         
         
      </div>
      </div>
<?php } ?>
   </div>


<div id="s5_mainwrap">
   <div id="topBlock">   
   <!-- replaced this code to remove user 1 and enlarge user 2 to take up space of user 1
  <?php if(mosCountModules('user1') || mosCountModules('user2') || mosCountModules('user3')) { ?>
      <div class="inner">
         <?php if(mosCountModules('user3')) { ?>
         <div class="block s5_user3">
            <?php mosloadmodules('user3',-2);?>
         </div>
         <div class="separator"><span>&nbsp;</span></div>
         <?php } ?>
         
         <?php if(mosCountModules('user2')) { ?>
         <div class="block s5_user2">
            <?php mosloadmodules('user2',-2);?>
         </div>
         <div class="separator"><span>&nbsp;</span></div>
         <?php } ?>
         <?php if(mosCountModules('user1')) { ?>
         <div class="block s5_user1">
            <?php mosloadmodules('user1',-2);?>
         </div>
         <?php } ?>
      </div>
    <?php } ?> -->
    <!-- added code below -->
    <div class="inner">
         <?php if(mosCountModules('user3')) { ?>
         <div class="block s5_user3">
            <?php mosloadmodules('user3',-2);?>
         </div>
         <div class="separator"><span>&nbsp;</span></div>
         <?php } ?>
         
         <?php if(mosCountModules('user2')) { ?>
         <div style="float:right;padding:0pt 0pt 5px;width:62%;">
            <?php mosloadmodules('user2',-2);?>
         </div>
         <?php } ?>
     
      </div>

   <!-- getting parse code error here <?php } ?> -->
    <!-- end of added code -->
    <?php if ( mosCountModules( 'user1' ) <= 0 && mosCountModules( 'user2' ) <= 0 && mosCountModules( 'user3' ) <= 0) { ?> 
    <div style="height:71px;"></div>
    <?php } ?>
   </div>
   <?php if ($s5_menu_style == "show")  { ?>
   <div class="s5_top">
      <div class="left">&nbsp;</div>
            <div class="middle">                        
                              <div id='navv'>
                                 <?php mosShowHFMenu2($params); ?>
                                 </div>
                        </div>
                     <div class="right">&nbsp;</div>
               </div>
               <?php } ?>
 <?php if(mosCountModules('banner')) { ?>
   <div class="banner">
      <div class="inner">
         <?php mosLoadModules ( 'banner', -3 ); ?>
      </div>
   </div>
   <?php } ?>
   
   <?php if (  mosCountModules( 'banner' ) <= 0 ) { ?> 
    <div style="height:19px;clear:both;"></div>
    <?php } ?>
   
   <!-- took out <div class="s5_top2">
            <div class="left">&nbsp;</div>
               <div class="middle">
                  <?php mosPathWay(); ?>
               </div>
            <div class="right">&nbsp;</div>
         </div> -->
   </div>
<?php if(mosCountModules('left')  ){ ?>
<div id="s5_mainright_80">
<?php } else {?>
<div id="s5_mainright_99">
<?php } ?>
   <div class="contentHolder">
   <?php if(mosCountModules('right')) { ?>
         <div id="rightColumn">
            <div id="rightbox">
               <div id="rightcol">
                  <?php mosLoadModules ( 'right', -3 ); ?>
               </div>
            </div>
         </div>
      <?php } ?>
      
   <?php if(mosCountModules('right')) { ?>
   <div id="content">
   <?php }
         else  { ?> 
      <div id="content_right">
         <?php } ?>    
         
         <?php if(mosCountModules('inset')) { ?>
         <div class="s5_inset">
            <?php mosloadmodules('inset',-3);?>
         </div>
         <?php } ?>
         <?php if(mosCountModules('user4') && mosCountModules('user5')) { ?>
            <div id="s5_user4_50">
               <?php mosloadmodules('user4',-3);?>
            </div>
            
            <div id="s5_user5_50">
               <?php mosloadmodules('user5',-3);?>
            </div>
         <?php } ?>
         
         <?php if ( mosCountModules( 'user4' ) > 0 && mosCountModules( 'user5' ) <= 0) { ?> 
            <div id="s5_user4_100">
               <?php mosloadmodules('user4',-3);?>
            </div>
         <?php } ?>
         
         <?php if ( mosCountModules( 'user5' ) > 0 && mosCountModules( 'user4' ) <= 0) { ?> 
            <div id="s5_user5_100">
               <?php mosloadmodules('user5',-3);?>
            </div>

Thanks,
Sandy


: Re: Getting parse error after removing home bar
: mikek November 02, 2007, 07:44:52 AM
Sandy,

It looks like it was missing an if statement. The instructions on that post are worded a little awkwardly I'm going to update them for anyone else. If you use the attached index.php it will work for you, it's already hacked with your template configs still in place.

Let me know if you have any other questions.


: Re: Getting parse error after removing home bar
: sandyboone November 02, 2007, 02:43:51 PM
Oh, thank you very very much Mike!

Blessings,
Sandy


: Re: Getting parse error after removing home bar
: sandyboone November 02, 2007, 08:51:52 PM
Mike,
Sorry to bother again. Would you check the index.php you put as a download and see if it's the new one or the old one? When I overwrite the index.php of the site, I get the same thing (home bar visible and no combination of user 1 + user 2). And looking at the preview with inline module positions, I don't see a difference.

Thanks again.
Sandy


: Re: Getting parse error after removing home bar
: mikek November 02, 2007, 08:56:14 PM
Sandy,       
      
Can you post the url of your site so I can see it? Thank you.


: Re: Getting parse error after removing home bar
: sandyboone November 03, 2007, 11:02:39 AM
Hey Mike! Thanks again.

I had to go back and change templates to show you. http://www.timeforamiracle.com. (it's just beginning) I had a chance to do more testing on what the index.php does to it.

The user 1 and user 2 positions don't work - it always adds it at user 3 - with the new index.php file. And the home - breadcrumb of the page is still visible.

I saw on another topic that there was a way to make the logo as a module. That would really be helpful. I'd make a suggestion that your templates have that as a regular addition - don't know if that's a good idea or not - but would make things easier for people like me who are trying out things and testing a lot first.

Thanks for your help a bunch!
Sandy


: Re: Getting parse error after removing home bar
: sandyboone November 03, 2007, 04:19:15 PM
Mike,
One other idiosyncrasy - my titles in joomla content set to "show" - don't show in this template with this index.php. It does show when I switch templates. So, it must be something in the php here that isn't reading the joomla settings for content?

thanks again!
Sandy


: Re: a list of issues with the user 1 - 2 - 3 with index.php
: sandyboone November 03, 2007, 05:49:44 PM
Mike,
Okay, finished some more testing and thought I'd put all in one post what I'm finding.
1. user 1, 2, 3 are there - deprecating when something isn't in one of the other user modules as it should

2. I have a graphic for user mod #1 spot that is 320 x 75 pixels, and it is warped and off screen/into far right module. The smaller version is 182 x 65 pixels and fits well in module  - but is smaller than I had hoped. (it's time for a miracle) I had hoped with the index.php changed, the modules 1 and 2 could become one module and allow a larger graphic in that spot.

3. The home/breadcrumb graphic bar under the navigation is visible and I don't know how to get rid of it.

4. The titles for content (although in globals they are linked and in content parameters are set to "show") - are not visible.

5. User 1 module seems to be present on all main menu items/quasi pages. Modules 2 & 3 don't seem to be present on any menu item except for home/front page - i.e. the image is published in those modules for the menu item called "test" - but are not visible. When that same image is published in menu item links as "all" rather than one particular menu item (like "test"), it is visible across all pages.

6. I am using Firefox as the browser by the way.

Thanks a bunch,
Sandy
 


: Re: Getting parse error after removing home bar
: mikek November 04, 2007, 03:23:21 PM
Sandy,

The link you provided above to your site isn't working. I've checked it a few times since last night just in case your server was down. Is there another url I can use? Also, are you using the Joomla 1.0 or 1.5 version? Let me know on both of those and I can compile a list to all your answers.

Thanks!


: Re: Getting parse error after removing home bar
: sandyboone November 05, 2007, 09:11:31 AM
Sorry - here's the correct url! http://www.timeforamiracle.NET.

Joomla 1.0 (joomla 1.013 installed on server)

Thanks,
Sandy


: Re: Getting parse error after removing home bar
: mikek November 05, 2007, 09:22:42 AM
Sandy,

Thanks. Is there any chance I can get backend admin access to your Joomla install? Most of it is just Joomla settings and it would be easier if I did it and explained what I did so you can see it; rather than telling you how to do it. You can private message me the details if that's ok.

Thanks,


: Re: Getting parse error after removing home bar
: mikek November 05, 2007, 10:33:00 AM
Sandy,

Ok you are up running!

1. The old index.php was still in there somehow. I just applied the new hack and it stretches user2.

2. The height of the top user positions is static and cuts off if the picture is too large. If you want to enlarge the height of them you will need to edit the css. Just look for:

#topBlock .inner {
   width:100%;
   float:left;
   margin-top:6px;
   height:90px;
   overflow:hidden; }

in the template css; and adjust the height to a higher number.

3. Some of your modules weren't showing on pages because in the module manager it was set to only show on certain page. When you open a module to edit it you will see a list of your pages on the right side of the screen. Through that list you can specify what pages you want the module on. I changed both of your top modules to display on all pages.

4. The pathway, breadcrumbs, are now removed.

5. The title of the content items were showing. I setup a Test2 on the main menu so you can see it.

I think that covers it, let me know if you have any other questions!


: Re: Getting parse error after removing home bar
: sandyboone November 05, 2007, 09:53:52 PM
Mike,
 :D Thanks very, very much! It's working beautifully. I like the template and will have a good time working with it over the next week.

The only place I don't seem to be getting titles on the content is on the front page. My other pages are working fine. Perhaps I need to look at some joomla instructions because it could be that front page isn't set up to be blog-like or article/content like. The only other possibility I can figure out is that perhaps the CSS has that header in white so that it doesn't show on a white background. I will check around some tomorrow in joomla info and in the css.

Thanks a whole bunch! You've been a terrific, terrific help.

Blessings,
Sandy


: Re: Getting parse error after removing home bar
: mikek November 05, 2007, 10:12:32 PM
Sandy,

I just logged in and updated some of your css. The titles were showing white for some reason. You should be able to see them on the homepage now.

Regards,