Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Matthew K. on March 08, 2010, 02:59:23 AM

Title: Advanced Recent Posts
Post by: Matthew K. 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):



Mentions:



Title: Re: Advanced Recent Posts
Post by: Am' on March 08, 2010, 05:24:23 AM
nice

you can improve style and add icon please ?

example : http://custom.simplemachines.org/mods/index.php?action=download;mod=1069;id=47069;image
Title: Re: Advanced Recent Posts
Post by: ~DS~ on March 08, 2010, 06:44:27 AM
It messed up the portal's recent posts. :P
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 12:31:12 PM
@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
Title: Re: Advanced Recent Posts
Post by: 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 ?.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 01:39:29 PM
./Themes/default/BoardIndex.template.php
Code (Find) Select

<td class="arp_header">', $txt['board_name'] ,'</td>
<td class="arp_header">', $txt['post_time'] ,'</td></tr>';

Code (Replace) Select

<td class="arp_header">', $txt['board_name'] ,'</td></tr>';

Code (Find) Select

<td class="post post_hover arp_rest">', $post['board']['link'], '</td>
<td class="post post_hover arp_rest">', $post['time'], '</td>

Code (Replace) Select

<td class="post post_hover arp_rest">', $post['board']['link'], '</td>


./Themes/default/languages/Modifications.english.php
Code (Find) Select


// Labradoodle-360's Advanced Recent Posts Mod.
$txt['topic_name'] = 'Topic:';
$txt['poster_name'] = 'Poster:';
$txt['board_name'] = 'Board:';
$txt['post_time'] = 'Post Time:';

Code (Replace) Select


// 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
Code (Find) Select

.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 ?.
Title: Re: Advanced Recent Posts
Post by: 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...
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 03:52:32 PM
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
Code (Find) Select

.post
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}

Code (Replace) Select

.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...
Title: Re: Advanced Recent Posts
Post by: Afro on March 08, 2010, 04:16:23 PM
here is the mod

http://custom.simplemachines.org/mods/index.php?mod=1314

recent topic
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 04:20:23 PM
I installed Recent Topics On Board Index on my dev site for Advanced Recent Posts, and they work fine together.

Labradoodle-360
Title: Re: Advanced Recent Posts
Post by: Afro on March 08, 2010, 04:35:22 PM
Ok, cool, i just tried them together and they work fine.

weldone.
I will be waiting for the updates...
big ups...
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 04:36:47 PM
Thanks, glad you like it :)

Hoping to update this shortly, finishing up "AddThis" today along with "Playlist BBC" hopefully.
Labradoodle-360
Title: Re: Advanced Recent Posts
Post by: Afro on March 08, 2010, 04:59:47 PM
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
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 05:02:19 PM
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
Code (Find) Select

.post
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}

.post_hover:hover,.post_hoverHover
{
background: #E0E6E6;
}

Code (Replace) Select

.arppost
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}

.arppost_hover:hover,.arppost_hoverHover
{
background: #E0E6E6;
}


./Themes/default/BoardIndex.template.php
Code (Find) Select

<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>';

Code (Replace) Select

<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
Title: Re: Advanced Recent Posts
Post by: Afro on March 08, 2010, 05:35:15 PM
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..
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 05:44:06 PM
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
Code (Find) Select

.arppost
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}

Code (Replace) Select

.arppost
{
background-color: #F6F6F6;
text-align: center;
}
.arptopic
{
width: {width}%;
}
.arppostername
{
width: {width}%;
}
.arpboardname
{
width: {width}%;
}
.arpposttime
{
width: {width}%;
}


./Themes/default/BoardIndex.template.php
Code (Find) Select

<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>';

Code (Replace) Select

<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
Title: Re: Advanced Recent Posts
Post by: Afro on March 08, 2010, 06:11:02 PM
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 ?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 06:14:04 PM
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
Title: Re: Advanced Recent Posts
Post by: Afro on March 08, 2010, 06:30:15 PM
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...


Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 08, 2010, 07:30:47 PM
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
Title: Re: Advanced Recent Posts
Post by: Afro on March 08, 2010, 07:51:51 PM
ok
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 10, 2010, 01:01:39 PM
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
Title: Re: Advanced Recent Posts
Post by: Am' on March 10, 2010, 01:13:13 PM
and icon of post ?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 10, 2010, 01:14:50 PM
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
Title: Re: Advanced Recent Posts
Post by: Afro on March 10, 2010, 01:29:47 PM
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.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 10, 2010, 01:36:07 PM
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
Title: Re: Advanced Recent Posts
Post by: Sudhakar Arjunan on March 10, 2010, 02:44:16 PM
Great Work.
Title: Re: Advanced Recent Posts
Post by: Afro on March 10, 2010, 04:08:29 PM
Welldone ..
Title: Re: Advanced Recent Posts
Post by: Bruno36 on March 13, 2010, 11:42:08 AM
Hello!

I just installed the mod and I do not see anything new?
http://www.scooter-chinois-4t.com/forum/
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 13, 2010, 12:20:11 PM
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
Title: Re: Advanced Recent Posts
Post by: Afro on March 13, 2010, 02:23:15 PM
Hey buddy ,

can the table columns be removed without resetting the parameters ?
Title: Re: Advanced Recent Posts
Post by: Bruno36 on March 14, 2010, 03:27:55 AM
thank you Labradoodle-360 it works fine now ;)
Title: Re: Advanced Recent Posts
Post by: madman71 on April 09, 2010, 11:00:25 AM
Thanks Lab :)
Title: Re: Advanced Recent Posts
Post by: technica on April 26, 2010, 10:34:02 PM
Is there any setting through which we can exclude posts from some boards on the forum from "Recent Topic" page?
Title: Re: Advanced Recent Posts
Post by: 4b11l on June 01, 2010, 06:12:46 AM
Any chance of having it recent topics instead of posts?
Also, can I set the table width to a certain size?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 01, 2010, 12:42:28 PM
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
Code (Find) Select
<table align="center" cellpadding="5" cellspacing="0" width="100%" border="0">
Code (Replace) Select
<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
Code (Find) Select
.arppost
{
background-color: #F6F6F6;
width: 20%;
text-align: center;
}

Code (Replace) Select
.arppost
{
background-color: #F6F6F6;
text-align: center;
}


./Themes/default/BoardIndex.template.php
Code (Find) Select

<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>

Code (Replace) Select

<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>
Title: Re: Advanced Recent Posts
Post by: C4G-TK on June 08, 2010, 06:40:46 PM
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.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 08, 2010, 06:47:03 PM
Hey C4G-TK! Sorry for the delay on the edits.

Here you go.

./Themes/default/css/index.css
Code (Find and Remove) Select

.arppost_hover:hover,.arppost_hoverHover
{
background: #E0E6E6;
}


./Themes/default/index.template.php
Code (Find) Select

            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>';

Code (Replace) Select

            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
Title: Re: Advanced Recent Posts
Post by: C4G-TK on June 08, 2010, 06:53:45 PM
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!
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 08, 2010, 06:57:59 PM
Not a problem, technically removing the CSS "works", but I always remove all traces.

Glad you got it though,
Labradoodle-360
Title: Re: Advanced Recent Posts
Post by: MATTEK on June 08, 2010, 08:31:35 PM
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:)
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 09, 2010, 12:33:43 AM
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
Title: Re: Advanced Recent Posts
Post by: 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)
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 28, 2010, 12:23:49 PM
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)
Title: Re: Advanced Recent Posts
Post by: C4G-TK on June 28, 2010, 06:54:28 PM
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.
Title: Re: Advanced Recent Posts
Post by: -=[Vyorel]=- on August 15, 2010, 06:43:20 PM
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>
Title: Re: Advanced Recent Posts
Post by: Matthew K. on August 15, 2010, 09:07:00 PM
Thank you very much! :)
Title: Re: Advanced Recent Posts
Post by: iPhoneDestek on August 20, 2010, 06:32:31 AM
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



Title: Re: Advanced Recent Posts
Post by: Matthew K. on August 21, 2010, 12:37:46 PM
Thanks for the translation! :) I appreciate it.
Title: Re: Advanced Recent Posts
Post by: TwistedVamp on September 28, 2010, 12:14:55 PM
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
Title: Re: Advanced Recent Posts
Post by: Matthew K. on September 28, 2010, 03:29:36 PM
That link works for me?
Title: Re: Advanced Recent Posts
Post by: T3CHN0 on October 20, 2010, 04:04:23 AM
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
Title: Re: Advanced Recent Posts
Post by: T3CHN0 on October 20, 2010, 04:14:01 AM
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>';
    }

Title: Re: Advanced Recent Posts
Post by: mxcape21 on October 26, 2010, 09:37:18 AM
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)
Title: Re: Advanced Recent Posts
Post by: Matthew K. on October 26, 2010, 10:37:31 AM
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.
Title: Re: Advanced Recent Posts
Post by: mxcape21 on October 27, 2010, 11:49:06 AM
Well forget about fade, is it possible to auto scroll through all recent posts like a news ticker or scroller?

Thanks
Title: Re: Advanced Recent Posts
Post by: Matthew K. on October 27, 2010, 11:54:12 AM
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.
Title: Re: Advanced Recent Posts
Post by: simmi2121 on November 01, 2010, 03:06:30 AM
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

Title: Re: Advanced Recent Posts
Post by: Matthew K. on November 01, 2010, 11:21:01 AM
Advanced Recent Posts does not modify index.template.php.
Title: Re: Advanced Recent Posts
Post by: simmi2121 on November 01, 2010, 12:54:54 PM
then sir what should i do ???
Title: Re: Advanced Recent Posts
Post by: Matthew K. on November 01, 2010, 12:57:52 PM
What version of SMF are you running, first of all?
Title: Re: Advanced Recent Posts
Post by: simmi2121 on November 01, 2010, 02:03:57 PM
sir i am using 2.0 rc3 version .....  and designblue  theme ...
Title: Re: Advanced Recent Posts
Post by: T3CHN0 on November 02, 2010, 04:06:51 PM
./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?.
Title: Re: Advanced Recent Posts
Post by: modernartist on December 08, 2010, 04:24:10 PM
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 />'; }
Title: Re: Advanced Recent Posts
Post by: DanteOz on December 15, 2010, 08:02:49 PM
How do I make it work with rc4?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on December 15, 2010, 10:40:31 PM
Try using Version Emulate. Otherwise you'll have to wait for an update.
Title: Re: Advanced Recent Posts
Post by: ayteck on December 30, 2010, 05:38:56 PM
Hi, great mod!

But, can i add the number of answer to table? i need it.

Thank you.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on December 30, 2010, 05:54:55 PM
Not sure what you mean by that?
Title: Re: Advanced Recent Posts
Post by: mdj on January 12, 2011, 12:25:10 PM
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
Title: Re: Advanced Recent Posts
Post by: Soulmaster on March 17, 2011, 01:58:36 PM
waiting for the big upgrade to rc5
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 17, 2011, 02:07:37 PM
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.
Title: Re: Advanced Recent Posts
Post by: tawanda on July 28, 2011, 02:07:13 PM
Hey :) ,

Any news for the 2.0 version ?. It seems that this mod only works upto RC3 version  :(
Title: Re: Advanced Recent Posts
Post by: Matthew K. on August 06, 2011, 07:30:15 PM
It will eventually either be updated, or handed over to a new developer.
Title: Re: Advanced Recent Posts
Post by: 1stAngel on December 11, 2011, 04:51:44 PM
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
Title: Re: Advanced Recent Posts
Post by: Matthew K. on December 11, 2011, 04:57:22 PM
I am a little bit confused as to what you're looking to do.
Title: Re: Advanced Recent Posts
Post by: 1stAngel on December 11, 2011, 05:10:18 PM
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 :)
Title: Re: Advanced Recent Posts
Post by: Matthew K. on December 11, 2011, 05:12:13 PM
Ah, yeah, modify BoardIndex.template.php as you must have figured out.

Best Regards
Title: Re: Advanced Recent Posts
Post by: mischievousx3 on February 09, 2012, 11:13:48 AM
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.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on February 09, 2012, 11:15:58 AM
This modification doesn't modify ./Sources/Recent.php iirc.
Title: Re: Advanced Recent Posts
Post by: mischievousx3 on February 09, 2012, 11:26:49 AM
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
Title: Re: Advanced Recent Posts
Post by: Matthew K. on February 09, 2012, 11:45:45 AM
I don't know, what version of SMF are you running?
Title: Re: Advanced Recent Posts
Post by: mischievousx3 on February 09, 2012, 11:47:21 AM
i am using 2.0.2
Title: Re: Advanced Recent Posts
Post by: Matthew K. on February 09, 2012, 11:48:29 AM
This modification is not yet compatible with SMF 2.0.2.
Title: Re: Advanced Recent Posts
Post by: mischievousx3 on February 09, 2012, 11:51:48 AM
ohh I see. I hope it will be pretty soon cus I'd love to use it ^_^
thank you for replying.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on February 09, 2012, 11:53:55 AM
I'm not too enthusiastic about updating my old modifications, actually.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on February 09, 2012, 07:14:12 PM
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.
Title: Re: Advanced Recent Posts
Post by: Gà Mái on June 02, 2012, 01:40:18 AM
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'], ' &quot;', $context['latest_post']['link'], '&quot; ', $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 ^^
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 02, 2012, 04:26:43 AM
Did you not read my post in your other topic at all? I explained completely how to accomplish it.
Title: Re: Advanced Recent Posts
Post by: Gà Mái on June 02, 2012, 10:31:47 AM
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!
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 02, 2012, 12:30:41 PM
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.
Title: Re: Advanced Recent Posts
Post by: FrizzleFried on June 02, 2012, 01:00:40 PM
Any suggestion on how to implement this mod with the Statistics in jquery mod?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on June 02, 2012, 02:45:00 PM
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
Title: Re: Advanced Recent Posts
Post by: FragaCampos on March 03, 2013, 11:11:32 PM
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?
Title: Re: Advanced Recent Posts
Post by: Arantor on March 03, 2013, 11:12:32 PM
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.
Title: Re: Advanced Recent Posts
Post by: FragaCampos on March 03, 2013, 11:38:58 PM
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.
Title: Re: Advanced Recent Posts
Post by: Arantor on March 03, 2013, 11:44:55 PM
Visual construction is mostly a matter of perspective - what you find 'not well constructed' seems quite reasonable to me... ;)
Title: Re: Advanced Recent Posts
Post by: FragaCampos on March 03, 2013, 11:51:39 PM
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.
Title: Re: Advanced Recent Posts
Post by: Angie on Dialysis on March 04, 2013, 07:07:42 PM
Does this mod give the ability to specify which threads or topics show up or are hidden from the recent post box?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 04, 2013, 09:37:46 PM
Nope, it just puts the display in a neat table.
Title: Re: Advanced Recent Posts
Post by: Angie on Dialysis on March 04, 2013, 11:44:34 PM
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.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on March 05, 2013, 12:37:32 PM
Not a problem, sorry it doesn't work for you :)
Title: Re: Advanced Recent Posts
Post by: Myrrdin on April 14, 2013, 05:07:03 PM
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!
Title: Re: Advanced Recent Posts
Post by: Matthew K. on April 22, 2013, 03:39:13 PM
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.
Title: Re: Advanced Recent Posts
Post by: Sandmansa on August 26, 2013, 12:10:45 AM
Would it be possible to add "replies" and "views" statistics?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on August 27, 2013, 09:31:33 PM
Sure...you'd have to hack it though.
Title: Re: Advanced Recent Posts
Post by: Sandmansa on August 27, 2013, 10:17:00 PM
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.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on August 28, 2013, 12:52:06 AM
Nope sorry! Don't have the time. Quite a bit more complicated than just modifying a line or two.
Title: Re: Advanced Recent Posts
Post by: Sandmansa on August 28, 2013, 01:22:16 AM
Aww, that's to bad.
Title: Re: Advanced Recent Posts
Post by: Matthew K. on August 28, 2013, 02:24:10 PM
Sorry about that...you'd want to look at how the arrays for the stats are generated.
Title: Re: Advanced Recent Posts
Post by: RICH BEAST on October 27, 2013, 03:17:18 PM
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
Title: Re: Advanced Recent Posts
Post by: RICH BEAST on October 29, 2013, 09:53:00 AM
anyone ?
Title: Re: Advanced Recent Posts
Post by: FragaCampos on April 30, 2014, 04:44:42 PM
Hi there.
Any chance of excluding some boards from the list of recent topics?
Title: Re: Advanced Recent Posts
Post by: Matthew K. on May 05, 2014, 09:41:38 AM
You'd have to modify SMF's core a fair amount. Check Subs-BoardIndex.php.
Title: Re: Advanced Recent Posts
Post by: sirfpsycho on November 12, 2019, 09:22:21 PM
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?