bigbenbuilders Posted September 3, 2009 Author Share Posted September 3, 2009 perfect!!! thank you soooo much Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 3, 2009 Author Share Posted September 3, 2009 and yes that was what I was trying to do from the begining...lol Quote Link to comment Share on other sites More sharing options...
mikesta707 Posted September 3, 2009 Share Posted September 3, 2009 haha ok. Make sure to mark the topic as solved Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 sorry guys one more issue when the section id is 10 11 12 etc. it pulls the 1 also? Here is the code please help <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=1') !== false) { $class = 'alumni_tab_1_index'; $mouseOver='alumni_tab_1_on_index'; $mouseOut = 'alumni_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">alumni</div> Quote Link to comment Share on other sites More sharing options...
bundyxc Posted September 4, 2009 Share Posted September 4, 2009 Please explain. Topic is tldr; What's going on, and what are you trying to make it do? Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 here is pretty much the entire code...what it does it turns one tab on or off depending on what page you are on. sectionid11 is also turning on sectionid1 <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=1') !== false) { $class = 'alumni_tab_1_index'; $mouseOver='alumni_tab_1_on_index'; $mouseOut = 'alumni_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">alumni</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=2&id=14&Itemid=37" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=2') !== false) { $class = 'giving_tab_1_index'; $mouseOver='giving_tab_1_on_index'; $mouseOut = 'giving_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">giving</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=11&id=232&Itemid=250" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=11') !== false) { $class = 'kreft_tab_1_index'; $mouseOver='kreft_tab_1_on_index'; $mouseOut = 'kreft_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">kreft arts</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=3&id=198&Itemid=207" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=3') !== false) { $class = 'library_tab_1_index'; $mouseOver='library_tab_1_on_index'; $mouseOut = 'library_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">library</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=12&id=240&Itemid=257" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=12') !== false) { $class = 'graduate_tab_1_index'; $mouseOver='graduate_tab_1_on_index'; $mouseOut = 'graduate_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">graduate studies</div> Quote Link to comment Share on other sites More sharing options...
bundyxc Posted September 4, 2009 Share Posted September 4, 2009 Problem solved. Single digit section ID's (1, 2, etc) now have leading zeroes (01, 02, etc). I updated it in the below script, but you might need to update it in different site links. <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=01') !== false) { $class = 'alumni_tab_1_index'; $mouseOver='alumni_tab_1_on_index'; $mouseOut = 'alumni_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">alumni</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=02&id=14&Itemid=37" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=02') !== false) { $class = 'giving_tab_1_index'; $mouseOver='giving_tab_1_on_index'; $mouseOut = 'giving_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_01_on'; $mouseOut = 'tab_01'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">giving</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=11&id=232&Itemid=250" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=11') !== false) { $class = 'kreft_tab_1_index'; $mouseOver='kreft_tab_1_on_index'; $mouseOut = 'kreft_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">kreft arts</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=3&id=198&Itemid=207" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=3') !== false) { $class = 'library_tab_1_index'; $mouseOver='library_tab_1_on_index'; $mouseOut = 'library_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">library</div> </a></td> <td width="105"><a href="index.php?option=com_content&task=category§ionid=12&id=240&Itemid=257" class="a_black text_10"> <?php if (stripos($_SERVER['REQUEST_URI'],'sectionid=12') !== false) { $class = 'graduate_tab_1_index'; $mouseOver='graduate_tab_1_on_index'; $mouseOut = 'graduate_tab_1_index'; } else { $class = 'tab_1'; $mouseOver = 'tab_1_on'; $mouseOut = 'tab_1'; } ?> <div class="<?php echo $class; ?>" onMouseOver="this.className='<?php echo $mouseOver; ?>'" onMouseOut="this.className='<?php echo $mouseOut; ?>'">graduate studies</div> Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 now its not turning them on? Quote Link to comment Share on other sites More sharing options...
bundyxc Posted September 4, 2009 Share Posted September 4, 2009 You have to update the script, like I said. Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 that is in an includes file...there is no where else to update? Quote Link to comment Share on other sites More sharing options...
bundyxc Posted September 4, 2009 Share Posted September 4, 2009 How are you trying to turn them on? From what URL? Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 yes Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 I could pull the id from the database if you could show me how Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 any suggestions? I would prefer not to pull from database Quote Link to comment Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 is there a tag that I can put at the end of session1 to get it to stop looking? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.