TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 30, 2024, 01:01:51 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,174
  • Total Topics: 21,220
  • Online today: 147
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 87
  • Total: 87

"recent topics" in SMF style

Started by Lesmond, August 17, 2005, 12:01:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RoarinRow

Quote from: jacortina on August 08, 2006, 12:19:04 AM
No problem (what was given was just the same format as used
in the Unread since Last).

Find:

<span class="smalltext">', $topic['pages'], ' ', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>


Change to:

<span class="smalltext">', $topic['pages'], '<br>', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>



That's the ticket!  Thank you!!   :D

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

rbh

jacortina, very much improved upon! one thing, how do i get it to use the same colors as what my forum uses? where it says subject, started by, etc etc, it should be same as within forums but it isn't.

RoarinRow

One last question jacortina, where can I make the same change of the hard return to the 'All unread topics'?  This way both my views will be consistent.

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

jacortina

Quote from: rbh on August 08, 2006, 05:37:30 AM
jacortina, very much improved upon! one thing, how do i get it to use the same colors as what my forum uses? where it says subject, started by, etc etc, it should be same as within forums but it isn't.

As this code is based on that used for Unread Replies (Recent and All), it only does what that does. The query used there (and here) doesn't get/apply the group colors (doesn't query the membergroup table at all).


Quote from: RoarinRow on August 08, 2006, 05:49:40 AM
One last question jacortina, where can I make the same change of the hard return to the 'All unread topics'?  This way both my views will be consistent.

Recent.template.php

It will change both All Unread and Recent Unread.

Find:
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], ' ', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>

Change to:
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '<br>', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>

$txt['smf88'] is the word 'in' -> "in [BoardName]"

If you want to change how Unread Replies are presented also...

Find:
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '
', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>



Change to:
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '<br>',
$txt['smf88'], ' ', $topic['board']['link'], '</span></td>


(The < br > is put at the end of the first of these lines)

RoarinRow

Quote from: jacortina on August 08, 2006, 07:00:22 PM
Quote from: rbh on August 08, 2006, 05:37:30 AM
jacortina, very much improved upon! one thing, how do i get it to use the same colors as what my forum uses? where it says subject, started by, etc etc, it should be same as within forums but it isn't.

As this code is based on that used for Unread Replies (Recent and All), it only does what that does. The query used there (and here) doesn't get/apply the group colors (doesn't query the membergroup table at all).


Quote from: RoarinRow on August 08, 2006, 05:49:40 AM
One last question jacortina, where can I make the same change of the hard return to the 'All unread topics'?  This way both my views will be consistent.

Recent.template.php

It will change both All Unread and Recent Unread.

Find:
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], ' ', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>

Change to:
<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '<br>', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>

$txt['smf88'] is the word 'in' -> "in [BoardName]"

If you want to change how Unread Replies are presented also...

Find:
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '
', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>



Change to:
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '<br>',
$txt['smf88'], ' ', $topic['board']['link'], '</span></td>


(The < br > is put at the end of the first of these lines)

Thank you again jacortina!  The first part of the code for All unread topics works perfectly.  The second part but the board name below the topic name, but the topic name is not a URL.  I tried to redo the find and replace several times and I'm sure that's still my problem. 

Can you please look at that last part when you are available?   ::)

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

jacortina

Could you supply a few lines of code around those lines from your file?

RoarinRow

Quote from: jacortina on August 09, 2006, 01:52:26 AM
Could you supply a few lines of code around those lines from your file?

Hi, thanks.  In fact, here's the whole file attached.   :uglystupid2:

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

jacortina

Just to confirm, the problem you experienced was with
Unread Replies, right?

If so, try -

Starting in Line 286:

Find:

<td class="windowbg', $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">
' , $topic['is_locked'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '' , '
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '
', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>


Replace with:

<td class="windowbg', $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">
' , $topic['is_locked'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '' , '
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '<br>',
$txt['smf88'], ' ', $topic['board']['link'], '</span></td>

RoarinRow

#148
Quote from: jacortina on August 09, 2006, 03:43:35 AM
Just to confirm, the problem you experienced was with
Unread Replies, right?

If so, try -

Starting in Line 286:

Find:

<td class="windowbg', $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">
' , $topic['is_locked'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '' , '
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '
', $txt['smf88'], ' ', $topic['board']['link'], '</span></td>


Replace with:

<td class="windowbg', $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '3' : '' , '" width="48%" valign="middle">
' , $topic['is_locked'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/quick_lock.gif" align="right" alt="" style="margin: 0;" />' : '' , '
' , $topic['is_sticky'] && !empty($settings['seperate_sticky_lock']) ? '<img src="' . $settings['images_url'] . '/icons/show_sticky.gif" align="right" alt="" style="margin: 0;" />' : '', ' ', $topic['first_post']['link'], ' <a href="', $topic['new_href'], '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a> <span class="smalltext">', $topic['pages'], '<br>',
$txt['smf88'], ' ', $topic['board']['link'], '</span></td>


Yes it is with 'unreadreplies'.  This new code clear up the link, but the board name is still in the same line 

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

oneway

SHOW THE POSTER IN RECENT TOPICS?

What I would like with RC2 and 0.86 seems simple: it's just to show the poster in Recent Posts. It seems a major lack only having topic and date, but not 'who'.

Looks to me like 0.95 may have it, but I don't have this version, so could someone tell me how can I get it in 0.86? (I can see code in php files like, all ready to do it! - but I do not have the expertise to implement).

Thanks for the help and support given here!