Chadduck Posted July 23, 2014 Share Posted July 23, 2014 I will attempt to explain what I am doing and what the problem is.I am attempting to convert an existing ADMIN mod for Quickbooks from osC version 2.2 to 2.3.4. For the most part it works flawlessly. It does what it is supposed to do except one small irritating thing.The mod creates what I will call a "sub-menuing" system. There is an file for the includes directory that creates php menu tabs on each page of the mod. Depending on the tab selected a "sub-menu" is supposed to drop down offering additional choices for that particular section.There is a <mod>_styles.css included with required files. Following the suggestions provided here http://www.oscommerce.com/forums/topic/368538-guide-to-converting-addons-from-22x-to-23x/ I have attempted to activate the styles css file.I have at one time or another left it in the module page_top.php as <link rel="stylesheet" type="text/css" href="includes/<mod>_styles.css"> I have tried it in template_top.php after </head> as <link rel="stylesheet" type="text/css" href="includes/<mod>_styles.css"> I have tried it in template_top.php before </head> with $head_tag .= '<link rel="stylesheet" type="text/css" href="includes/<mod>_styles.css">' . "\n"; $oscTemplate->addBlock( $head_tag, 'header_tags' ); In fact - it was while doing this one that I discovered that the new osCommerce uses the jQuery system and truthfully - I have no clue HOW that affects any of what I am doing.Like I said - the UPDATED module DOES work with 2.3.4, the pages DO what they are supposed to do. I can (and reluctantly have) created individual section ADMIN menu boxes and could do away with the exisitng tabs. My reasoning for NOT wanting to do that is - People accustomed to using the module would find the menu boxes cumbersome and irritating.So HOW can I incorporate the <mod>_styles.css ???The specific osC v2.2 module is located here -http://addons.oscommerce.com/info/2847BJ Chadduck Quote Link to comment Share on other sites More sharing options...
♥GLWalker Posted July 23, 2014 Share Posted July 23, 2014 Why not try pasting the content of the stylesheet inside the admins existing stylesheet, at the bottom? joli1811 1 Quote Follow the community build: BS3 to osCommerce Responsive from the Get Go! Check out the new construction: Admin Gone to Total BS! Link to comment Share on other sites More sharing options...
Chadduck Posted July 23, 2014 Author Share Posted July 23, 2014 (edited) First thank you for reply... I have discovered some things after posting the question. The css is actually being read when placed in the module page_top.php as <link rel="stylesheet" type="text/css" href="includes/<mod>_styles.css"> After posting I discovered that the css is NOT the problem - it is the php qualifying statement in the tab file itself. Time to break out the php5 books... gotta figure out what is wrong with this section of code foreach($menuarray as $menulabel=>$menuurl) { $x++; ((isset($submenuarray[$x]) AND in_array($PHP_SELF,$submenuarray[$x])) OR $PHP_SELF==$menuurl) ? $e=1 : $e=0; echo '<li'; echo ($e==0) ? ' class="inactive"><a href="'.$menuurl.'">' : ' class="active"><a href="'.$menuurl.'" id="current">'; (there is more code to complete the above sequence BUT the problem statement is the isset part) The TRUE problem revolves around the "isset" statement. It ALWAYS returns false so none of the tabs ever show they active. Edited July 23, 2014 by Chadduck Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 23, 2014 Share Posted July 23, 2014 The osCommerce 2.3 series included some fixes to $PHP_SELF, so it may no longer be matching the array values. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Chadduck Posted July 23, 2014 Author Share Posted July 23, 2014 Jim Thanks for that tidbit. Is there a place in the documentation I can review WHAT the fixes were? BJ Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 23, 2014 Share Posted July 23, 2014 The details are not well documented. I would just print out the values of all the variables and see what they look like. Or just give up and convert the tabs to jQuery tabs. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Chadduck Posted July 23, 2014 Author Share Posted July 23, 2014 jQuery tabs - where would I learn HOW to do that? I located the jQuery learning center at http://learn.jquery.com/ -OR- Is there a better place to begin? BJ Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 23, 2014 Share Posted July 23, 2014 That's where I learned jQuery. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Chadduck Posted July 23, 2014 Author Share Posted July 23, 2014 Hopefully they don't give out dunce hats.... LOL :lol: :lol: Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 24, 2014 Share Posted July 24, 2014 I would have one if they did. I didn't start out knowing how to do this. Regards Jim Quote See my profile for a list of my addons and ways to get support. 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.