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,913
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 485
  • Total: 485

Multi-TP Blocks

Started by akulion, December 17, 2006, 10:17:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

akulion

ok guys ill have a look at this stuff soon - sorry but im being kept busy with a lotta things here and there - so my apologies for not respnding sooner

but hopefully today or tomorrow when I have some free time to sit and relax Ill have a look :up:

brianjw


sfboarders

I tried "Option 1" and the code worked perfect. I want to use "Option 2" so I can install the tabbed blocks on the side and center blocks but it only shows the tabs with no contents (attached screenshot). I am using SMF1.1.1 w/ TP .97.

Below is my code:

In the phpbox

echo'
<ul id="maintab1" class="shadetabs">
<li class="selected">
<a href="#" rel="tcontent8">User</a></li>
<li><a href="#" rel="tcontent9">Stats</a></li>
</ul>
<div class="tabcontentstyle2"><div id="tcontent8" class="tabcontent">';
TPortal_userbox();
echo'</div><div id="tcontent9" class="tabcontent">';
TPortal_statsbox();
echo'</div></div>';


In index.template.php at the end of </head>


if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + '  . '"/'. $settings['theme_main_color'] . '" + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
<link rel="stylesheet" type="text/css" href="tabcontent.css" />
<script type="text/javascript" src="tabcontent.js">
/***********************************************
* Tab Content script- Ã,© 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 full source code
***********************************************/
</script>
</head>
<body>';
// TinyPortal start
  if($context['TPortal']['fixed_width']!=0)
echo '<table align="center" width="'.$context['TPortal']['fixed_width'].'" cellpadding="0" cellspacing="0" border="0"><tr><td>';
// TinyPortal end




In index.template.php at the end of </body>


echo '
<div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
';
// TinyPortal
  if($context['TPortal']['fixed_width']!=0)
echo '</td></tr></table>';
// end
echo '
<script type="text/javascript">
initializetabcontent("maintab", "maintab1")
</script>
</body></html>';
}


Added new line in tabcontent.css

.shadetabs li.selected a:hover{ /*selected main tab style */
text-decoration: none;
}

.tabcontentstyle2{ /*style of tab content oontainer*/
border: 1px solid gray;
width: 150px;
margin-bottom: 1em;
padding: 10px;
}

.tabcontentstyle{ /*style of tab content oontainer*/
border: 1px solid gray;
width: 760px;
margin-bottom: 1em;
padding: 10px;
}


Receiving the following js error in IE.
Quote
Line: 56
Char: 1
Error: "null" is null or not an object
Code: 0

ZarPrime

Well, if it's any consolation, at least your buttons look nice, very nice indeed.  ;)

ZarPrime

brianjw

This is the same problem i had too: (demo: Click here) It is not there, but go to the homepage. It is there ???
Quote from: sfboarders on January 05, 2007, 04:47:56 AM
I tried "Option 1" and the code worked perfect. I want to use "Option 2" so I can install the tabbed blocks on the side and center blocks but it only shows the tabs with no contents (attached screenshot). I am using SMF1.1.1 w/ TP .97.

Below is my code:

In the phpbox

echo'
<ul id="maintab1" class="shadetabs">
<li class="selected">
<a href="#" rel="tcontent8">User</a></li>
<li><a href="#" rel="tcontent9">Stats</a></li>
</ul>
<div class="tabcontentstyle2"><div id="tcontent8" class="tabcontent">';
TPortal_userbox();
echo'</div><div id="tcontent9" class="tabcontent">';
TPortal_statsbox();
echo'</div></div>';


In index.template.php at the end of </head>


if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + '  . '"/'. $settings['theme_main_color'] . '" + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
<link rel="stylesheet" type="text/css" href="tabcontent.css" />
<script type="text/javascript" src="tabcontent.js">
/***********************************************
* Tab Content script- Ã,© 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 full source code
***********************************************/
</script>
</head>
<body>';
// TinyPortal start
  if($context['TPortal']['fixed_width']!=0)
echo '<table align="center" width="'.$context['TPortal']['fixed_width'].'" cellpadding="0" cellspacing="0" border="0"><tr><td>';
// TinyPortal end




In index.template.php at the end of </body>


echo '
<div id="ajax_in_progress" style="display: none;', $context['browser']['is_ie'] && !$context['browser']['is_ie7'] ? 'position: absolute;' : '', '">', $txt['ajax_in_progress'], '</div>
';
// TinyPortal
  if($context['TPortal']['fixed_width']!=0)
echo '</td></tr></table>';
// end
echo '
<script type="text/javascript">
initializetabcontent("maintab", "maintab1")
</script>
</body></html>';
}


Added new line in tabcontent.css

.shadetabs li.selected a:hover{ /*selected main tab style */
text-decoration: none;
}

.tabcontentstyle2{ /*style of tab content oontainer*/
border: 1px solid gray;
width: 150px;
margin-bottom: 1em;
padding: 10px;
}

.tabcontentstyle{ /*style of tab content oontainer*/
border: 1px solid gray;
width: 760px;
margin-bottom: 1em;
padding: 10px;
}


Receiving the following js error in IE.
Quote
Line: 56
Char: 1
Error: "null" is null or not an object
Code: 0

sfboarders

For some reason the code below before </body> is giving me a js error.


<script type="text/javascript">
initializetabcontent("maintab", "maintab1")
</script>


At least you were able to get the tabs to show some content. Also, how did you create that center block on your homepage with all those tabs? That's what I'd like to do on my site.

brianjw

I'm not sure what is going on with that js code you have. It is working for me and it is the same ???
Make sure you followed all the instructions on the beginning of this thread (thats all i could tell you ???)

As for the center blocks can be found right here: (instructions start step by step :))
CLick HEre ;)

akulion

#47
Quote from: sfboarders on January 08, 2007, 01:46:46 AM
For some reason the code below before </body> is giving me a js error.


<script type="text/javascript">
initializetabcontent("maintab", "maintab1")
</script>


At least you were able to get the tabs to show some content. Also, how did you create that center block on your homepage with all those tabs? That's what I'd like to do on my site.

yup im getting the error too
but no worries ill ask down at dynamic drive about the error - seems there is an error in their code itself, and they should be able to sort it out asap :up:

As for the shoutbox - it seems it dosent wana work with the tabbed content. So i guess we have to give up on that one :(

RoarinRow


SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

sfboarders

Quote from: brianjw on January 08, 2007, 02:14:40 AM
I'm not sure what is going on with that js code you have. It is working for me and it is the same ???
Make sure you followed all the instructions on the beginning of this thread (thats all i could tell you ???)

As for the center blocks can be found right here: (instructions start step by step :))
CLick HEre ;)

OK, I played around with the moofx and decided to scrap it. I would be better of sticking with one type of tab version. So I was able to get the tabs to work in the center block and beleive it or not I got the user and stats to show up on the homepage. But I am having the same problem as you. It shows no content when you go in the forum or any other page. I noticed that Aku's site shows it correctly.

This website is proudly hosted on Crocweb Cloud Website Hosting.