TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 423
  • Total: 423

[Block] Multi Tab Block! (new)

Started by dimdom, January 12, 2009, 07:13:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zetan

deleted my post as it wasn't really relevant.

Freddy

#41
@JP, Ok then I will see what I can do...

Thanks anyway Zetan...but yes I think that was what we already had..

I see a problem with the code at Dynamic Drive :

That menu system will not work with dynamic php rendered content.  That is because it relies on static HTML to build the submenu contents.  I quote :

QuoteA corresponding sub menu container DIV:

<div id="mysubmenuarea" class="tabsmenucontentclass">

<!--1st link within submenu container should point to the external submenu contents file-->
<a href="submenucontents.htm" style="visibility:hidden">Sub Menu contents[/url]

</div>

So I know what you are getting at, but with the way that code works it is not possible.

JPDeni

#42
If you print out the html through php, you can make it work. Something like


$link = 'submenucontents.htm';

echo '
<div id="mysubmenuarea" class="tabsmenucontentclass">

<!--1st link within submenu container should point to the external submenu contents file-->
<a href="' . $link . '" style="visibility:hidden">Sub Menu contents

</div>';



You can define the variable any way you want, including by a $_REQUEST variable or a call to the database.

Freddy

#43
Yeah I see what you mean.  Things is; however you do a link to that .htm file it is still going to be static HTML (contained within it) , so I can't see how instead of the links you would show a tab full of content... hope that makes sense..

submenucontents.htm only holds HTML because the code is looking for static HTML to crawl and then from that it generates the submenu.

Edit : Hmmm...you have given me an idea.  It might be possible to make submenucontents.htm into a PHP file and link to that, it just depends on what the javascript is looking for.  This would mean that you would have to have a seperate PHP file sitting on your server which grabs all the content...and the menu system just crawls the resulting (echoed) HTML instead.


Freddy

Well it seems a bit wayward but it does actually work.  I noticed a slight delay when loading - but they thought to provide a 'loading' message.  So who knows maybe this could work after all.  It's going to mean figuring out what needs to be included in the 'external' PHP file to make all that dynamic content available.

dimdom

QuoteEdit : so I assume you want the tabbed content to show when you hover over the tabs too ?  Rather than clicking on the tab to show the content ?

Thanx freddy888 for your time in this.  :)

Well, I believe that it would be better not to use the hover effect.




Freddy

Good timing dimdom...

I am working on this at the moment and I am pleased with the results so far.  I've actually left the hover over effect in, because it's quite cool and it saves clicking lol

But yes, it will mean using some new files dropped in the forum root and also an external PHP file which I need to figure out - that means I need to work out what it needs to include (ie grab from SMF)...

Leave it with me, I am going to set up a demo forum for this (needed to do this before really) and I will probably post this in a new thread as it's such a departure from the code that this thread was originally covering.

Time for my tea though, so back later.  :)

JPDeni

QuoteWell it seems a bit wayward but it does actually work.  I noticed a slight delay when loading - but they thought to provide a 'loading' message.  So who knows maybe this could work after all.  It's going to mean figuring out what needs to be included in the 'external' PHP file to make all that dynamic content available.

I get it now. I think. :)

Good for you getting this going. I don't deal with javascript very often and for some reason I haven't been able to picture this at all.

Freddy

:)  Well everything I know about javascript could be written on a matchbox.  As long as I don't have to tinker with it too much I'm usually OK.

dimdom

#49
freddy888, take your time. ;)

Let us know if something is ready to be tested.


QuoteI've actually left the hover over effect in

It is easy to change the behaviour from inside the .js file

And all you have to do is to target the script (within the php file) to .css and .js files (the .css code could actually be copied inside the infopanel2.php in order to minimize the installation steps).

Just an idea.

This website is proudly hosted on Crocweb Cloud Website Hosting.