Advanced Recent Posts

Started by Matthew K., March 08, 2010, 02:59:23 AM

Previous topic - Next topic

Matthew K.

Link to Mod

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


Am'

اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

~DS~

It messed up the portal's recent posts. :P
"There is no god, and that's the simple truth. If every trace of any single religion were wiped out and nothing were passed on, it would never be created exactly that way again. There might be some other nonsense in its place, but not that exact nonsense. If all of science were wiped out, it would still be true and someone would find a way to figure it all out again."
~Penn Jillette – God, NO! – 2011

Matthew K.

@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

Afro

How do you remove the post time "Today at 19:04:17" entirely ?
i mean from the board index template ?.

Matthew K.

./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 ?.

Afro

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

Matthew K.

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


Matthew K.

I installed Recent Topics On Board Index on my dev site for Advanced Recent Posts, and they work fine together.

Labradoodle-360

Afro

Ok, cool, i just tried them together and they work fine.

weldone.
I will be waiting for the updates...
big ups...

Matthew K.

Thanks, glad you like it :)

Hoping to update this shortly, finishing up "AddThis" today along with "Playlist BBC" hopefully.
Labradoodle-360

Afro

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

Matthew K.

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

Afro

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

Matthew K.

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

Afro

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 ?

Matthew K.

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

Afro

#18
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...



Matthew K.

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

Advertisement: