[ABD] Recent Posts - Last Active Post Show phpBB3 Mod

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
josiaht
Registered User
Posts: 6
Joined: Sat Feb 14, 2009 7:57 am

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by josiaht »

mvnet wrote:
rave41799 wrote:Anyone got anything working to show different icons if the topic is read or unread??

I thought I was onto something with:

Code: Select all

			<td class="row1" width="25" align="center">
                          <!-- IF topicrow.S_UNREAD_TOPIC -->
                                 <img src="./styles/subsilver2/imageset/announce_unread.gif" />
                          <!-- ELSE -->
                                 <img src="./styles/subsilver2/imageset/announce_read.gif" />
                          <!-- ENDIF -->
                        </td>
but it doesn't work ... It just shows the second one.

:(
I was struggling with the same problem. The mod does not display the read/unread icons correctly out of the box nor does it colorize the even/odd rows correctly. But this is how you can fix the both:

1. In styles/YOURSKIN/template/viewlast_post.html (or the file styles/YOURSKIN/template/viewlast_post_slide.html if you use the slide version) replace all "topicrow." with "latest_topics.".
2. Open the file includes/last_post.php and replace the contents of the file with the following code:

Code: Select all

<?php
/*
*****************************************************************************
* Name last_post.php                                                        *
* Last Post on index                                                        *    
* Copyright (c) Cronos Design - TimeZone Edition -                            *
* License http://opensource.org/licenses/gpl-license.php GNU Public License *
*****************************************************************************
*/
define('IN_PHPBB', true);
global $db, $cache, $lp, $user, $read;
         
//global $user;
$user->session_begin();


/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////CODE////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

if (!defined('IN_PHPBB'))
{
    exit;
}

    //
    // Recent Posts
    //
    
    /////////////////////////////////////////////////////////////////////////////
    ///////////////////////////////////// CONFIGS ///////////////////////////////
    /////////////////////////////////////////////////////////////////////////////
    
    $template->assign_block_vars('lp_config', array(
             'LP_ENABLE'           => $config['lp_enabled'],
             'LP_SLIDE'            => $config['lp_slide'],
             'LP_AVATAR'        => $config['lp_avatar'],     
             )

        );
    
    $sql = "SELECT topic_title, {$table_prefix}topics.forum_id, topic_id, topic_time, topic_type, topic_status, poll_start, topic_last_post_id, topic_poster, topic_last_poster_id, topic_first_poster_colour, topic_last_poster_colour, topic_first_poster_name, topic_last_poster_name, topic_last_post_time, topic_last_post_subject, forum_name, topic_views, topic_replies, icon_id
       FROM " . TOPICS_TABLE . " LEFT JOIN {$table_prefix}forums ON {$table_prefix}topics.forum_id = {$table_prefix}forums.forum_id
       LEFT JOIN {$table_prefix}icons ON {$table_prefix}topics.icon_id = {$table_prefix}icons.icons_id
       WHERE topic_status <> 2
          AND topic_approved = 1
       ORDER BY topic_last_post_time DESC";

    $result = $db->sql_query_limit($sql, $config['lp_amount']);

while( ($row = $db->sql_fetchrow($result)) && ($row['topic_title'] != ''))
{    
    if ( ($auth->acl_get('f_read', $row['forum_id'])) || ($row['forum_id'] == '0') )
    {  

            // THIS WAS ADDED <<<<<<<<<<<<<<<<<<<<<<<<<
            $topic_tracking_info = get_complete_topic_tracking($row['forum_id'], $row['topic_id'], array());
                
            if ($row['topic_status'] == ITEM_MOVED)
            {
                $unread_topic = false;
            }
            else
            {
                $unread_topic = (isset($topic_tracking_info[$row['topic_id']]) && $row['topic_last_post_time'] > $topic_tracking_info[$row['topic_id']]) ? true : false;
            }
            // >>>>>>>>>>>>>>>>>>>>> THIS WAS ADDED
            
        
            $template->assign_block_vars('latest_topics', array(
             'LP_FULL_TITLE'               => censor_text($row['topic_title']),
             'LP_TITLE_REPLY'           => censor_text($row['topic_last_post_subject']),
             'LP_U_VIEW_TOPIC'           => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id']),
             'LP_TOPIC_STARTER'         => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
             'LP_POSTER_AVATAR'            => get_avatar_by_user($row['topic_poster']),
             'LP_TOPIC_POSTTIME'         => $user->format_date($row['topic_time']),
             'LP_TOPIC_LASTPOSTBY'         => get_username_string('full', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
             'LP_TOPIC_POSTER_AVATAR'    => get_avatar_by_user($row['topic_last_poster_id']),
             'LP_TOPIC_LASTPOSTTIME'     => $user->format_date($row['topic_last_post_time']),
             'LP_FORUM_NAME'             => $row['forum_name'],
             'LP_T_VIEWS'                 => $row['topic_views'],
             'LP_T_REPLIES'             => $row['topic_replies'],
             
             'LP_F_ID'                    => $row['forum_id'],
                          
             'LP_T_MARK'                => $user->format_date($topic_mark),
             
             'LP_AVATAR'                => $config['lp_avatar'],
            
             'S_UNREAD_TOPIC'        => $unread_topic,    // THIS WAS ADDED    
            
             )

        );
    }    
}
$db->sql_freeresult($result);

?>
That's it. Remember to update the styles and templates from admin panel.

EDIT (03.01.2009): There was some bugs in the code above, but I made some modifications to it and now it should work.
EDIT (08.01.2009): Clarified the steps.
Awesome edit, fixed my problem with this too...however, my read versus unread icons are offset now just a tiny little bit, do you know why?

Image
Image

XAshwieNX
Registered User
Posts: 3
Joined: Mon May 19, 2008 4:43 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by XAshwieNX »

My topics are not scrolling/sliding. Why?

I've done all the things.. what could be the problem?

Edit
Problem solved Thanks Anyway :D

User avatar
Frogmen
Registered User
Posts: 132
Joined: Fri Dec 28, 2007 11:48 pm
Location: Palma De Mallorca. Spain

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by Frogmen »

The download link in the first post, doesn't shows the version 1.9.1 I just download and is the versión 1.9.0

rgds
Frogmen

Mudjosh
Registered User
Posts: 234
Joined: Sat Jun 14, 2008 11:04 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by Mudjosh »

Is the Mod Author still working on this?

If so, just telling you this is a great mod..

Either way, I have a question.
Ok, I have used the Blank Template Mod to get me a blank page. I edit the template.php to include this mod from the functions directory. I then add the appropriate coding to the template.html in the style.

Sadly, nothing apears.

The mod works on my index but I hate to clutter the index up more than I have to.. So I was just going to make another page for it.. Is there any way possible for this to work correctly?

---- NVM

I figured it out by different posts on the same subject on page 14 and 15..

Thanks you guys!

Tibifi3
Registered User
Posts: 34
Joined: Fri Feb 20, 2009 2:55 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by Tibifi3 »

I've just installed this MOD and it's seems very promising, but I want it in my overall_header.html to make it show on all my pages. But it only works on my index-page.

What should I change to make it work on all my pages?

User avatar
sparxx
Registered User
Posts: 51
Joined: Thu Feb 21, 2008 3:41 am
Location: Manchester UK
Contact:

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by sparxx »

this mod is great, went in no issues, just a few requests though if possible you could this.

can it be made to have a next tab on the frame of the mod, ie next 5 posts/topics then when next 5 posts/topics are shown a previous 5 posts/yopics button is displayed to go back


hope you understand what i mean and if you could implement this it would be one of the better mods out there.

thanks

BeadsPR
Registered User
Posts: 37
Joined: Thu Mar 26, 2009 4:22 pm
Location: Puerto Rico
Contact:

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by BeadsPR »

Hello... I'm new to PHPBB and before I do this Mod I want to know if my forum style is ok to make this Mod...

Enter here so you can see... www.photoboricua.com

That's the forum I confiure a few days ago and I would like to make this mod in there...

kiss-my-kitty
Registered User
Posts: 47
Joined: Mon Nov 26, 2007 2:37 am
Location: USA
Name: Jenn
Contact:

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by kiss-my-kitty »

kiss-my-kitty wrote:This mod is excellent, and it works, but I have two problems.
1) Since installing the mod, there is an issue where when I visit the message board I am logged in, but if I click on the "view new posts" link or another link, I am logged out. This is happening to myself and several members, despite all of us choosing to be logged in automatically, and being already logged in prior to visiting the message board.
I have checked and re-checked the coding required for the mod and nothing is out of place.

...
Thank you in advance for any help!
An update to this post, which I made here last summer (in July, I believe). In my case, it WAS this modification that was causing the issue with not being able to remain logged in after closing the browser or restarting the computer. Yesterday, after months of checking back on the boards and looking through posts where people had issues with remaining logged in, I decided to remove this mod's code. And lo and behold... all of my board members, myself included, are now able to remain logged in, even if we close the browser or restart our computer.
<3 Jenn
- - -
Blog: Jenn.nu | Forum: Lavish

TimeZone
Registered User
Posts: 52
Joined: Mon Jul 23, 2007 8:35 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by TimeZone »

The problem with the log out is an issue that I must fix. Sorry, but my time is very limited lately. I want to finish this mod, I hope to know to understand.

To fix the log out issue, you must to disable the slide version, the script require to much memory and this do the log out.

Sorry for my poor english.

Also, I'm working in other project ( Facebook Connect to phpBB 3 ).

This weekend I will see if the mod definitely conclude.

TimeZone

Psilocybin
Registered User
Posts: 22
Joined: Wed May 06, 2009 10:34 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by Psilocybin »

template->_tpl_load_file(): File ./styles/AeroRed/template/viewlast_post_slide.html does not exist or is empty

help please

fasko
Registered User
Posts: 185
Joined: Wed Jan 28, 2009 9:49 am

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by fasko »

jeremybnz wrote:Heres my viewlast_post_slide.html for subsilver2, still a work in progress but I like it :)

Code: Select all

<table class="tablebg" width="100%" cellspacing="1">
	<tr>
		<td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->"><span class="nav">{L_LP_TITLE}</span></td>
	</tr>

        <tr><td colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->">
	<marquee id="recent_topics" behavior="scroll" direction="up" height="200" scrolldelay="50" scrollamount="2"> 
	<table width="100%">
	

	<!-- BEGIN latest_topics -->

		<tr>
			<td class="row1" width="25" align="center"><img src="<!-- IF latest_topics.S_UNREAD_TOPIC -->./styles/subsilver2/imageset/forum_unread.gif<!-- ELSE -->./styles/subsilver2/imageset/forum_read.gif<!-- ENDIF -->" /></td>
			<td class="row1">
            <a title="{L_POSTED}: {latest_topics.LP_TOPIC_POSTTIME}" href="{latest_topics.LP_U_VIEW_TOPIC}" class="topictitle"  onMouseOver="document.all.recent_topics.stop()" onMouseOut="document.all.recent_topics.start()">{latest_topics.LP_FULL_TITLE}</a>
            </td>
            <td class="row2" width="130" align="center"><p class="topicauthor">{latest_topics.LP_TOPIC_STARTER}</td>
			<td class="row1" width="50" align="center"><p class="topicdetails">{latest_topics.LP_T_REPLIES}</p></td>
			<td class="row2" width="50" align="center"><p class="topicdetails">{latest_topics.LP_T_VIEWS}</p></td>
			<td class="row1" width="140" align="center">
				<p class="topicdetails" style="white-space: nowrap;">{latest_topics.LP_TOPIC_LASTPOSTTIME}</p>
				<p class="topicdetails">{latest_topics.LP_TOPIC_LASTPOSTBY}
					<a href="{latest_topics.LP_U_VIEW_TOPIC}">{LAST_POST_IMG}</a>
				</p>
			</td>
		</tr>
        
     <!-- END latest_topics -->

	</table>
	</marquee>
	</td>
	</tr>
     
	<tr align="center">
    <td class="cat" colspan="<!-- IF S_TOPIC_ICONS -->7<!-- ELSE -->6<!-- ENDIF -->">&nbsp;</td>
	</tr>
</table>

thanks :D :D melankolia styles
http://www.warboss.eu
Sorry for my english

acctman
Registered User
Posts: 103
Joined: Thu Feb 09, 2006 5:48 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by acctman »

has the original files been updated and does it work?

san_sa_rocky
Registered User
Posts: 3
Joined: Wed May 20, 2009 7:39 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by san_sa_rocky »

hey! i am new to php and phpbb! know some kinda mysql!
my question is!
does this work on Menankolia theme?
what i have to do to install this mod? :mrgreen:

PrometheusDreams
Registered User
Posts: 2
Joined: Wed Jun 03, 2009 8:53 pm

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by PrometheusDreams »

Thanks for this mod. Works a treat :)

It can be made nice and simple too, which is great.

From viewlast_post.html:

Code: Select all

<!-- BEGIN latest_topics -->
            <li>
                <ul>
                    <li>
                        <a title="{L_POSTED}: {latest_topics.LP_TOPIC_POSTTIME}" href="{latest_topics.LP_U_VIEW_TOPIC}" ><strong>{latest_topics.LP_FULL_TITLE}</strong></a><br />
                        <span class="smallText">By {latest_topics.LP_TOPIC_LASTPOSTBY} on {latest_topics.LP_TOPIC_LASTPOSTTIME}</span>
                    </li>
                </ul>
            </li>
<!-- END latest_topics --> 

WWu777
Registered User
Posts: 748
Joined: Tue Aug 14, 2007 12:40 pm
Contact:

Re: [RC1] Recent Posts - Last Active Post Show phpBB3 Mod

Post by WWu777 »

Does this mod show the latest topics on the home page too? Or only in the forum index? The description isn't clear.

Also, where are the install instructions?

Why do programmers often miss the most obvious things and I am the only one here that notices? Sheesh.

Locked

Return to “[3.0.x] Abandoned MODs”