MyBB Community Forums

Full Version: Old threads appearing in the Latest Thread sidebox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I installed Advanced Sidebox [http://mods.mybb.com/view/advanced-sidebox] (the plugin that I really wanted), but the sideboxes were not showing in the index page at all.

Then, I istalled the "Latest Threads" sidebox plugin by Nayar.

New threads are appearing in the sidebox, but everytime I post something on any thread, the thread appears in the "Latest Thread" sidebox, whether it's a new thread or a really old one.

I want to show only the latest threads in the sidebox.

I think the problem is in the Index Page Templates --> index, but I'm not even sure.

Hope someone can help me with either of these plugins.
Latest Threads may be a bit of a misnomer, both Nayar's sidebox.php and Advanced Sidebox take the code for the latest threads from portal.php's implementation, which features threads that have recently been posted in, rather than actually only showing new threads.

Back to your first issues, Advanced Sidebox ships with some basic script definitions that work well on a lot of themes, but if you use a custom theme then it might require a little adjusting to display correctly for you.

Which theme are you using?
(2014-03-18, 03:35 AM)Wildcard Wrote: [ -> ]Latest Threads may be a bit of a misnomer, both Nayar's sidebox.php and Advanced Sidebox take the code for the latest threads from portal.php's implementation, which features threads that have recently been posted in, rather than actually only showing new threads.

Oh. I see. So is there any way to show only new threads regardless of recent posts?

(2014-03-18, 03:35 AM)Wildcard Wrote: [ -> ]Back to your first issues, Advanced Sidebox ships with some basic script definitions that work well on a lot of themes, but if you use a custom theme then it might require a little adjusting to display correctly for you.

Which theme are you using?

I'm using Eva by Finer --> http://www.mybb-es.com/hilo-theme-eva

The technical admin made some changes, though.
(2014-03-18, 03:45 AM)Pann Wrote: [ -> ]Oh. I see. So is there any way to show only new threads regardless of recent posts?

It wouldn't be hard to modify the latest threads module if you know a little PHP. Rather than searching for posts and sorting by dateline, it could be modified to look only at posts which were the firstpost in a thread-- effectively limiting the thread list to newly (or recently) created threads.

(2014-03-18, 03:45 AM)Pann Wrote: [ -> ]I'm using Eva by Finer --> http://www.mybb-es.com/hilo-theme-eva

I am having a hard time understanding why things wouldn't work on Index . . . ASB searches for and wraps the header and footer by default on index.php . . . I wouldn't think your theme would have removed those two variables no matter how customized it is.

However, my efforts to download and test the theme failed due to my lack of Spanish and having to sign up to the forum to get the theme. I am sure it would be a small matter to get it up and running with ASB, though.
(2014-03-18, 04:09 AM)Wildcard Wrote: [ -> ]
(2014-03-18, 03:45 AM)Pann Wrote: [ -> ]Oh. I see. So is there any way to show only new threads regardless of recent posts?

It wouldn't be hard to modify the latest threads module if you know a little PHP. Rather than searching for posts and sorting by dateline, it could be modified to look only at posts which were the firstpost in a thread-- effectively limiting the thread list to newly (or recently) created threads.

(2014-03-18, 03:45 AM)Pann Wrote: [ -> ]I'm using Eva by Finer --> http://www.mybb-es.com/hilo-theme-eva

I am having a hard time understanding why things wouldn't work on Index . . . ASB searches for and wraps the header and footer by default on index.php . . . I wouldn't think your theme would have removed those two variables no matter how customized it is.

However, my efforts to download and test the theme failed due to my lack of Spanish and having to sign up to the forum to get the theme. I am sure it would be a small matter to get it up and running with ASB, though.

The original theme is in attachment.

The tech admin had many problems with Index Page Templates --> Index

It looks like this right now:

<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>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
    <script type="text/javascript">
jQuery.noConflict();
    jQuery(function() {
        //run the currently selected effect
        function runEffect(){
            //get effect type from 
            var selectedEffect = 'slide';
            
            //most effect types need no options passed by default
            var options = {};
            //check if it's scale or size - they need options explicitly set
            if(selectedEffect == 'scale'){  options = {percent: 0}; }
            else if(selectedEffect == 'size'){ options = { to: {width: 200,height: 60} }; }
            
            //run the effect
            jQuery("#effect").toggle(selectedEffect,options,500);

        };
        
        //set effect from select menu value
        jQuery("#button").click(function() {
            jQuery(this).toggleClass("clickedbuttons")
            runEffect();
            return false;
        });

    });
    </script>
<style type="text/css">
.buttons {
    background: url(images/Eva/tab2.png) no-repeat;
    width: 29px;
    height: 37px;
    display: block;
    cursor: pointer;
    margin-right: -30px;
}

.clickedbuttons {
    background: url(images/Eva/tab1.png) no-repeat;
    width: 29px;
    height: 37px;
    display: block;
    cursor: pointer;
    margin-right: -30px;
}
</style>
</head>
<body>
{$header}
{$IC_TopThreadStarters_H}
{$itph}









<div style="float: right;">
<a id="button" class="buttons"></a>
</div>
<table>
<tr>
<td width="100%;" valign="top">
<div class="registrate3">
<font size="4"><strong>Hello!</strong></font><br />
Welcome! Make yourself comfortable and take a look at the forum. If you like what you see, sign up and participate in our discussions. </div>
{$forums}


{$itpf}
{$IC_TopThreadStarters_F}
{$boardstats}
</td>
<td valign="top">
<div id="effect" class="ui-widget-content ui-corner-all">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" width="880">
<tr>
<td class="thead2">
<strong>Picture Of The Month</strong>
</td>
</tr>
<tr>
<td class="trow3">
<img src="http://i1298.photobucket.com/albums/ag54/asianchords/Pictures%20of%20the%20month/rsz_51rsz_tumblr_mr41qph6zm1rmd078o1_500_zpsfb355b41.jpg">
</td>
</tr>
</table>
<br />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" width="880">
<tr>
<td class="thead2">
<strong>Quote Of The Month</strong>
</td>
</tr>
<tr>
<td class="trow3">
All the fans everywhere are equal. They've been supporting us although we don't use the same language. - DongWoon (Beast)
<br />
</td>
</tr>
</table>
Okay, I was wrong . . . there is no footer var in the template. Also, unless that code is incomplete, there is no closing </body> tag either . . .

Anyway, go to ACP -> Configuration -> Advanced Sidebox -> Manage Scripts [tab] and edit the index script definition.

Change the Footer Search Text from:

{$footer}

to:

{$boardstats}

. . . and it should get the side boxes to display. If the positioning isn't what you want then you can choose another location for insertion.

Let me know if that gets you sorted. It is very late here so if I don't see your response tonight I will check in as soon as I can in the morning (10-12 hours from now when I get off work).
(2014-03-18, 04:38 AM)Wildcard Wrote: [ -> ]Okay, I was wrong . . . there is no footer var in the template. Also, unless that code is incomplete, there is no closing </body> tag either . . .

Anyway, go to ACP -> Configuration -> Advanced Sidebox -> Manage Scripts [tab] and edit the index script definition.

Change the Footer Search Text from:

{$footer}

to:

{$boardstats}

. . . and it should get the side boxes to display. If the positioning isn't what you want then you can choose another location for insertion.

Let me know if that gets you sorted. It is very late here so if I don't see your response tonight I will check in as soon as I can in the morning (10-12 hours from now when I get off work).


Yep, the code is complete.

I did what you said and the sidebox appeared, however it stretched/wrecked the look of my theme.

It looks like this now:

[Image: 8rln.png]

Before (with Nayar's plugin) it looked like this:

[Image: mvlp.png]

I want the forums and the sideboxes (right side - picture of the month; quote of the month) to look as they were in the last image using your plugin.

How can I do that?
(2014-03-18, 06:47 AM)Pann Wrote: [ -> ]Yep, the code is complete.

Then you need to close all the open tags in your page. Right now your HTML will not validate. (this has nothing to do with ASB or anything, just letting you know).

(2014-03-18, 06:47 AM)Pann Wrote: [ -> ]I did what you said and the sidebox appeared, however it stretched/wrecked the look of my theme.
[...]
I want the forums and the sideboxes (right side - picture of the month; quote of the month) to look as they were in the last image using your plugin.

How can I do that?

You'll need to put the content that you highlighted in the pic into a custom side box so that ASB can manage its width.

ACP -> Configuration -> Advanced Sidebox -> Custom Boxes [tab]

You won't need ALL of your custom HTML as ASB handles the header/expander for you so just create a new custom box titled 'Picture of the Month' and set its content to this:

<tr>
<td class="trow3">
<img src="http://i1298.photobucket.com/albums/ag54/asianchords/Pictures%20of%20the%20month/rsz_51rsz_tumblr_mr41qph6zm1rmd078o1_500_zpsfb355b41.jpg">
</td>
</tr>

and the another titled 'Quote Of The Month' and set its content to this:

<tr>
<td class="trow3">
All the fans everywhere are equal. They've been supporting us although we don't use the same language. - DongWoon (Beast)
<br />
</td>
</tr>

Now when you return the main ASB page, you will see your newly created custom boxes listed-- just drag and drop them where you want them. If you just want them on index, you'll need to set visibility options, but they can be shown on any page just like any other type of side box.

You will ofc need to remove the HTML from your index page or it will show up twice once you add the custom boxes.

Keep in mind that I am simply trying to get you started-- if I've left a detail or five out of the HTML, then forgive me.
(2014-03-18, 03:46 PM)Wildcard Wrote: [ -> ]
(2014-03-18, 06:47 AM)Pann Wrote: [ -> ]Yep, the code is complete.

Then you need to close all the open tags in your page. Right now your HTML will not validate. (this has nothing to do with ASB or anything, just letting you know).

(2014-03-18, 06:47 AM)Pann Wrote: [ -> ]I did what you said and the sidebox appeared, however it stretched/wrecked the look of my theme.
[...]
I want the forums and the sideboxes (right side - picture of the month; quote of the month) to look as they were in the last image using your plugin.

How can I do that?

You'll need to put the content that you highlighted in the pic into a custom side box so that ASB can manage its width.

ACP -> Configuration -> Advanced Sidebox -> Custom Boxes [tab]

You won't need ALL of your custom HTML as ASB handles the header/expander for you so just create a new custom box titled 'Picture of the Month' and set its content to this:

<tr>
<td class="trow3">
<img src="http://i1298.photobucket.com/albums/ag54/asianchords/Pictures%20of%20the%20month/rsz_51rsz_tumblr_mr41qph6zm1rmd078o1_500_zpsfb355b41.jpg">
</td>
</tr>

and the another titled 'Quote Of The Month' and set its content to this:

<tr>
<td class="trow3">
All the fans everywhere are equal. They've been supporting us although we don't use the same language. - DongWoon (Beast)
<br />
</td>
</tr>

Now when you return the main ASB page, you will see your newly created custom boxes listed-- just drag and drop them where you want them. If you just want them on index, you'll need to set visibility options, but they can be shown on any page just like any other type of side box.

You will ofc need to remove the HTML from your index page or it will show up twice once you add the custom boxes.

Keep in mind that I am simply trying to get you started-- if I've left a detail or five out of the HTML, then forgive me.

Thanks for letting me know about closing all the open tags in my page. Smile

I did what you said and everything is working fine. I just want to change a detail: the size of the stats.

I want it to look like this:

[Image: 9uyz.png]

What should I do?
Okay when I told you to put

{$boardstats}

in the Footer Search Text for Index, what that did was wrap everything below header and above boardstats in the 'side boxed area'. So to get boardstats in that area you would need to change the Footer Search text to something just below boardstats.

The search text needs to be something unique. For example, searching for <table or <div isn't good enough because those are everywhere. But don't get hung up on that because you can always just insert a comment

<!-- ASB -->

directly below boardstats and use it for the search text.



Hopefully that has you fixed up so lets get back to the topic point of this thread. New threads.

TBH I began to think about it and now I am interested in seeing what comes of it. What I can do is play around with it between work and see what I can come up with. If it seems like it makes sense in the ASB package I'll include it, if not I'll make a repo so that you can grab a copy and keep it updated if something needs to change.

Just be patient.
Pages: 1 2