collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 248
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: Vertical Fly-Out Menu in a Block  (Read 17342 times)

0 Members and 2 Guests are viewing this topic.

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Vertical Fly-Out Menu in a Block
« on: April 28, 2010, 02:17:12 PM »
My ultimate goal is to have a "Member's Only" Left Block that contains a vertical flyout navigation bar which will be seen only after the user logs in. 

I built the block and the flyout menu (using PluginLab's Vertical CSS Image Flyout Menu Maker for Dreamweaver), but, what I figured would happen is happening.  When I mouse over a menu item that has a sub menu, the flyout isn't flying out on top of all other items, but is rather "flying under" causing a scroll bar to be shown.

I am by no means a CSS expert, but I do know my way around a little.  I played with the z-index, but that's not cutting it.  I started hunting for another CSS Property that I could change for the block itself, but before I dig into all of that, I wanted to see if anyone knew how to fix this easily.

If you want to see what I'm talking about, you can check it out here:

http://www.atu85.org/v2
ID: test
PW: testing


Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #1 on: April 28, 2010, 03:12:49 PM »
I need to add an update to this posting.  Turns out that the Left Block Vertical CSS menu is working just fine in IE, but there appears to be an issue when displaying it in Firefox.  IE layers the menu OVER the other blocks, while Firefox displays it under the Left Block, causing scroll bars.  This probably means that the PluginLab plug-in I am using for Dreamweaver is the culprit, not SP.

If anyone has seen this behavior before and could offer guidance, I'm all ears.  :)

Offline Eliana Tamerin

  • Comrade
  • *
  • Posts: 2889
  • Gender: Female
  • SMF Version: 2 RC2
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #2 on: April 28, 2010, 05:35:47 PM »
Do you mind posting the css of the menu and any other css you changed?
Ms. Eliana TamerinIt should be painfully obvious by now that I don't respond to support PMs. Don't send me PMs for support. They will be ignored and deleted, post on the Support Boards to get support.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #3 on: April 28, 2010, 06:52:23 PM »
I see this issue in IE8 running as IE8, but not when running in IE7 compatability.
Just looking at it in IE8 developer tools, I can see that the z-heights are a little odd, but I cannot figure out why.  You'd think putting the submenus in divs with z=50 would make them float way out on top of all the other divs, but IE8 says the divs inside the divs inside the z=50 divs have z=0 somehow.
 
I'm not sure if IE 8 is rendering it correctly or not.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #4 on: April 28, 2010, 06:55:30 PM »
There's another example of a similar problem at http://simpleportal.net/index.php?topic=5347.0
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #5 on: April 29, 2010, 09:18:59 AM »
Do you mind posting the css of the menu and any other css you changed?


Thank you for the offering of help.  I haven't added any custom CSS, but here's the CSS that's generated by the the VI Menu plug-in, which ultimately calls javascript to do the bulk of the work.  If you'd like to see the script, too, let me know.  I also have a ticket in with the PluginLab help desk. 


Code: [Select]
<div id="PLVIMGMCWeZCDiv" style="position:relative;width:150px;height:175px;z-index:50;white-space:nowrap;direction:ltr;">
  <div id="PLVIMGMCWeZCMain" style="width:100%;height:100%;">
    <ul style="margin:0px;padding:0px;font:normal normal normal 12px Verdana,Arial,Helvetica,sans-serif;">
  <li style="float:left;list-style:none;text-align:left;width:150px;height:25px;background-image:url(plvm_images/mm_up.png);"><a href="http://atu85.org/v2/index.php?action=profile" style="display:block;height:19px;padding:6px 0px 0px 6px;color:#000000;text-decoration:none;">My&nbsp;Profile</a></li>
<li style="float:left;list-style:none;text-align:left;width:150px;height:25px;background-image:url(plvm_images/mm_up.png);"><a href="http://atu85.org/v2/index.php?action=pm" style="display:block;height:19px;padding:6px 0px 0px 6px;color:#000000;text-decoration:none;">My&nbsp;Messages</a></li>
<li style="float:left;list-style:none;text-align:left;width:150px;height:25px;background-image:url(plvm_images/mm_up.png);"><a href="http://atu85.org/v2/index.php?action=calendar" style="display:block;height:19px;padding:6px 0px 0px 6px;color:#000000;text-decoration:none;">Events&nbsp;Calendar</a></li>
<li style="float:left;list-style:none;text-align:left;width:150px;height:25px;background-image:url(plvm_images/mm_up.png);"><a href="#" style="display:block;height:19px;padding:6px 0px 0px 6px;color:#000000;text-decoration:none;">Newsletter</a></li>
<li style="float:left;list-style:none;text-align:left;width:150px;height:25px;background-image:url(plvm_images/mm_up.png);"><a href="#" style="display:block;height:19px;padding:6px 0px 0px 6px;color:#000000;text-decoration:none;">Political&nbsp;Action</a></li>
<li style="float:left;list-style:none;text-align:left;width:150px;height:25px;background-image:url(plvm_images/mm_up.png);"><a href="#" style="display:block;height:19px;padding:6px 0px 0px 6px;color:#000000;text-decoration:none;">Resources</a></li>
<li style="float:left;list-style:none;text-align:left;width:150px;height:25px;background-image:url(plvm_images/mm_up.png);"><a href="#" style="display:block;height:19px;padding:6px 0px 0px 6px;color:#000000;text-decoration:none;">ATU&nbsp;Business</a></li>
</ul>
</div>
<script type="text/javascript" src="../Pluginlab/Scripts/PLVIM.js">/* PLVIMMenu script ID:PLVIMGMCWeZC */</script>
</div>

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #6 on: April 29, 2010, 09:50:23 AM »
Is it possible to force createMenu menues to be vertical?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #7 on: April 29, 2010, 10:35:47 AM »
Is it possible to force createMenu menues to be vertical?

I was looking into that...so I could simply do away with the external plugin/javascript all together.  Anyone know if I can mod createMenu easily to make it vertical?  (looking at the code now)


<edit> Doing a little learnin' today, looking into the possibility of scrapping the VI Menu from the DW plug-in and just using createMenu from within SMF. 

In Subs_Menu.php, I see there are two options for a "menu_Type", dropdown and sidebar.  I'm not really sure how to form that call to createMenu() in a Left Side Block to change those values, and I want to make sure my assumptions are correct. 
« Last Edit: April 29, 2010, 04:34:30 PM by jjwinc »

Offline antechinus

  • Comrade
  • *
  • Posts: 116
Re: Vertical Fly-Out Menu in a Block
« Reply #8 on: April 29, 2010, 05:08:40 PM »
Eliana pointed me at this. Flyout  and/or drop menus need to have absolute positioning if they have to overlap other elements. Just using z-index by itself is not enough. You need to use z-index and absolute positioning. Take a look at the css for the RC3 Curve menus (which still need a bit of tweaking for RC4 but work as is).

Also I think you are on the right path re dumping that plug-in. The code it turned out is rubbish. This is quite usual for any "site builders" or whatever that I've seen. They all seem to turn out crappy code.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #9 on: April 29, 2010, 08:49:53 PM »
I just worked out today that CreateMenu is used to create the admin and help menu/sidebar.  So that's what the two options do. Might not be exactly what you want.
 
I think the code you want for the fly-out menu might wind up being based on the sp_menu block. If you are using the standard menu bar, all you need to do is customize the CSS.  Otherwise, you'll need to write a function that works from a passed-in array instead of $context['...
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #10 on: April 30, 2010, 06:40:27 AM »
I just worked out today that CreateMenu is used to create the admin and help menu/sidebar.  So that's what the two options do. Might not be exactly what you want.
 
I think the code you want for the fly-out menu might wind up being based on the sp_menu block. If you are using the standard menu bar, all you need to do is customize the CSS.  Otherwise, you'll need to write a function that works from a passed-in array instead of $context['...


It took me a bit to realize that the dropdown and sidebar values apply to the state of the menu (collapsed or normal (not collapsed)).  I didn't realize that it applied to just the admin and help menus, though.  Thank you for the info.

Interestingly enough, I added a Simple Portal Menu block, which just takes the main menu and makes it a vertical block and it, too, has the same problem in Firefox.  The flyouts are flying under the frame.  Again, it works fine in IE. 

http://www.atu85.org/v2
ID: test
PW: testing

This leads me to believe that my plug-in for DW may not be the issue.  Is this something that has always been like this?  I see the other thread (that happens to be watching my thread) is having the same issue.

http://simpleportal.net/index.php?topic=5347.msg32478#msg32478

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #11 on: April 30, 2010, 11:53:33 AM »
I've just had a good look at your site, and poked around in the CSS using the IE8 "developer tools".  I saw that this problem happens when overflow: auto is applied to the <div class="sp_block that contains the menu block code.
 
I'm using SMF 2.0RC3 and SimplePortal 2.3.2, and <div class=sp_block does not appear in the menu block (though it does appear in several other blocks on the portal page http://www.rockhallsailingclub.org/smf2test/ps.php
 
I don't know why this causes the problem, but I know that you can get a quick fix this way:
Themes/default/css/portal.css
Code: (find) [Select]
div.sp_block
{
 overflow: auto;
 padding: 0 0.5em;
}
Code: (replace) [Select]
div.sp_block
{
/* overflow: auto; */
 padding: 0 0.5em;
}
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #12 on: April 30, 2010, 02:34:14 PM »
That worked like a charm, but all of the other blocks had the same property, causing my photo in the Welcome block to spill over outside of the borders.  So...I think we're a lot closer. 

I have learned one thing based on what you just told me.  I learned that IE is doing it incorrectly (ignoring the overflow: auto) and FF is handling it correctly (but we could've probably guessed that).  :)


In the Block that I have created, can I use the Style Options for Custom Title/Body Style at the bottom to control the overflow?  I saw other posts where you can control the title and body styles, but I think this is different because it's a div that applies to the whole block.

If not, I would like to see something added where I can control this, either in the Style Options area for the block or maybe a tick box asking if you would like overflow to be clipped, auto, visible, etc.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #13 on: April 30, 2010, 04:05:23 PM »
There is a report that FF 3.6.3 has the same problem IE8 has.
I think the problems you are having are exactly why overflow was put into the CSS.
You could try resizing your images to make it fit where it should.
 
I hope nathaniel can step in and offer some advice when he gets a chance.
 
I don't have this problem at
rockhallsailingclub.org/smf2test/ps.php
I am running SP 2.3.2 on SMF 2.0RC3, and SP 2.3.2 does not do <div class="sp_block  for the sp_menu block.  I keep getting lost in the code, and cannot find where SimplePortal decides whether or not to wrap the block in "sp_block".
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #14 on: April 30, 2010, 04:11:52 PM »
Actually, that would be a good place for me to start.  I need to upgrade from 2.3.1 to 2.3.2.  I had another posting about a problem I had with that upgrade and I got an answer, but I've yet to try it...been pulled this way and that with "life" things. 

Maybe I'll give that a try after the Penguins beat up on the Habs tonight <hockey reference>  Don't worry, no playoff beard here.  ;)

Thank you for all the guidance and input thus far.  It's greatly appreciated.

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #15 on: May 02, 2010, 09:25:35 AM »
I upgraded to 2.3.2 and I now see what you mean.  The Menu block created through SP does not wrap (overflow off) while the "member's only" block that I created still does.

I'm still sifting through code to see if I could put something together (and my skill level is just enough to get me in trouble).  If someone could lend a hand or offer suggestions, it would be greatly appreciated. 

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #16 on: May 18, 2010, 07:13:43 AM »
Good morning...

I still do not have a solution to this problem.  Would the next step be for me to post it in Blocks and Modifications or would this be a better candidate for the Bug Report forum? 

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #17 on: May 20, 2010, 10:35:55 AM »
<crickets>   

;)

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #18 on: May 20, 2010, 01:17:48 PM »
You are using a custom HTML block for the menu?

The CSS fix I gave above doesn't do the job? Of course, it has to be applied again after the upgrade.
 
If that does not do what you need, then, yes, I think a little custom coding in Portal.template.php could help.
« Last Edit: May 20, 2010, 02:49:54 PM by AngelinaBelle »
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #19 on: June 02, 2010, 12:43:25 PM »
The solution you provided above does work, but it impacts all blocks on the page, which causes a problem if the page is resized or if there's an overflow where I'm expecting scroll bars.

I think I'm looking for a fix that will apply to just the menu block that I've built (not the menu block that comes with SP).  I've been pulled in so many directions I haven't had a chance to play with this one in a week or so.  Would you know the area in Portal.template.php that would need to be changed?

Is there any way to check the name of the sp_block before setting the overflow?  Maybe set it to NOT overflow in the CSS and then check the name of the block in hard code and say something like "if <> menu, overflow:auto" or something along those lines?! 


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #20 on: June 02, 2010, 01:01:53 PM »
I know some block template improvements are coming in 2.4, but I haven't looked at them. That makes me a pretty lousy beta tester. You might put in a feature request to allow the admin to choose whether or not to have the "force scroll bars" CSS class applied to individual blocks.
 
I have thought of a pretty ugly hard-coded way to go about it, but it ought to work.
 
In SimplePortal 2.3.2 for SMF 2.0RC3, in Portal.template.php, you will find
Code: [Select]
$block['type'] == 'sp_menu' in two functions -- template_block_core and template_block_curve.
This is where the code decides to use a different CSS class on the block depending on the value of $block['type'].
 
$block['type'] is not going to help you in this case, of course.
 
But $block['id'] can help you.  Suppose your block id is 86. Then, for template_block_core, you could make a change like:
Code: (find) [Select]
<td class="sp_block_padding', ($block['type'] == 'sp_menu') ? '' : ' sp_block',
Code: (replace) [Select]
<td class="sp_block_padding', (  ($block['type'] == 'sp_menu' || $block['id'] == 86) ? '' : ' sp_block'  ),

For the function template_block_curve, you'd make a similar change. I haven't had a look at that yet. I may not be available to do that for a couple of days, but perhaps, if you get stuck, a dev or experienced community member may be able to give you a couple of pointers.
« Last Edit: June 08, 2010, 11:51:44 AM by AngelinaBelle »
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #21 on: June 02, 2010, 02:15:08 PM »
Your suggestion is making sense to me and I'm trying to make the updates, but I'm not seeing the code to which you are referring.  I, too, am running SP 2.3.2 and SMF 2.0RC3. 

First, I only see the $block['type'] == 'sp_menu' once and it's in template_block_core.  Secondly, it looks a little different.  You'll see your coding suggestion in there (block.id=21), but it doesn't do anything on my site.

Code: [Select]
function template_block_core($block)
{
global $settings;
echo '
<div class="', ($block['type'] == 'sp_menu' || $block['id'] == 21) ? '' : 'sp_block', !empty($block['style']['no_body']) ? '' : ' tborder', '">
<table class="sp_block">';

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #22 on: June 02, 2010, 06:11:06 PM »
That's good -- for non-curve-type themes. For core-type-themes, you need to find the similar thing in function template_block_curve
 
Something like:
Code: (find) [Select]
<div class="', $block['type'] != 'sp_menu' ? 'sp_block' : 'sp_content_padding'
Code: (replace) [Select]
<div class="', ( ($block['type'] == 'sp_menu' || $block['id'] == 21 )? 'sp_content_padding'  : 'sp_block' )

 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #23 on: June 07, 2010, 03:07:45 PM »
I'm wondering if I'm not looking at old template or something.  I just double checked to make sure I was running the latest/greatest of everything...and I am.  Here's my entire template_block_curve section found in Portal.template.php in the Themes/default directory.  None of it looks like what you're describing above, though, the one section near the bottom starting with

Code: [Select]
<div id="sp_block_' . $block['id'] . '"', empty($block['style']['body']['class'])
...looks like a section of interest.



Code: [Select]
function template_block_curve($block)

{

global $settings;



if ($block['collapsed'] && empty($block['force_view']))

$block['style']['body']['style'] .= 'display: none;';



if (empty($block['style']['no_title']))

{

echo '

<h3 class="', $block['style']['title']['class'], '"', !empty($block['style']['title']['style']) ? ' style="' . $block['style']['title']['style'] . '"' : '', '><span class="left"></span><span class="right"></span>';



if (empty($block['force_view']))

echo '

<a class="sp_float_right" style="padding-top: 7px;" href="javascript:void(0);" onclick="sp_collapseBlock(\'', $block['id'], '\')"><img id="sp_collapse_', $block['id'], '" src="', $settings['images_url'], $block['collapsed'] ? '/expand.gif' : '/collapse.gif', '" alt="*" /></a>';



echo '

', parse_bbc($block['label']), '

</h3>';

}



echo '

<div id="sp_block_' . $block['id'] . '"', empty($block['style']['body']['class']) ? '' : ' class="' . $block['style']['body']['class'] . '"', !empty($block['style']['body']['style']) ? ' style="' . $block['style']['body']['style'] . '"' : '', '>

<span class="topslice"><span></span></span>

<div class="sp_content_padding sp_block">';



$block['type']($block['parameters'], $block['id']);



echo '

</div>

<span class="botslice"><span></span></span>

</div>

<br />';

}

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #24 on: June 07, 2010, 05:06:32 PM »
I forgot you are still at simpleportal 2.3.1.
Code: (find, SimplePortal 2.3.1, template_block_curve) [Select]
<div class="sp_content_padding sp_block">'
Code: (replace) [Select]
<div class="', ( ($block['type'] == 'sp_menu' || $block['id'] == 21 )? 'sp_content_padding'  : 'sp_block' ), '">'

I do recommend coming up to SimplePortal 2.3.2, if at all possible.
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #25 on: June 08, 2010, 08:42:54 AM »
Something is amiss...I am running 2.3.2, or at least that's what it says under General Information on the Configuration tab.  Before I do anything, should I fix this?


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #26 on: June 08, 2010, 09:13:17 AM »
Your profile says you are running SimplePortal 2.3.1, and I just assumed that was true.
 
Please have a look at the file  Portal.template.php and see what it says about version.
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #27 on: June 08, 2010, 09:40:52 AM »
Thanks for the reminder...I updated my Profile.  I  took a look at Portal.template.php and here's what it says at the top:

Code: [Select]
<?php
// Version: 2.0 RC3; Post

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #28 on: June 08, 2010, 10:38:33 AM »
That looks like the top of Post.template.php.
That happens to me ALL THE TIME.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #29 on: June 08, 2010, 11:04:16 AM »
 :-[

How embarrassing...LOL

Code: [Select]
<?php

// Version: 2.3.1; Portal

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #30 on: June 08, 2010, 11:36:55 AM »
That happens to me all the time. You have there a file from SimplePortal 2.3.1 -- not the latest and greatest.
 
Is that the only one? Or do you have other SimplePortal 2.3.1 files in /Templates/default/ or in /Sources/?
 
You should take a quick peek and decide if you want to manually copy the files into place or uninstall SimplePortal and re-install it (after making sure you have proper permissions, of course).
 
After that, you should have an easier time finding SimplePortal 2.3.2 strings.  :)
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #31 on: June 08, 2010, 11:46:20 AM »
The rest of the Portal.xx.php files all say 2.3.2.  I haven't had a chance to check the source directory yet.  I will do so when I'm back at my desk.  I looks like I'll just need to upload Portal.template.php and I should be good.  I'll let you know how it turns out (probably tomorrow).

Thank you again for all the guidance.  It's greatly appreciated.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #32 on: June 08, 2010, 11:53:35 AM »
... and then you'll be ready to apply the changes.
 
Enjoy
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #33 on: June 09, 2010, 09:30:03 AM »
Okay, looks like something didn't take with the last upgrade I performed.  the Portalxx.php files in the Sources directory all have either v2.3 or v2.3.1 in them.  Assuming they should say v2.3.2, I'm going to do an uninstall and reinstall.  I need to browse the documentation before I do to make sure I'm not going to lose my blocks and articles as they stand now.
 

Code: [Select]
<?php

/**********************************************************************************

* PortalMain.php                                                                  *

***********************************************************************************

* SimplePortal                                                                    *

* SMF Modification Project Founded by [SiNaN] (sinan@simplemachines.org)          *

* =============================================================================== *

* Software Version:           SimplePortal 2.3                                    *

* Software by:                SimplePortal Team (http://www.simpleportal.net)     *


or


Code: [Select]
<?php

/**********************************************************************************

* PortalBlocks.php                                                                *

***********************************************************************************

* SimplePortal                                                                    *

* SMF Modification Project Founded by [SiNaN] (sinan@simplemachines.org)          *

* =============================================================================== *

* Software Version:           SimplePortal 2.3.1                                  *

* Software by:                SimplePortal Team (http://www.simpleportal.net)     *

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #34 on: June 09, 2010, 10:39:33 AM »
I'm happy to report that all of my files are now 2.3.2 AND I installed the coding changes you requested and...<drum roll>...it works in both IE and Firefox!

http://www.bowlthis.com/v2
ID: test
PW: testing


For those of you that may follow this thread, here are the changes that I finally made.  I'm using SMF 2.0 RC3 and SP 2.3.2.  In Portal.template.php in the Themes/Default directory, line 122, I changed this:

Code: [Select]
<td class="sp_block_padding', ($block['type'] == 'sp_menu') ? '' : ' sp_block', empty($block['style']['body']['class']) ? '' : ' ' . $block['style']['body']['class'], '"', !empty($block['style']['body']['style']) ? ' style="' . $block['style']['body']['style'] . '"' : '', '>';
to this...

Code: [Select]
<td class="sp_block_padding', ($block['type'] == 'sp_menu' || $block['id'] == 21) ? '' : ' sp_block', empty($block['style']['body']['class']) ? '' : ' ' . $block['style']['body']['class'], '"', !empty($block['style']['body']['style']) ? ' style="' . $block['style']['body']['style'] . '"' : '', '>';
Make sure to put the $block['id'] of the block you want to change (don't leave it 21).  The block ID can be obtained by going into Admin --> Simple Portal --> Blocks and editing the block in question.  The block ID will be displayed in the URL while you're in edit mode.



Next, on line 171, I changed:

Code: [Select]
<div class="', $block['type'] != 'sp_menu' ? 'sp_block' : 'sp_content_padding', '"', !empty($block['style']['body']['style']) ? ' style="' . $block['style']['body']['style'] . '"' : '', '>';
to this...

Code: [Select]
<div class="', (($block['type'] == 'sp_menu' || $block['id'] == 21) ? 'sp_content_padding' : 'sp_block'), '"', !empty($block['style']['body']['style']) ? ' style="' . $block['style']['body']['style'] . '"' : '', '>';

This time, please note, not only do you add your block ID, but you also have to switch sp_block and sp_content_padding and put parentheses around everything.  If you copy/paste this code, you should be good (just remember to change the block ID to your block ID.

Also note, change has been made to this code based on the next two follow-up messages.  The code above is correct.



Thank you for all of your help!  On to the next update!   :nervous-happy:


« Last Edit: June 09, 2010, 03:02:00 PM by jjwinc »

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #35 on: June 09, 2010, 10:52:36 AM »
AngelinaBelle,

Okay, so...I got a little too happy, too soon; there's still a problem.  The menu is flying out over the other blocks, but now it appears that ALL blocks have the overflow turned off because we're back to an image in a completely different block overlapping, too.  It's happening in both IE and FF.  It's almost like the Block.ID is being ignored.  The good news is, you have a copy of my code above.  :-) 

I may just add a bunch of blank lines in the Welcome block and call it a day, but since we've (read you've) worked on this so long, I thought I'd run it by you once more time.


Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #36 on: June 09, 2010, 11:26:34 AM »
It's probably doing just what it was told to do.  :D
Try this instead.
Code: [Select]
<div class="', (($block['type'] == 'sp_menu' || $block['id'] == 21) ? 'sp_content_padding' : 'sp_block'), '"', !empty($block['style']['body']['style']) ? ' style="' . $block['style']['body']['style'] . '"' : '', '>';

Because you generally don't want sp_content_padding when it is not an sp_menu block.
 
----
Edit: fixed typo in code
« Last Edit: June 09, 2010, 08:41:33 PM by AngelinaBelle »
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline jjwinc

  • Semi Newbie
  • *
  • Posts: 37
  • Gender: Male
    • ATU85
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #37 on: June 09, 2010, 01:46:04 PM »
I stared at that code a thousand times and the != didn't even register.  LOL  That latest change worked (but I had to change it to == rather than the single equal sign).   :)

This is what it looks like now:
Code: [Select]
<div class="', (($block['type'] == 'sp_menu' || $block['id'] == 21) ? 'sp_content_padding' : 'sp_block'), '"', !empty($block['style']['body']['style']) ? ' style="' . $block['style']['body']['style'] . '"' : '', '>';


Problem solved!  Thank you, AngelinaBelle!

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Vertical Fly-Out Menu in a Block
« Reply #38 on: June 09, 2010, 08:40:54 PM »
 :-[  typo.  Good eye. Have fun!
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?