Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 77

PostPosted: Mon Jun 27, 2011 11:14 am Reply with quote

Have been trying to achieve more theme versatility with how RN handles lists and menus, using UL and OL wherever possible; and removing any hard coded styling when possible. I've come across the legal menu, and thought I would get your input. By default it generates a menu something like:

[ Legal Notice | Privacy Policy | Terms of Use | Comments ]

Where the menu is wrapped in braces and a pipe character is inserted before menu items. Converting this to an inline UL and removing those characters is not particularly difficult, although the easiest solution fails (somewhat) in IE7; as it doesn't support the CSS Pseudo-elements :before and :after

Code:
<div class="lgl_menu"><ul class="legal-menu">
<li class="legal-doc-first"><a href="legal-notice.html">Legal Notice</a></li>
<li class="legal-doc"><a href="legal-privacy.html">Privacy Policy</a></li>
<li class="legal-doc"><a href="legal-terms.html">Terms of Use</a></li>
<li class="legal-doc"><a href="legal-lgl_contact.html">Comments</a></li></ul></div>


Code:
ul.legal-menu:before {
  content: "\005B \00A0"; /* [ */
  display: inline;
}
ul.legal-menu:after {
  content: "\00A0 \005D"; /* ] */
  display: inline;
}
ul.legal-menu {
   margin-left: 0;
   padding-left: 0;
   display: inline;
   }

ul.legal-menu li {
   margin: 0 2px 0 2px;
   list-style: none;
   display: inline;
   }

ul.legal-menu li.legal-doc:before {
  content: "\007C \00A0"; /* | */
  display: inline;
}


Obviously doing these changes to make it look the same is not the ultimate goal, but opens up possibilities for theme designers to override and restyle as vertical menu, use jQuery UI, etc....

So I guess my question is simple, what do you think of a solution that doesn't work in IE7?? By "doesn't work" I mean it doesn't insert pipe and braces, i.e.

Legal Notice Privacy Policy Terms of Use Comments

There are other methods using a left border on LI to simulate the pipe character, but IMO it doesn't look as good and also requires a color for the border, which would have to be customized by theme. The other option is to use a bulleted list, which IE7 has it's own set of issues with, I discovered recently... Sad
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Tue Jun 28, 2011 7:27 am Reply with quote

Unfortunately this is going to take more time to test out a bunch of different things and I am going to be away for awhile. I have several different ideas in mind, but I am struggling a bit with how to not hard-code the outer brackets. I, like you, would want this completely stylable via CSS.

I'll keep thinking about this and trying a few things this week and next as I have time. Let's keep the dialog going... just realize it could be a few days in-between my postings - not sure yet what my level of connectivity is going to be.

_________________
“To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins 
View user's profile Send private message Visit poster's website
spasticdonkey
Newbie
Newbie



Joined: Sep 05, 2007
Posts: 77

PostPosted: Tue Jun 28, 2011 8:30 am Reply with quote

Cool, thanks for your willingness to experiment a bit, and no huge hurry as I have other irons in the fire.. If you are curious to see my proposed solution in action I did a quicky demo... It should insert pipe and brackets via CSS in all modern browsers (only very slightly tweaked from code above)

http://www.rtsforce.com/menu-test.html

these were my edits in class.legal_doctypes.php

Code:
   function html()
   {
      global $admin_file, $admin, $lgl_lang;
      $i = 0;
      $j = $this->numTypes;
      if ($j == 0) { // In case no documents were active or no translations, see if we need to show the legal contact link
         $s = '';
         if ($this->showContact) {
            $s = '<ul class="legal-menu"><li class="legal-doc-first"><a href="modules.php?name='.$this->modName.'&amp;op=lgl_contact">'
               . $this->labContact . '</a></li></ul>';
         }
         return $s;
      }
      $s = '<ul class="legal-menu">';
      foreach ($this->docTypes as $key => $value)
      {
         $LIclass = 'legal-doc';
         if ($i == 0) $LIclass = 'legal-doc-first';
         $s .= '<li class="'.$LIclass.'"><a href="modules.php?name='.$this->modName.'&amp;op=' . $value . '">'
            . str_replace(' ', ' ', $this->docTypeText[$key]) . '</a></li>';
         if ($j == ++$i) {
            if ($this->showContact) {
               $s .= '<li class="'.$LIclass.'"><a href="modules.php?name='.$this->modName.'&amp;op=lgl_contact">'
                  . $this->labContact . '</a></li>';
            }
         }
      }
      if (is_admin($admin)) {
         $s .= '<li class="'.$LIclass.'"><a href="' . $admin_file . '.php?op=legal">' . _LGL_COM_ADMINMENU . '</a></li>';
      }
      $s .= '</ul>';
      return $s;
   }
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Tue Jun 28, 2011 8:58 pm Reply with quote

I will definitely look at this. I have it saved on my thumb drive.

I modified the nukePIE (RSS Feed generator) while back on my personal sites to also use the UL structure and added a little bit to the ravennuke.css. That is another one that needs to change for sure... can't style it otherwise.

I also wanted to change the public message among many other things to allow for better styling... I'm sure you guys are finding a TON of in-line styling buried throughout the core modules. For HTML Newsletter, take a look at my download in the extras for a way to change it to use classes instead of in-line as well. Wink
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch