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: 1
  • Guests: 450
  • Total: 451
  • @rjen

[Discussion] Tabbed Block by Mouse Over

Started by Freddy, September 05, 2009, 05:31:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ZarPrime

agent47,

Well, I don't have this tabbed block up and running on any of my test sites right now so I'm kind of unfamiliar with it and Freddy is kind of busy right now with a class.

The code in my post above will work in a php block.  I assume that this tabbed block has some way of putting code into each of your tabs so it should work fine to place it into one or more of the tabs.  I suppose that I could install this tabbed block and figure it out but if you already have it up and working, it will probably be as easy for you to do it as it would me.  If you want me to do it, it will have to wait until this weekend or so before I can get to it.  I'll mark this topic unread for me so that I'll see it again over the weekend.

ZarPrime

Freddy

Any code needs to go in the external php file.

There's an example of how to customise this here :

http://www.tinyportal.net/index.php?topic=30787.msg247669#msg247669

Sorry that's about all I have time for  :o

shuban

I'm getting a load.php error after I put this code into a block :( How do I fix this? This is such a unique block.

IchBin

Quote from: shuban on April 21, 2011, 12:51:11 AM
I'm getting a load.php error after I put this code into a block :( How do I fix this? This is such a unique block.

It usually helps if you post what versions you are using of SMF and TP. It also helps if you post the exact error you are getting. No providing any info doesn't help us to help you.

shuban

Quote from: IchBinâ,,¢ on April 21, 2011, 02:07:04 AM
Quote from: shuban on April 21, 2011, 12:51:11 AM
I'm getting a load.php error after I put this code into a block :( How do I fix this? This is such a unique block.

It usually helps if you post what versions you are using of SMF and TP. It also helps if you post the exact error you are getting. No providing any info doesn't help us to help you.

Crap, my apologies. I am using 1.1.13 smf and I am getting these errors on the top:

Notice: Undefined index: BAN_CHECK_IP in /home/biologyf/public_html/Sources/Load.php on line 519

Notice: Undefined index: Newest Topic in /home/biologyf/public_html/Sources/Load.php(2060) : eval()'d code on line 297

And then it's showing the table with all the appropriate information underneath. How do I get rid of those ugly errors?

IchBin

Thanks for the info Shuban. Can you post the code that you are putting in for the tabs? The errors indicate you have something wrong in the code. I don't see any of those errors in the tab block stuff that Freddy has linked to.

shuban

Yes, here it is, thank you:

// Set which categories you want to pull recent articles from.  Comma separated ! 

$categories = '1,2,3,4';

/* ######### CSS for top level tabs ######### */

echo '
<style type="text/css"><!--
.tabsmenuclass ul{
overflow: hidden;
width: auto;
margin: 0px 0px -1px 0px;
padding: 0;
list-style-type: none;
}

.tabsmenuclass li{
float: left;
}

.tabsmenuclass a{
display: block;
padding: 5px 7px;
background: #ddd;
color: #888888;
margin-right: 5px;
text-decoration: none;
font: bold 13px Arial;
}

.tabsmenuclass a:hover, .tabsmenuclass a.selected{
background: #e8e8e8;
color: black;
text-decoration:none !important;
border-top: 1px solid silver;
border-right: 1px solid silver;
border-bottom: 0px;
border-left: 1px solid silver;
}';

/* ######### CSS for sub menu container below ######### */
/* height 224px could also be 'auto' or whatever you like size-wise */

echo '
.tabsmenucontentclass{
clear: left;
background: #E8E8E8;
width: 99%;
height: 224px;
overflow:auto;
padding: 0px;
border: 1px solid silver;
}

.tabsmenucontentclass ul{
margin: 0;
padding: 0;
list-style-type: none;
}

.tabsmenucontentclass li{
float: left;
margin-right: 1em;
}
--></style>

<script src="tabbed_block/mouseovertabs.js" type="text/javascript">
/***********************************************
* Mouseover Tabs Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>


<div id="mytabsmenu" class="tabsmenuclass">
<ul>
<li><a href="#" rel="gotsubmenu[selected]">Unanswered Questions/Topics</a></li>
<li><a href="#" rel="gotsubmenu">Latest Topics</a></li>
<li><a href="#" rel="gotsubmenu">News Articles</a></li>
</ul>
</div>

<div id="mysubmenuarea" class="tabsmenucontentclass">
<!--1st link within submenu container should point to the external submenu contents file-->
<a href="tabbed_block/mouseoverTabContent.php?categories=' , $categories , '" style="visibility:hidden">Sub Menu contents</a>
</div>

<script type="text/javascript">
//mouseovertabsmenu.init("tabs_container_id", "submenu_container_id", "bool_hidecontentsmouseout")
mouseovertabsmenu.init("mytabsmenu", "mysubmenuarea", false)
</script>
';

Freddy

Hmm, those errors report variables that I did not use in my block.  It must be some other mod that is causing the errors but I couldn't say which one.

Freddy

Was thinking - these are probably from other mods that do not make the required changes to SSI.php  I think a lot of mod makers over look that as it's not an essential change generally.  Since this block relies on SSI it could easily be the problem.

What you could do is look in your index.php (forum root) and see if your mods have added some includes/requires.  Normally the default SMF 1 includes look like this (near the top of index.php) :

// And important includes.
require_once($sourcedir . '/QueryString.php');
require_once($sourcedir . '/Subs.php');
require_once($sourcedir . '/Errors.php');
require_once($sourcedir . '/Load.php');
require_once($sourcedir . '/Security.php');


Some mods will add further includes.

If there are any extra ones, then adding them also to the SSI.php includes, which is a similar arrangement, might help.

Or the alternative is to declare the missing variables (if they are unset) to zero or empty strings - you could do that in SSI.php possibly, not sure about the scope..

If that makes no sense then please get back to us.  But first take a look at your index.php file to see if there are some extra lines there and then post them here.

shuban

Thanks for the response. I checked the index.php and found only those:

// And important includes.
require_once($sourcedir . '/QueryString.php');
require_once($sourcedir . '/Subs.php');
require_once($sourcedir . '/Errors.php');
require_once($sourcedir . '/Load.php');
require_once($sourcedir . '/Security.php');


:-\

I really like this portal, crap.

This website is proudly hosted on Crocweb Cloud Website Hosting.