Thread Rating:
  • 8 Vote(s) - 3.25 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] Recent Threads On Index [Updated 02-01-18]
#1
This plugin adds the most recent threads to your index page.

Compatibility: 1.8.1 or higher
Latest Version: 17.0
Languages: English, German
Features:
- Uses the forum permission system
- Ajax refreshing every 30 seconds
- Ajax refreshes disabled after 15 minutes.
- Options for displaying avatars
- Options to exclude certain forums from having threads show
- Easily adjust how many threads you want to show
- Thread title links to the newest post you haven't read
- Username styles are maintained
- Reply count is clickable to bring up the list of who posted
- Variables for relative time, date, and standard time of last post
- Thread titles can be shortened along with an option of breaking at the word or character level.
- Option to select which groups can't use this.
- Option to show formatted thread prefixes.
- Setting to allow Thread Fields from XThreads
- Option to show formatted usernames
- Option to show thread creation date.
- Ability to use on additional pages.

Installation:
1) Upload recenthread.php to your inc/plugins folder.
2) Install and Activate in the Admin CP
3) Go to your index template and verify {$recentthread_headerinclude} and {$recentthreadtable} are on the template once each.
4) Customize settings to your liking.

Upgrading:
1) Upload recentthread.php to your inc/plugins folder.
2) Click the link that says Run Upgrade Script in the plugin's description.


XThreads Fields

You have two options if you choose to enable it.  You can either use the raw data from the database or formatted data.  You will place this code in the recentthread_thread template.

Raw: {$threadfields_raw[$tid]['fieldname']}
Formatted: {$threadfields_formatted[$tid]['fieldname']}

Download: http://community.mybb.com/mods.php?action=view&pid=191

Github

https://github.com/dragonexpert/recentthreads

For additional documentation, the read me file is your friend.
Reply
#2
Unable to deactivate this plugin. Please help.

Quote:MyBB has experienced an internal SQL error and cannot continue.

How to remove this plugin manually? Are there any settings in the database?



Edit:

I deleted the templates but the plugin still showed up in the plugin list. So I tried to add the templates manually and it shows an error when I try to add the recentthread_thread template.


Code:
<tr>
   <td class="trow1"><a href="{$threadlink}">{$thread[\'subject\']}</a><br />{$thread[\'author\']}</td>
   <td class="trow1">{$thread[\'posts\']}</td>
   <td class="trow1">{$thread[\'views\']}</td>
   <td class="trow1">{$lastposttime}<br />
   <a href="{$lastpostlink}">Last Post:</a> {$lastposterlink}</td>
   </tr>


Quote:A potential security issue was found in the template. Please review your changes or contact the MyBB Group for support.
[Image: MO3HXYH.jpg]
Reply
#3
^ remove backslashes (i.e. \) from that recentthread_thread template codes
Reply
#4
Thanks.
[Image: MO3HXYH.jpg]
Reply
#5
What ?
/inc/plugins/recentthread.php 77 errorHandler->error
/inc/class_plugins.php 139 recentthread_list_threads
/index.php 387 pluginSystem->run_hooks
Reply
#6
^ when did you get those errors ? on activation or on the index page after adding the variable in index template
if the error is still on your forum, can we have forum url to see complete errors
Reply
#7
(09-21-2014, 06:45 AM)ThePanda Wrote: Unable to deactivate this plugin. Please help.

Quote:MyBB has experienced an internal SQL error and cannot continue.

How to remove this plugin manually? Are there any settings in the database?



Edit:

I deleted the templates but the plugin still showed up in the plugin list. So I tried to add the templates manually and it shows an error when I try to add the recentthread_thread template.


Code:
<tr>
   <td class="trow1"><a href="{$threadlink}">{$thread[\'subject\']}</a><br />{$thread[\'author\']}</td>
   <td class="trow1">{$thread[\'posts\']}</td>
   <td class="trow1">{$thread[\'views\']}</td>
   <td class="trow1">{$lastposttime}<br />
   <a href="{$lastpostlink}">Last Post:</a> {$lastposterlink}</td>
   </tr>


Quote:A potential security issue was found in the template. Please review your changes or contact the MyBB Group for support.

It would've helped a lot more if you posted what the SQL query was so I could figure it out faster. To fix the error change this line:

PHP Code:
$db->delete_query("templates""name IN('recentthread','recentthread_thread')"); 

to this:
PHP Code:
$db->delete_query("templates""title IN('recentthread','recentthread_thread')"); 

The mod site will be updated momentarily.
Reply
#8
3 problems:
- no date is shown
- no post count shown
- poster name should be smaller
[MyBB 1.8 Czech translation] [MyBB 1.8 plugins]: Prune old PMs + optimize DB plugin --- Thank you/like system
Reply
#9
The date is not shown because realistically a forum should be getting daily posts. Note that I did make a variable called {$lastpostdate} available if you want it.

I forget it doesn't use the key posts for postcount. I'm used to my custom software where I called it posts. {$thread['posts']} should be changed to {$thread['replies']} in the recentthreads_thread template.

If you want the poster name to be smaller wrap a span tag around and give it the class smalltext. That is a template edit.
Reply
#10
(09-21-2014, 01:08 PM)dragonexpert Wrote: It would've helped a lot more if you posted what the SQL query was so I could figure it out faster.  To fix the error change this line:

Sorry, there was no sql query in the error box. If it had any sql query I would have posted it. Smile
[Image: MO3HXYH.jpg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)