bigbenbuilders Posted September 3, 2009 Author Share Posted September 3, 2009 perfect!!! thank you soooo much Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912013 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 Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912015 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 Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912019 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> Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912285 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? Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912289 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> Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912292 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> Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912297 Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 now its not turning them on? Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912302 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. Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912303 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? Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912305 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? Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912306 Share on other sites More sharing options...
bigbenbuilders Posted September 4, 2009 Author Share Posted September 4, 2009 yes Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912307 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 Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912308 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 Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912336 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? Link to comment https://forums.phpfreaks.com/topic/173009-solved-shouldnt-the-echo-produce-the-results/page/2/#findComment-912356 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.