Tab Forum question
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #31
RE: Tab Forum question
(06-05-2011 01:46 AM)bxx Wrote:  1. Its at the moment working in the portal

(06-05-2011 01:46 AM)bxx Wrote:  I want to include it into the Tabs.


If you able to make it works for index page, you can add it to the new tabs.

(This post was last modified: 06-05-2011 01:54 AM by RateU.)
06-05-2011 01:53 AM
Find all posts by this user Quote this message in a reply
bxx Offline
Junior Member
**
Posts: 23
Joined: May 2011
Post: #32
RE: Tab Forum question
Ok i will work on it now.

I will reply later Wink

Hope i can tell the solution Smile
06-05-2011 01:55 AM
Find all posts by this user Quote this message in a reply
bxx Offline
Junior Member
**
Posts: 23
Joined: May 2011
Post: #33
RE: Tab Forum question
Now got it working on index with ProStats.

When i include the code from prostats

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<script type="text/javascript">
<!--

var spinner=null;

function prostats_reload()
{
	if(spinner){return false;}
	this.spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});
	new Ajax.Request('xmlhttp.php?action=prostats_reload&my_post_key='+my_post_key, {method: 'post',postBody:"", onComplete:prostats_done});
	return false;
}

function prostats_done(request)
{
	if(this.spinner)
	{
		this.spinner.destroy();
		this.spinner = '';
	}
	if(request.responseText.match(/<error>(.*)<\/error>/))
	{
		message = request.responseText.match(/<error>(.*)<\/error>/);
		alert(message[1]);
	}
	else if(request.responseText)
	{
		$("prostats_table").innerHTML = request.responseText;
	}
}
-->
</script>



		<div id="prostats_table">

		<table width="100%" border="0" cellspacing="{$theme[borderwidth]}" cellpadding="0" class="tborder">
		<thead>
		<tr><td colspan="{$num_columns}">
			<table border="0" cellspacing="0" cellpadding="{$theme[tablespace]}" width="100%">
			<tr class="thead">
			<td><strong>{$lang->prostats_prostats}</strong></td>
			<td style="text-align:{$ps_ralign};"><a href="" onclick="return prostats_reload();">{$lang->prostats_reload} <img src="{$mybb->settings['bburl']}/images/prostats/ps_reload.gif" style="vertical-align:middle;" alt="" /></a></td>
			</tr>
			</table>
		</td>
		</tr>
		</thead>
		<tbody>
		{$trow_message_top}
		<tr valign="top">
		{$prostats_content}
		</tr>
		{$trow_message_down}
		</tbody>
		</table>
		<br />
                </div>



with:

PHP Code:
<div id="latest_posts" class="content"> ...</div>


nothing happens.


Also I testet with the global Tag of ProStats:

PHP Code:
<div id="latest_posts" class="content">
<ProStats>
</div>



Is there anything wrong in my thinking?

06-05-2011 03:28 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #34
RE: Tab Forum question
Post your current index template here.

Is this a ProStats template?
(06-05-2011 03:28 AM)bxx Wrote:  

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<script type="text/javascript">
<!--

var spinner=null;

function prostats_reload()
{
	if(spinner){return false;}
	this.spinner = new ActivityIndicator("body", {image: "images/spinner_big.gif"});
	new Ajax.Request('xmlhttp.php?action=prostats_reload&my_post_key='+my_post_key, {method: 'post',postBody:"", onComplete:prostats_done});
	return false;
}

function prostats_done(request)
{
	if(this.spinner)
	{
		this.spinner.destroy();
		this.spinner = '';
	}
	if(request.responseText.match(/<error>(.*)<\/error>/))
	{
		message = request.responseText.match(/<error>(.*)<\/error>/);
		alert(message[1]);
	}
	else if(request.responseText)
	{
		$("prostats_table").innerHTML = request.responseText;
	}
}
-->
</script>



		<div id="prostats_table">

		<table width="100%" border="0" cellspacing="{$theme[borderwidth]}" cellpadding="0" class="tborder">
		<thead>
		<tr><td colspan="{$num_columns}">
			<table border="0" cellspacing="0" cellpadding="{$theme[tablespace]}" width="100%">
			<tr class="thead">
			<td><strong>{$lang->prostats_prostats}</strong></td>
			<td style="text-align:{$ps_ralign};"><a href="" onclick="return prostats_reload();">{$lang->prostats_reload} <img src="{$mybb->settings['bburl']}/images/prostats/ps_reload.gif" style="vertical-align:middle;" alt="" /></a></td>
			</tr>
			</table>
		</td>
		</tr>
		</thead>
		<tbody>
		{$trow_message_top}
		<tr valign="top">
		{$prostats_content}
		</tr>
		{$trow_message_down}
		</tbody>
		</table>
		<br />
                </div>


06-05-2011 03:38 AM
Find all posts by this user Quote this message in a reply
bxx Offline
Junior Member
**
Posts: 23
Joined: May 2011
Post: #35
RE: Tab Forum question
Index Template:

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
<script type="text/javascript">
<!--
	lang.no_new_posts = "{$lang->no_new_posts}";
	lang.click_mark_read = "{$lang->click_mark_read}";
// -->
</script>
</head>
<body id="tab2">
{$header}

<script type="text/javascript" src="jscripts/jquery-1.3.2.min.js"></script>

<script type="text/javascript">

$.noConflict();

</script>

<script type="text/javascript">

jQuery(document).ready(function($){

$('.tab').click(function(){

$('.at').removeClass('at');

$(this).addClass('at');

$('.content').slideUp();

var catshow = $(this).attr('rel');

$('#'+ catshow).slideDown();

});

});

</script>
<table border="0" width="100%" class="tborder" cellpadding="4" cellspacing="5" style="margin-bottom: 13px;">

<tr align="center">

<td class="tcat2 tab" title="Category 1" style="cursor: pointer;"rel="cat_1">Category 1</td>

<td class="tcat2 at tab" title="Category 4" style="cursor: pointer;" rel="cat_4">Category 4</td>

<td class="tcat2 tab" title="Category 9" style="cursor: pointer;" rel="cat_6">Category 6</td>
<td class="tcat2 tab" title="Last Posts" style="cursor: pointer;" rel="latest_posts">TestKAT</td>
</tr>
</table>
{$forums}


{$boardstats}


<dl class="forum_legend smalltext">
	<dt><img src="{$theme['imgdir']}/on.png" alt="{$lang->new_posts}" title="{$lang->new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
	<dd>{$lang->new_posts}</dd>

	<dt><img src="{$theme['imgdir']}/off.png" alt="{$lang->no_new_posts}" title="{$lang->no_new_posts}" style="vertical-align: middle; padding-bottom: 4px;" /></dt>
	<dd>{$lang->no_new_posts}</dd>

	<dt><img src="{$theme['imgdir']}/offlock.png" alt="{$lang->forum_locked}" title="{$lang->forum_locked}" style="vertical-align: middle;" /></dt>
	<dd>{$lang->forum_locked}</dd>
</dl>
<br style="clear: both" />
{$footer}
</body>
</html></template>



The Code I posted should be the right prostats template i got it from here:
   

06-05-2011 03:57 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #36
RE: Tab Forum question
OK. I've downloaded the ProStats plugin and try it. The plugin add this variable in index template:

Code:
{$ps_header_index}

before the {$forums} variable, and add this variable after the {$forums} variable:

Code:
{$ps_footer_index}


Change your code in line #53:

HTML Code
<td class="tcat2 tab" title="Last Posts" style="cursor: pointer;" rel="latest_posts">TestKAT</td>

to:

HTML Code
<td class="tcat2 tab" title="Last Posts" style="cursor: pointer;" rel="prostats_table">TestKAT</td>


And change the prostats template in line #36:

HTML Code
<div id="prostats_table">

to:

HTML Code
<div id="prostats_table" class="content">


If you hide some categories via CSS, hide the #prostats_table category too (I prefer to do this via jQuery to make it an unobtrusive tabs).


06-05-2011 04:13 AM
Find all posts by this user Quote this message in a reply
bxx Offline
Junior Member
**
Posts: 23
Joined: May 2011
Post: #37
RE: Tab Forum question
Thank you so much!Love

Now it's working Smile

Can I hide via jQuery direkt in the <script> ...</script> area?

Never worked so many times with it.
06-05-2011 05:30 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #38
RE: Tab Forum question
Probably something like this
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=613&pid=52

And remove the hide CSS.

06-06-2011 01:45 AM
Find all posts by this user Quote this message in a reply
bxx Offline
Junior Member
**
Posts: 23
Joined: May 2011
Post: #39
RE: Tab Forum question
Testet now some time with the Tabs.

But I got a new question.

Is it with this system possible to show a forum like you do at your xthread demo?

I want do do it with one forum online.

The others should look like dissused here before.

Sorry for the bad english... Wink
06-21-2011 05:16 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #40
RE: Tab Forum question
If what you mean is like the tabs in the demo forum, it's CSS menu only.
The basic method for that:
http://mybbhacks.zingaburga.com/showthre...http://mybbhacks.zingaburga.com/showthread.php?tid=613&pid=49

Each menu has a link to a specified forum id, and I hide the forum with XThreads (via XThreads forum setting). So, it means that it loads a different page.
The javascript tabs menu we discussed here is, basically, hide and display a specified area on the same page (in this case is index page).

06-22-2011 04:43 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: