[MODDB] NV recent topics 1.0.4

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17238
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [RC] NV recent topics 1.0.3

Post by DavidIQ »

Try this in functions_recenttopics.php:

Find:

Code: Select all

	'PAGINATION'			=> generate_pagination(append_sid("{$phpbb_root_path}index.$phpEx"), $topic_counter, $limit, $start),
Replace with:

Code: Select all

	'PAGINATION'			=> generate_pagination(append_sid($phpbb_root_path . $user->page['page_name']), $topic_counter, $limit, $start),
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
naijand
Registered User
Posts: 52
Joined: Sun Nov 02, 2008 6:28 pm
Contact:

Re: [RC] NV recent topics 1.0.3

Post by naijand »

naijand wrote:Hi Nickvergessen,

I use this on a custom page and have changed the pagination path in functions_recenttopics accordingly (from index.php to my custom page name) and it works save for one issue

In ACP, I have set the pagination to display 5 pages in total.

I have no problems with clicking and displaying recent topics pages 1 to 4 with the pagination buttons, but when I click the page 5 button, it correctly displays the content but the pagination buttons disappears altogether making navigation somewhat clumsy.

see pagination in page 4 of 5
Image

see pagination in page 5 of 5, you will see no pagination button

Image
Hi DavidIQ, happy holidays, would you have a a solution to the above,
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: [RC] NV recent topics 1.0.3

Post by nickvergessen »

includes/functions_recenttopics.php
find:

Code: Select all

if (count($topic_ary) > $limit)
replace with:

Code: Select all

if ((count($topic_ary) > $limit) || $start)
No Support via PM
User avatar
naijand
Registered User
Posts: 52
Joined: Sun Nov 02, 2008 6:28 pm
Contact:

Re: [RC] NV recent topics 1.0.3

Post by naijand »

nickvergessen wrote:includes/functions_recenttopics.php
find:

Code: Select all

if (count($topic_ary) > $limit)
replace with:

Code: Select all

if ((count($topic_ary) > $limit) || $start)
[RC] NV recent topics 1.0.3

Hi nickvergessen, is this solution for koalaii or for myself.

Cheers
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: [RC] NV recent topics 1.0.3

Post by nickvergessen »

for you.
the other thign was already "supported" by DavidIQ
No Support via PM
User avatar
naijand
Registered User
Posts: 52
Joined: Sun Nov 02, 2008 6:28 pm
Contact:

Re: [RC] NV recent topics 1.0.3

Post by naijand »

nickvergessen wrote:for you.
the other thign was already "supported" by DavidIQ
Thanks. I will apply the changes

EDIT 28.12.08
Worked, Thanks nickvergessen
Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [RC] NV recent topics 1.0.3

Post by Goztow »

I added a personal modification to your mod which others may like. Maybe you can add it in a next version.

The standard amount of recent topics (as configured in acp) will be used if the user did not choose his own number in his UCP (profile -> display options). He can make a choice between 1 and 99 (0 = number defined in ACP).

What I did:
open: includes/functions_recenttopics.php
find:

Code: Select all

$limit            = $config['rt_number']; 
after, add

Code: Select all

//recent topics mod - contribution by Goz
if ($user->data['rt_number'] != "0")
{
$limit = $user->data['rt_number'];
} 
open: includes/ucp_prefs.php
find:

Code: Select all

'post_st'        => request_var('post_st', (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0), 
after, add:

Code: Select all

//recent topics mod - contribution by Goz
                    'recent'        => request_var('recent', (!empty($user->data['rt_number'])) ? $user->data['rt_number'] : 0),
 
find:

Code: Select all

'user_post_show_days'    => $data['post_st'], 
after, add:

Code: Select all

//recent topics mod - contribution by Goz
                            'rt_number'    => $data['recent'], 
find:

Code: Select all

'S_DISABLE_CENSORS'    => $data['wordcensor'], 
after, add:

Code: Select all

                    ////recent topics mod - contribution by Goz
                    'S_RECENT'            => $data['recent'], 
open styles/subsilver2/template/ucp_prefs_view.html
find:

Code: Select all

<tr>
    <td class="row1" width="50%"><b class="genmed">{L_VIEW_POSTS_DIR}:</b></td>
    <td class="row2">{S_POST_SORT_DIR}</td>
</tr> 
after, add:

Code: Select all

<tr>
    <td class="row1" width="50%"><b class="genmed">Recent topics:</b></td>
    <td class="row2"><input type="text" name="recent" value="{S_RECENT}" MAXLENGTH="2"></td>
</tr> 
Database change:

Code: Select all

ALTER TABLE `phpbb_users` ADD `rt_number` INT( 2 ) NOT NULL DEFAULT '0';
I find this to give a nice extra touch to this mod. Might be I forgot to copy a modification to this post, so let me know if it works :).
Last edited by Goztow on Mon Dec 29, 2008 3:33 pm, edited 1 time in total.
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17238
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Re: [RC] NV recent topics 1.0.3

Post by DavidIQ »

My opinion:

Code: Select all

//recent topics mod by Goz
Although I know you're not trying to take credit for creating the actual recent topics mod, these statements make it seem otherwise to the casual browser. Maybe you could change it to:

Code: Select all

//recent topics mod - contribution by Goz
;-)
Again...this is only my opinion.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
Goztow
Registered User
Posts: 365
Joined: Fri Aug 17, 2007 10:31 am
Location: Belgium
Contact:

Re: [RC] NV recent topics 1.0.3

Post by Goztow »

You're entirely right. I wasn't planning to release these changes, and I just copy-pasted my changes to this paste without considering this. I'll update my post.
Tikva
Registered User
Posts: 95
Joined: Fri Nov 21, 2008 9:48 pm
Location: New Zealand
Contact:

Re: [RC] NV recent topics 1.0.3

Post by Tikva »

I have this Mod working fine at my forums, but just wondered how easy it would be to change the 'Topics' list part so that it shows the name of the Member who started the Topic, rather than the name of the Member who was the last to post in the topic? Thanks!
mk1200
Registered User
Posts: 6
Joined: Wed Dec 17, 2008 3:02 pm

Re: [Beta] recent topics 0.0.1

Post by mk1200 »

ClubMed wrote:Is it possible to make it scroll down to the latest unseen post in a thread when I click on a thread link?
I searched for this, but didn't come up with anything. I'd like it to act like the topic notification email from the board "If you want to view the newest post made since your last visit, click the following link:". This takes you to where you left off in the topic.

Any way to implement this?
mk1200
Registered User
Posts: 6
Joined: Wed Dec 17, 2008 3:02 pm

Re: [RC] NV recent topics 1.0.3

Post by mk1200 »

Tikva wrote:I have this Mod working fine at my forums, but just wondered how easy it would be to change the 'Topics' list part so that it shows the name of the Member who started the Topic, rather than the name of the Member who was the last to post in the topic? Thanks!
Just did this earlier today for my subsilver2 based theme:
nickvergessen wrote:
eman80 wrote:Edit: I found this code in (recent_topics_body.html)

Code: Select all

					<p class="gensmall">{L_POST_BY_AUTHOR} {recenttopicrow.LAST_POST_AUTHOR_FULL}
					{L_POSTED_ON_DATE} {recenttopicrow.LAST_POST_TIME}
and I replaced it with:

Code: Select all

					<p class="gensmall">{L_POST_BY_AUTHOR} {recenttopicrow.TOPIC_AUTHOR_FULL}
					{L_POSTED_ON_DATE} {recenttopicrow.FIRST_POST_TIME}
and I see that everything is ok now ... is my doing correct?
yes, it's a known bug in subsilver2
Tikva
Registered User
Posts: 95
Joined: Fri Nov 21, 2008 9:48 pm
Location: New Zealand
Contact:

Re: [RC] NV recent topics 1.0.3

Post by Tikva »

Excellent!! Thank you very much for that ~ all working great for me here now.
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21061
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: [RC] NV recent topics 1.0.3

Post by RMcGirr83 »

Afternoon Nick!! :)

A request was made on my board to integrate my tool tip mod (version 1.0.4) with this mod, which I have done here...feel free to add it as a contrib if you like.

Now for the :shock:.

I installed this mod on my forum and realized that the sql queries on the index page jumped from 14 (meh I have some other mods installed) to, egads, 27. Almost double what they were prior...and this was with the default 5 topics being selected in the ACP. Pretty sure I know why the large jump (you have a sql query inside a loop in your includes file) but isn't there something that can be done about that?

Just seems to be too much for the benefit it adds. :(
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
nickvergessen
Former Team Member
Posts: 4397
Joined: Mon Apr 30, 2007 5:33 pm
Location: Stuttgart, Germany
Name: Joas Schilling
Contact:

Re: [RC] NV recent topics 1.0.3

Post by nickvergessen »

RMcGirr83 wrote:I installed this mod on my forum and realized that the sql queries on the index page jumped from 14 (meh I have some other mods installed) to, egads, 27. Almost double what they were prior...and this was with the default 5 topics being selected in the ACP. Pretty sure I know why the large jump (you have a sql query inside a loop in your includes file) but isn't there something that can be done about that?

Just seems to be too much for the benefit it adds. :(
That's not the problem,

The SQL within the loop is only one time called.
so the MOD does maximum 4 queries.
BUT the unread/read-information on the topics seem to need one query for each Oo

maybe you can add a ticket to the tracker: http://www.flying-bits.org/tracker.php?p=32
No Support via PM
Locked

Return to “[3.0.x] MODs in Development”