Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2469)
Brief Summary:
Advanced Recent Posts replaces the normal Recent Posts block with a very neatly laid out table with mouseover affects!
Future versions of this mod, will include full admin controls. I've had this mod on a local site of mine since August 09 and just wanted to shoot out a very simple version and update it later.
Changelog:
v1.1.1 (r2.9.12):
- !enhancement: mostly rewritten. now compatible with smf 2.0 branch.
- !bugfix: utf8 language strings now stored in separate install file, encoded with utf8.
Mentions:
- Version: 1.1.1
- Written by: Labradoodle-360
- Copyright: Matthew Kerle - All Rights Reserved
- Dedicated To: LILM
nice
you can improve style and add icon please ?
example : http://custom.simplemachines.org/mods/index.php?action=download;mod=1069;id=47069;image
It messed up the portal's recent posts. :P
@Am' - I do plan on updating the style, in some sense. Admins will have complete control over the style.
@Dismal Shadow - It may not work with Portals, I will do some testing with Portals before v1.1.
Thanks,
Labradoodle-360
How do you remove the post time "Today at 19:04:17" entirely ?
i mean from the board index template ?.
./Themes/default/BoardIndex.template.php
<td class="arp_header">', $txt['board_name'] ,'</td>
<td class="arp_header">', $txt['post_time'] ,'</td></tr>';
<td class="arp_header">', $txt['board_name'] ,'</td></tr>';
<td class="post post_hover arp_rest">', $post['board']['link'], '</td>
<td class="post post_hover arp_rest">', $post['time'], '</td>
<td class="post post_hover arp_rest">', $post['board']['link'], '</td>
./Themes/default/languages/Modifications.english.php
// Labradoodle-360's Advanced Recent Posts Mod.
$txt['topic_name'] = 'Topic:';
$txt['poster_name'] = 'Poster:';
$txt['board_name'] = 'Board:';
$txt['post_time'] = 'Post Time:';
// Labradoodle-360's Advanced Recent Posts Mod.
$txt['topic_name'] = 'Topic:';
$txt['poster_name'] = 'Poster:';
$txt['board_name'] = 'Board:';
That will remove the column "Post Time:" from the BoardIndex.
It will however throw off the width since it's set as 20% for each column and there are four columns (= 80%).
To change the column width:
./Themes/default/css/index.css
.post
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}
and edit
width: 20%; to fit your needs.
Labradoodle-360
Quote from: Afro on March 08, 2010, 01:08:40 PM
How do you remove the post time "Today at 19:04:17" entirely ?
i mean from the board index template ?.
Ok , cool work there.
It worked like Charm man...
see the work on my test forum www.afro-ads.com/afro
Now its time to apply it on the main forum.
www.afrowall.com
Here is what i need.
I am already using the recent topic mod , the one that removes the "RE" prefix.
Any chance I can use it together with your good mod.
2.. I have my recent posts underlined and bolded, any chance the mod wouldnt change that >
The, the last one..
If the above cant work, can you just help out in removing the ''post time'' and centering the ''recent post feeds'' without throwing errors on my logs..
Thanks again...
Hey there, glad it worked for you.
The future of this mod will include the ability to toggle each column on or off, and since this is already needed (by you), it will probably get me to update it sooner than later.
Regarding the bold/underline - This will also be a feature in the updated version of this mod, as the complete style will be in your control, for now though, you can add this by changing the CSS.
./Themes/default/css/index.css
.post
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}
.post
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
font-weight: bold;
text-decoration: underline;
}
Please provide a mod link for the Recent Topics Mod and I will give you the code to make Advanced Recent Posts work with it.
Labradoodle-360
Quote from: Afro on March 08, 2010, 02:21:51 PM
Ok , cool work there.
It worked like Charm man...
see the work on my test forum www.afro-ads.com/afro
Now its time to apply it on the main forum.
www.afrowall.com
Here is what i need.
I am already using the recent topic mod , the one that removes the "RE" prefix.
Any chance I can use it together with your good mod.
2.. I have my recent posts underlined and bolded, any chance the mod wouldnt change that >
The, the last one..
If the above cant work, can you just help out in removing the ''post time'' and centering the ''recent post feeds'' without throwing errors on my logs..
Thanks again...
here is the mod
http://custom.simplemachines.org/mods/index.php?mod=1314
recent topic
I installed Recent Topics On Board Index on my dev site for Advanced Recent Posts, and they work fine together.
Labradoodle-360
Ok, cool, i just tried them together and they work fine.
weldone.
I will be waiting for the updates...
big ups...
Thanks, glad you like it :)
Hoping to update this shortly, finishing up "AddThis" today along with "Playlist BBC" hopefully.
Labradoodle-360
Ok, there is a little problem now..
the mod squeezed the posts made on the forum..
just click on any topic and see the posts..
they are packed on the left side...
www.afrowall.com
Okay...I just confirmed this is an issue with my mod that was a dumb mistake on my part, and overlooked by the SMF Cust. Team.
For now, here is the fix. I will update this to v1.1 which will be a bugfix. v1.2 will include the updates I was planning.
Bugfix
./Themes/default/css/index.css
.post
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}
.post_hover:hover,.post_hoverHover
{
background: #E0E6E6;
}
.arppost
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}
.arppost_hover:hover,.arppost_hoverHover
{
background: #E0E6E6;
}
./Themes/default/BoardIndex.template.php
<tr>
<td class="post post_hover arp_left">', $post['link'], '</td>
<td class="post post_hover arp_rest">', $post['poster']['link'], '</td>
<td class="post post_hover arp_rest">', $post['board']['link'], '</td>
<td class="post post_hover arp_rest">', $post['time'], '</td>
</tr>';
<tr>
<td class="arppost arppost_hover arp_left">', $post['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['board']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['time'], '</td>
</tr>';
For you, simply remove the last td, which includes $post['time'].
Basically what was happening was MY class "post" was already existing for posts, which I completely overlooked, so it was changing the style, so simply changing the class name and then updating the call to the class will fix the issue.
I very much appreciate you pointing this out!
Labradoodle-360
Ok, very good..
here is another one..
Is it possible to make the width of the topic name table columN a little bigger ..
THE TOPIC NAME IS ALWAYS LONGER THAN POSTER NAME AND BOARD NAME..
Its ok the way it is but i just need it for my personal site..
Haha maybe I should have held off on releasing it until I had completed my full wish (complete customization) **sigh** oh well.
Here's an easy way.
./Themes/default/css/index.css
.arppost
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}
.arppost
{
background-color: #F6F6F6;
text-align: center;
}
.arptopic
{
width: {width}%;
}
.arppostername
{
width: {width}%;
}
.arpboardname
{
width: {width}%;
}
.arpposttime
{
width: {width}%;
}
./Themes/default/BoardIndex.template.php
<tr><td class="arp_header">', $txt['topic_name'] ,'</td>
<td class="arp_header">', $txt['poster_name'] ,'</td>
<td class="arp_header">', $txt['board_name'] ,'</td>
<td class="arp_header">', $txt['post_time'] ,'</td></tr>';
<tr><td class="arp_header arptopic">', $txt['topic_name'] ,'</td>
<td class="arp_header arppostername">', $txt['poster_name'] ,'</td>
<td class="arp_header arpboardname">', $txt['board_name'] ,'</td>
<td class="arp_header arpposttime">', $txt['post_time'] ,'</td></tr>';
Taking into account you removed "post time" remove the CSS and td for that from the new code.
Also customize {width} with your width.
Hope this helps,
Labradoodle-360
I like it the way it is now on firefox and chrome.. WITHOUT TABLES.
IE still showing tables..
I am going to try to add tower add on the "post time" space..
I guess thats possible ..right ?
What do you mean by that? You like it without borders or what?
Regarding adding an add to the right, that's possible, yes...
Labradoodle-360
Since adding the tower add is possible and custom,
i attached my boardindextemplate file here.
try to see if you can add the tower ad on the left hand side, or right hand side...preferebly left..
That is before the Topics...
Simply add another <td> and enclose the ad inside it.
Or post in Coding Discussion, as this is not directly related to my mod, rather custom coding.
Labradoodle-360
ok
Version 1.1 will be released shortly.
Features
Bugfix - In v1.0, a CSS issue that was overlooked, throws off Posts display. Thank you Afro for pointing this out.
Compatibility - Advanced Recent Posts will be compatible with SMF 2.0 RC3.
Labradoodle-360
and icon of post ?
Additional Features will be added to hopefully the next version.
Right now, I cannot add more features because I am leaving on vacation for about a week tomorrow morning, and am trying to just shoot out RC3 updates and any bugfixes so that they work, and work with the latest version.
This is on my to-do list though,
Labradoodle-360
Ok mate.
I upgraded to RC3 which of course threw off all mods.
I am waiting to install this mod again when you release the new version.
Version 1.1 Released!
If you have version 1.0, please uninstall it and reinstall v1.1 as it includes a bugfix, as well as compatibility for RC3, and utf-8 for English.
Enjoy,
Labradoodle-360
Great Work.
Welldone ..
Hello!
I just installed the mod and I do not see anything new?
http://www.scooter-chinois-4t.com/forum/
Make sure you go to Admin > Configuration > Current Theme and set posts on boardindex to your desired number, by default it's zero which doesn't use my mod.
Labradoodle-360
Hey buddy ,
can the table columns be removed without resetting the parameters ?
thank you Labradoodle-360 it works fine now ;)
Thanks Lab :)
Is there any setting through which we can exclude posts from some boards on the forum from "Recent Topic" page?
Any chance of having it recent topics instead of posts?
Also, can I set the table width to a certain size?
The recent topics mod, can be integrated into this mod, I believe. But I do not planning on having that option apart of Advanced Recent Posts.
Furthermore, you can change the table width by the following edit.
./Themes/default/BoardIndex.template.php
<table align="center" cellpadding="5" cellspacing="0" width="100%" border="0">
<table align="center" cellpadding="5" cellspacing="0" width="YOURWIDTH" border="0">
Obviously, replacing "YOURWIDTH" with your desired with.
If you wish to change each column individually, you'll need to do some further editing.
./Themes/default/css/index.css
.arppost
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}
.arppost
{
background-color: #F6F6F6;
text-align: center;
}
./Themes/default/BoardIndex.template.php
<td class="arppost arppost_hover arp_left">', $post['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['board']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['time'], '</td>
<td class="arppost arppost_hover arp_left" style="width: YOURWIDTH;">', $post['link'], '</td>
<td class="arppost arppost_hover arp_rest" style="width: YOURWIDTH;">', $post['poster']['link'], '</td>
<td class="arppost arppost_hover arp_rest" style="width: YOURWIDTH;">', $post['board']['link'], '</td>
<td class="arppost arppost_hover arp_rest" style="width: YOURWIDTH;">', $post['time'], '</td>
Hey Lab, I changed the colors to suit my theme better, but what do I do in order to get rid of the hover?
NEVERMIND!! I got it!! I just deleted the area of the index.css for the hover!
Ooops, saw you replied. Dang you're fast. OK, gotta do one other change that you had listed.
Hey C4G-TK! Sorry for the delay on the edits.
Here you go.
./Themes/default/css/index.css
.arppost_hover:hover,.arppost_hoverHover
{
background: #E0E6E6;
}
./Themes/default/index.template.php
echo '
<tr>
<td class="arppost arppost_hover arp_left">', $post['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['board']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['time'], '</td>
</tr>';
echo '
<tr>
<td class="arppost arp_left">', $post['link'], '</td>
<td class="arppost arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arp_rest">', $post['board']['link'], '</td>
<td class="arppost arp_rest">', $post['time'], '</td>
</tr>';
To be honest, a hover toggle along with input for changing the color of hover "is" in the plan for the next version if I ever get around to updating my mods, as well as writing new ones.
Hope this helps,
Labradoodle-360
Thanks, I got it. I had gone back and deleted the css info while you were replying.
I figured I'd take the chance and try it. I didn't realize you would reply so fast.
Thanks for the help!
Not a problem, technically removing the CSS "works", but I always remove all traces.
Glad you got it though,
Labradoodle-360
Is there a way to add a Recent Posts Tab in the menu and have it link to a gigantic page of your mod? O:)
Anything is possible. I'll pull up a fresh install of SMF and see if could throw the editors together without too much time put into it.
Edit: After looking into it, it's quite a bit more work than I want to do right now. It would involve changing quite a few things, beyond templates to get the posts to load properly.
If you'd like a big hint, take a peak in ./Themes/default/Boardindex.template.php at the Recent Posts second, pulling that out, what is required for loading the posts? Checkout the functions that it uses and what is globalized.
Labradoodle-360
I installed it and my recent post block still looks the same
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi46.tinypic.com%2Fk3xfu8.jpg&hash=1c618dbc9737b6373ad32d7de55afd674b7b065d)
That's because you're using a custom theme, rather than the default - Which my mod edits.
Check out: Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402.0)
Quote from: kiroBot on June 28, 2010, 04:01:53 AM
I installed it and my recent post block still looks the same
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi46.tinypic.com%2Fk3xfu8.jpg&hash=1c618dbc9737b6373ad32d7de55afd674b7b065d)
You'll need to manually do the THEME edits of this mod in your Custom Theme. If your theme does not have a file where edits take place, it will pull from the edits done in the default. But, if it does have that file, you will need to do the edits as I said.
Veri nice mod.
Romanian translate
]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.romanian.php">
<operation>
<search position="end"></search>
<add><![CDATA[
// Labradoodle-360's Advanced Recent Posts Mod.
$txt['topic_name'] = 'Subiect:';
$txt['poster_name'] = 'Poster:';
$txt['board_name'] = 'Sectiune :';
$txt['post_time'] = 'Ora Mesajului:';
]]></add>
</operation>
</file>
<file name="$themedir/languages/Modifications.romanian-utf8.php" error="skip">
<operation>
<search position="end"></search>
<add><![CDATA[
// Labradoodle-360's Advanced Recent Posts Mod.
$txt['topic_name'] = 'Subiect:';
$txt['poster_name'] = 'Poster:';
$txt['board_name'] = 'Secţiune :';
$txt['post_time'] = 'Ora Mesajului:';
]]></add>
</operation>
</file>
</modification>
Thank you very much! :)
Turkısh translate
// Begin Advanced Recent Posts by SirtLanVadisi
$txt['topic_name'] = 'Konu:';
$txt['poster_name'] = 'Konu Başlatan:';
$txt['board_name'] = 'Bölüm:';
$txt['post_time'] = 'İleti Tarihi:';
// End Advanced Recent Posts by SirtLanVadisi
Thanks for the translation! :) I appreciate it.
Hey you might want to edit your paypal links so they work =] https://www.paypal.com/cgi-binwebscr&cmd=_s-xclick&hosted_button_id=10240245/
There u go on the mod download page as well
That link works for me?
Hello,
Little problem, I have tried playing with the code but cant work it out
was wondering if anyone else was able to help.
I installed this MOD all OK apart from BoardIndex.template.php
Mods code is
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table align="center" cellpadding="5" cellspacing="0" width="100%" border="0">
<tr><td class="arp_header">', $txt['topic_name'] ,'</td>
<td class="arp_header">', $txt['poster_name'] ,'</td>
<td class="arp_header">', $txt['board_name'] ,'</td>
<td class="arp_header">', $txt['post_time'] ,'</td></tr>';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="arppost arppost_hover arp_left">', $post['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['board']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['time'], '</td>
</tr>';
echo '
</table><br />';
}
And my BoardIndex.template.php code is this
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="infocenter_recentposts" class="middletext">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
<dd>', $post['time'], '</dd>';
echo '
</dl>';
}
echo '
</div>
</div>
</div>';
}
If I replace my code with the MODS is works but my blocks from EzPortal all drop down to the bottom
Any idea's with this would be great
sorry; I worked it out my self
just needed to add this
echo '
</div>
</div>
</div>';
}
In other words it needs to look like this
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table align="center" cellpadding="5" cellspacing="0" width="100%" border="0">
<tr><td class="arp_header">', $txt['topic_name'] ,'</td>
<td class="arp_header">', $txt['poster_name'] ,'</td>
<td class="arp_header">', $txt['board_name'] ,'</td>
<td class="arp_header">', $txt['post_time'] ,'</td></tr>';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="arppost arppost_hover arp_left">', $post['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['board']['link'], '</td>
<td class="arppost arppost_hover arp_rest">', $post['time'], '</td>
</tr>';
echo '
</table><br />';
}
echo '
</div>
</div>
</div>';
}
Is there a way to make only 3 visible but scroll through all recent posts like the news fader on my forum index -> http://techraffle.com/forum (scroll or fade on set time interval but only show 3).
I would like to have the option to show them all but not all at once.
Thanks for a great mod 8)
You can definitely change how many show, however, it'd take some custom coding to get them to fade like the newsfader. That custom coding would not be supported by this mod, or provided.
Well forget about fade, is it possible to auto scroll through all recent posts like a news ticker or scroller?
Thanks
Sure, but it'll still take custom coding. And that's not something that will be provided as something for this mod.
I might suggest posting in Coding Discussion.
hi sir i am using 2.0 RC3 and using theme design blue i installed ur best mod ..... advance recent post... but while installing it is giving me error ... i manually try to fix it but still ... if u can help me i will be thankful sir ... i am attaching my index file .... thanks
Advanced Recent Posts does not modify index.template.php.
then sir what should i do ???
What version of SMF are you running, first of all?
sir i am using 2.0 rc3 version ..... and designblue theme ...
./Themes/design blue/BoardIndex.template.php ./Themes/design blue/css/index.css ./Themes/design blue/languages/Modifications.english.php ./Themes/design blue/languages/Modifications.english-utf8.php
the first 3 files is what you need & utf8 files only if you are using utf8 as well.
what is the error & on what file are you are getting the error?.
got an error, don't know what's wrong, please help :)
Execute Modification ./Themes/DSv4/BoardIndex.template.php Test failed
1. Replace ./Themes/DSv4/BoardIndex.template.php Test failed
Find[Select]
// Show lots of posts. elseif (!empty($context['latest_posts'])) { echo ' <dl id="ic_recentposts" class="middletext">'; /* Each post in latest_posts has: board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), subject, short_subject (shortened with...), time, link, and href. */ foreach ($context['latest_posts'] as $post) echo ' <dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt> <dd>', $post['time'], '</dd>'; echo ' </dl>'; }
Replace[Select]
// Show lots of posts. elseif (!empty($context['latest_posts'])) { echo ' <table align="center" cellpadding="5" cellspacing="0" width="100%" border="0"> <tr><td class="arp_header">', $txt['topic_name'] ,'</td> <td class="arp_header">', $txt['poster_name'] ,'</td> <td class="arp_header">', $txt['board_name'] ,'</td> <td class="arp_header">', $txt['post_time'] ,'</td></tr>'; /* Each post in latest_posts has: board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.), subject, short_subject (shortened with...), time, link, and href. */ foreach ($context['latest_posts'] as $post) echo ' <tr> <td class="arppost arppost_hover arp_left">', $post['link'], '</td> <td class="arppost arppost_hover arp_rest">', $post['poster']['link'], '</td> <td class="arppost arppost_hover arp_rest">', $post['board']['link'], '</td> <td class="arppost arppost_hover arp_rest">', $post['time'], '</td> </tr>'; echo ' </table><br />'; }
How do I make it work with rc4?
Try using Version Emulate. Otherwise you'll have to wait for an update.
Hi, great mod!
But, can i add the number of answer to table? i need it.
Thank you.
Not sure what you mean by that?
Quote from: Labradoodle-360 on December 15, 2010, 10:40:31 PM
Try using Version Emulate. Otherwise you'll have to wait for an update.
can't wait, I love this mod
waiting for the big upgrade to rc5
It won't be upgraded to SMF 2.0 RC5, although I will probably update it to SMF 2.0 Final when it comes out.
Hey :) ,
Any news for the 2.0 version ?. It seems that this mod only works upto RC3 version :(
It will eventually either be updated, or handed over to a new developer.
I know this is not being updated or whatever but, has anyone any idea how to move the recent posts to the top of the forum instead of the bottom. It is SO annoying!
When I took this mod off, they vanished altogether LOL
So, any help would be gratefully received :)
Otherwise I will just stick a portal on and use theirs at the top as a workaround
I am a little bit confused as to what you're looking to do.
As I said, move the latest posts to the top of the forum.
Never mind. I have moved them by editing the template myself. Thank You :)
Ah, yeah, modify BoardIndex.template.php as you must have figured out.
Best Regards
I'm having problems installing it manually and automatically =[
i tried to do it manually, but i can't find the first code to replace on my sources/recent.php. and when i do it automatically, an error pops up saying "call to undefined function db_query" when i open up add_settings.php.
i would really love to have this mod, its awesome.
This modification doesn't modify ./Sources/Recent.php iirc.
ohh >.< so what should i do? do i have the wrong version or something?
this is where i was trying to download it.
http://custom.simplemachines.org/mods/index.php?action=parse
thanks for replying btw
I don't know, what version of SMF are you running?
i am using 2.0.2
This modification is not yet compatible with SMF 2.0.2.
ohh I see. I hope it will be pretty soon cus I'd love to use it ^_^
thank you for replying.
I'm not too enthusiastic about updating my old modifications, actually.
Quote from: Labradoodle-360 on March 08, 2010, 02:59:23 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2469)
Brief Summary:
Advanced Recent Posts replaces the normal Recent Posts block with a very neatly laid out table with mouseover affects!
Future versions of this mod, will include full admin controls. I've had this mod on a local site of mine since August 09 and just wanted to shoot out a very simple version and update it later.
Changelog:
v1.1.1 (r2.9.12):
- !enhancement: mostly rewritten. now compatible with smf 2.0 branch.
- !bugfix: utf8 language strings now stored in separate install file, encoded with utf8.
Mentions:
- Version: 1.1.1
- Written by: Labradoodle-360
- Copyright: Matthew Kerle - All Rights Reserved
- Dedicated To: LILM
Modification updated. Now officially compatible with SMF 2.0.x and cleaned up a little...I might eventually completely rewrite it with some admin controls.
I'm now using your mod, and it's very good, i like it.
And can you pls help me this:
I have this code:
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['RecentTopicsOnBoardIndex_recenttopics'], '" /></a>
', $txt['RecentTopicsOnBoardIndex_recenttopics'], '
</span>
</h4>
</div>
<div class="hslice" id="recent_posts_content">
<div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
<div class="entry-content" style="display: none;">
<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
</div>';
// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
//-- Labradoodle-360; Advanced Recent Posts
elseif (!empty($context['latest_posts']))
{
echo '
<table align="center" cellpadding="5" cellspacing="0" width="100%" border="0">
<tr>
<td class="arp_header">', $txt['topic_name'] ,':</td>
<td class="arp_header">', $txt['poster_name'] ,':</td>
<td class="arp_header">', $txt['board_name'] ,':</td>
<td class="arp_header">', $txt['post_time'] ,':</td>
</tr>';
foreach ($context['latest_posts'] as $post)
{
echo '
<tr>
<td class="arppost arp_left">', $post['link'], '</td>
<td class="arppost arp_rest">', $post['poster']['link'], '</td>
<td class="arppost arp_rest">', $post['board']['link'], '</td>
<td class="arppost arp_rest">', $post['time'], '</td>
</tr>';
}
echo '
</table>
<br />
';
}
// End Labradoodle-360; Advanced Recent Posts --//
echo '
</div>';
}
I limit my topic title (topic name) 80 characters, but i want to cutoff it at 60 characters (My boar show only 60 characters and ...) because my board does not have wide enough to show all full topic title.
Eg: "This is my topic title, and it have 80 characters long" After cutoff, it show "This is my topic title, and it have 80 cha.."
Many thanks, Labradoodle-360 !!
p/s: You have so many helpful mod ^^
Did you not read my post in your other topic at all? I explained completely how to accomplish it.
I do not understand it, and i can't do it myself, i do not know much PHP code, so i post here again.
But.. may be i bother you. I will not bother you any more.
Many thanks!
This actually doesn't have anything to do with my modification at this point. I reviewed the code to implement for this for you, and it'd have to be done Source side. Nothing my modification touches.
Any suggestion on how to implement this mod with the Statistics in jquery mod?
Quote from: FrizzleFried on June 02, 2012, 01:00:40 PM
Any suggestion on how to implement this mod with the Statistics in jquery mod?
You'd need to give me more details
Thanks for your nice mod.
Its beyond me why SMF doesn't have a better, customizable recent posts table.
This made the trick in my forum, however, something happened to the css, because the table and hover are missing.
Anyway, do you think it's possible to add a "views" column and pagination?
QuoteIts beyond me why SMF doesn't have a better, customizable recent posts table.
Performance, mostly. It's one of the tips on how to improve performance - by turning it off. Making it more customisable makes it slower.
QuoteAnyway, do you think it's possible to add a "views" column and pagination?
If you want pagination, use the proper facility for it, i.e. action=recent.
Yes, I know that.
However, this is very useful for members to know what's going on in the forum.
The action=recent is already accessible from the top of the forum by default, but it's not the same thing. This is visually more clean and easy to comprehend, without all that "preview content" obstacles in between.
SMF's default recent messages table is enough, but it's not well constructed visually and could be more customizable. It doesn't need to make coffee or play golf, only some useful tweaks.
Visual construction is mostly a matter of perspective - what you find 'not well constructed' seems quite reasonable to me... ;)
Yes, I know. But sometimes, a little tweak changes the perspective and makes things more agreeable.
Anyway, on a second thought, I think you're right about pagination... action=recent is ok with that, still I think it would be useful to avoid loading so much results and make it more accessible to users. Maybe a page with 20 results and a small number of pagination (like 5) would be nice.
Does this mod give the ability to specify which threads or topics show up or are hidden from the recent post box?
Nope, it just puts the display in a neat table.
Quote from: Labradoodle-360 on March 04, 2013, 09:37:46 PM
Nope, it just puts the display in a neat table.
Ah okay thanks :(
That is what I am looking for .. so I guess I will have to keep looking. Thanks anyway.
Not a problem, sorry it doesn't work for you :)
Hi there!
Sorry for the bump.
I have to say that I LOVE this plugin for SMF. I am currently using it for 2.0.4 and it works wonderfully well. The only thing I want to add is another section for topic icons so that it fetches the icons from the topic and places it there. At the moment it displays it as: "Topic, Poster, Board, Time". I want to add the topic's icon (not the post's icon) before Topic. I saw that Topic was set to LEFT and that the others were set to REST as values and i'm guessing I need to edit the code so that the icon would be displayed as LEFT and the others as REST (including topic). I know how to do THAT part but not how to get the actual icon to display.
I read through this thread but didn't find anything concrete on how to do this.
Any ideas?
Thanks in advance!
Sorry for such a late reply here...I'd suggest posting in SMF Coding Discussion (http://www.simplemachines.org/community/index.php?board=60.0) as this isn't directly related to my modification.
Would it be possible to add "replies" and "views" statistics?
Sure...you'd have to hack it though.
Quote from: Labradoodle-360 on August 27, 2013, 09:31:33 PM
Sure...you'd have to hack it though.
Okay. Just walk me through it.
Nope sorry! Don't have the time. Quite a bit more complicated than just modifying a line or two.
Aww, that's to bad.
Sorry about that...you'd want to look at how the arrays for the stats are generated.
Hello
I have problem with Advanced Recent Posts, when i install it it gives me that i need to replace text in text place (test failed),
I installed it, and i replaced texts, but it didn't work,
Anyone knows how to fix it? Does it have any default settings?
I'm using zone99 theme and smf 2.0.6
anyone ?
Hi there.
Any chance of excluding some boards from the list of recent topics?
You'd have to modify SMF's core a fair amount. Check Subs-BoardIndex.php.
Hi, On mobile screen it shows wider. I got google web tools warning that Mobile Usability issues detected.
The following issues were found on your site:
Content wider than screen
How can I make it responsive?