MyBB Community Forums

Full Version: Latest Posts On Index Sidebar [New Build 03-24-17]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
Sorry to bump, but can anyone help as referred in my above post?


Quote:I'm having a different issue.

Refer to: http://www.whiteyslair.com/index.php

It seems that the time for {$lang->latestposttime}, is the same time as the most recent posts, for all posts.

Cannot seem to figure out a fix.

EDIT: That's odd - upon going crazy, I came back to this thread to look at the screenshots, and the time is actually not even in the screenshot, yet the download comes with the time included, which ends up being wrong anyway.

Refer to link above for live version

[Image: attachment.php?aid=33574].
@Whitey you can try this
in the plugin file (~/inc/plugins/latestposts.php) find below code line (around line 249)
 $lang->latestposttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);
comment it out by using // at the beginning of the line. and add below code in next line
$lang->latestposttime = $lastposttimeago;
(2015-01-24, 04:40 PM).m. Wrote: [ -> ]@Whitey you can try this
in the plugin file (~/inc/plugins/latestposts.php) find below code line (around line 249)



 $lang->latestposttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);
comment it out by using // at the beginning of the line. and add below code in next line



$lang->latestposttime = $lastposttimeago;

Thanks for lending a hand!

I've followed this -- however now I'm getting:
Parse error: syntax error, unexpected 'else' (T_ELSE) in /home/rlmj/public_html/inc/plugins/latestposts.php on line 251


These are the respective lines; 248-253
 if($mybb->settings['latestposts_showtime'] == 1) {
	//$lang->latestposttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);
			$lang->latestposttime = $lastposttimeago; 
		else{
			$lang->latestposttime =  NULL;
		}
EDIT:
I just commented out lines 251 & 252, all is working now.
Thank you!
^ oh! there is a mistake (} is missing before else). that code segment should be like below
if($mybb->settings['latestposts_showtime'] == 1) {
    //$lang->latestposttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);
     $lang->latestposttime = $lastposttimeago; 
     }
      else{
        $lang->latestposttime =  NULL;
     } 
Ok, I found the problem. To fix it, open your index_sidebar_post template, and change, {$lang->latestposttime} to {$lang->posttime}.
Then, in the plugin file (inc/plugins/latestposts.php) around the line 250:
$lang->latestposttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);
change it to:
$lang->posttime = $lang->sprintf($lang->latestposttime, $lastposttimeago);

It will fix this problem. Any other problems or suggestions before new version?

edit:
.m. the suggestion you gave won't help for languages who needs to add something before the date.
Hello, I currently use your plugin, but how else to put that in my sidebar ?
(2015-01-25, 10:54 AM)DanielM Wrote: [ -> ]Ok, I found the problem. To fix it, open your index_sidebar_post template, and change, {$lang->latestposttime} to {$lang->posttime}.

Can you explain how to do this step?  I've edied latestposts.php, but I'm totally new to MyBB, and I can't figure out where to find this index_sidebar_post thing.

Thanks,
- Joe

Oops, never mind.  I found it (under Admin CP, Templates & Style).

But since I'm here, what are the other substitution variables we can use in this template?  Is there any way to display a summary of the message text?
hello, your plugin works fine the only problem I have is that it does not redirected to the last post topics, but on the first page
would you have a solution for this problem please?
(2015-02-28, 10:47 AM)badboy4life91 Wrote: [ -> ]hello, your plugin works fine the only problem I have is that it does not redirected to the last post topics, but on the first page
would you have a solution for this problem please?

http://community.mybb.com/thread-167904.html
to redirect to the last post in the topic should be changed to the line 142
<strong><a href="{$mybb->settings[\'bburl\']}/showthread.php?tid={$tid}">{$postname}</a></strong><br>

by

<strong><a href="{$mybb->settings[\'bburl\']}/thread-{$tid}-lastpost.html">{$postname}</a></strong><br>

even if this plugin is very useful, it is buggy in particular has the installation / uninstallation.

he leaves after 2 collones resettlement and does not support permissions of all groups, some only ...

sorry for my bad english
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13