Thread Rating:
  • 10 Vote(s) - 3.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Recent Threads On Index [Updated 02-09-21]
#61
This is how it looks now on my local testsite. I think it's a very flexible plugin. Maybe there's a better way to put the avatars, I'm still thinking about it. When you click on the avatar, a modal window with the profile will popup.


Attached Files Thumbnail(s)
   
Reply
#62
how come it doesnt update on page refresh?

I changed it to pull only 5 and i still see 15


ah sorry it a ACP setting LOL

OK, so how can i add a second panel with just the stickies? OR MULTIPLE panels

thanks for mod

btw, you got a permissions setting in there, could you add a forum selection setting too?
Reply
#63
Is there any way how to make avatar images clickable? Click on avatar -> same like to click on username

EDIT: I get errors in JS during auto ajax updates in console
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#64
anyone else getting duplicates for the first 3 items?

and how do i turn on the avatars?
Reply
#65
(2015-02-06, 02:04 AM)expat Wrote: how come it doesnt update on page refresh?

I changed it to pull only 5 and i still see 15


ah sorry it a ACP setting LOL

OK, so how can i add a second panel with just the stickies? OR MULTIPLE panels

thanks for mod

btw, you got a permissions setting in there, could you add a forum selection setting too?

There is a setting for which forums get ignored.

(2015-02-06, 10:54 AM)Eldenroot Wrote: Is there any way how to make avatar images clickable? Click on avatar -> same like to click on username

EDIT: I get errors in JS during auto ajax updates in console

Not sure how you are getting JS errors. What kind of errors is it saying? This is my current recentthreads_headerinclude
<script type="text/javascript">
  <!--
	var refresher = window.setInterval(function () {refresh_recent_threads()}, 30000);
    var stopper = window.setTimeout(function() { stop_recent_threads()}, 900000);
    function refresh_recent_threads()
    {
      	var xmlhttp;
		if(window.XMLHttpRequest)
  		{// code for IE7+, Firefox, Chrome, Opera, Safari
 			 xmlhttp=new XMLHttpRequest();
  		}
		else
 		 {// code for IE6, IE5
     		 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  		}
      xmlhttp.onreadystatechange=function()
      {
        if(xmlhttp.readyState==4 && xmlhttp.status==200)
    		{
   				 document.getElementById("recentthreads").innerHTML=xmlhttp.responseText;
    		}
      }
      	xmlhttp.open("GET","xmlhttp.php?action=recent_threads",true);
		xmlhttp.send();
    }
    function stop_recent_threads()
    {
      		clearInterval(refresher);
    }
  // -->
  </script>


(2015-02-06, 11:44 AM)expat Wrote: anyone else getting duplicates for the first 3 items?

and how do i turn on the avatars?

I don't get duplicates. Avatars for first post and last post are in the settings the plugin has.
Reply
#66
I replace my code with yours one. I will test it.

I need to make my avatars image clickable in recent thread index (click on them -> link to the user post).

I tried to manage hide/show button but without success. I wanted to improve it to make it permanently, not until next refresh. Do you have any tips how to do that?
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#67
If you use the variable {$lastpostlink}, that gives you the url for the last poster's post. I didn't have that variable open and close an anchor tag so it would be easier to customize.

If you want the hide / show to be permanent, look into using cookies.
Reply
#68
Yes, I use laspostlink but it shows formated username. I will have to look into your code
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#69
Updated the code on Github to hopefully fix the JS errors. You can update by one of two ways. Either deactivate then reactivate the plugin to get the updated templates. Modify the recentthread template to this:
<div class="scroll">
<div id="recentthreads">
<table border="0" cellspacing="1" cellpadding="6" class="tborder" style="clear: both;max-height:300px">
<thead>
    <tr>
    <td class="thead{$expthead}" colspan="4" style="text-align:left; font-size: 10pt;"><div class="expcolimage"><img src="{$theme['imgdir']}/collapse.png" id="cat_9999_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div>~ Recent Threads ~</div>
</td>
    </tr>
</thead>
<tbody style="{$expdisplay}" id="cat_9999_e">
    <tr>
    <td class="tcat" width="230" style="font-size: 9pt; text-align: center;"><strong>Thread / Author</strong></td>
    <td class="tcat" width="30" style="font-size: 9pt; text-align: center;"><strong>Forum</strong></td>
    <td class="tcat" width="30" style="font-size: 9pt; text-align: center;"><strong>Posts</strong></td>
    <td class="tcat" width="140" style="font-size: 9pt; text-align: center;"><strong>Last Post</strong></td>
    </tr>
    {$recentthreads}
</tbody>
    </table>
</div>
    </div>
Reply
#70
@dragonexpert maybe you should consider adding language support for international users. I added it as not everybody is using the english language as their default.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)