News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Topics Created And Participated In

Started by dougiefresh, October 28, 2016, 11:27:37 AM

Previous topic - Next topic

dougiefresh

Link to Mod



TOPICS CREATED AND PARTICIPATED IN v2.10
By Dougiefresh -> Link to Mod



Introduction
This mod adds a new section under Profile called Show User Topics, which shows all the threads that the user has participated in and created.

Admin Settings
There are no admin settings for this mod.  To disable this mod, you must uninstall it.

Compatibility Notes
This mod was tested on SMF 2.0.12, but should work on SMF 2.0 and up.  SMF 1.x is not and will not be supported. 

Translators
o Russian: digger
o Spanish Latin: Rock Lee

Changelog
The changelog can be viewed at Xptsp.com.

License
Copyright (c) 2016 - 2018, Douglas Orend
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

dougiefresh

Uploaded v2.0 - December 17th, 2016
o Complete overhaul to improve functionality and viewing experience.




@Everybody: You're probably asking "Why the Overhaul?".  Well, I figured out the mod didn't do what it stated in the mod description.  It would have been better described as "Threads Created By User" instead of "Threads Participated In".  So, I combined the two ideas, along with an extreme viewing experience upgrade, in order to get what this mod now is with version 2.0.

I apologize to anybody who didn't feel that the version 1.0 mod lived up to expectations.   Hopefully, you'll give this mod another chance....

akbora

This mod is good.

Notice: Undefined index: description in

When click Show User Topics as a member or visitor, there are upper errors
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

dougiefresh

Uploaded v2.1 - December 19th, 2016
o Modified code so that topic list can be pulled for any user, by any user.
o Removed erroneous permission check.
o Removed template in exchange for using template inside Attachment template file.




@Everybody:  This update should solve the bug reports found by akbora.   Thank you, akbora!

Steve

Pretty slick and works like a charm as far as I can tell. ;D
DO NOT pm me for support!

akbora

#5
Quote from: dougiefresh on December 19, 2016, 10:32:30 AM
Uploaded v2.1 - December 19th, 2016
o Modified code so that topic list can be pulled for any user, by any user.
o Removed erroneous permission check.
o Removed template in exchange for using template inside Attachment template file.




@Everybody:  This update should solve the bug reports found by akbora.   Thank you, akbora!
Thank you very much everything is fine.

Now Turkish version:

$txt['TUPC_topics'] = 'Üyeye ait konuları göster';
$txt['TUPC_topics_desc'] = 'Bu bölüm size bu üyenin açtığı konuları ve hangi konulara katılım yaptığını gösterir.';
$txt['TUPC_user_created'] = 'Üyenin Açtığı Konular';
$txt['TUPC_user_participated'] = 'Üyenin Katıldığı Konular';
$txt['TUPC_no_topics_created'] = 'Üye henüz bir konu açmamıştır';
$txt['TUPC_no_topics_participated'] = 'Üye henüz herhangi bir konuya katılmamıştır.';



utf8 Turkish

Quote$txt['TUPC_topics'] = 'Üyeye ait konuları göster';
$txt['TUPC_topics_desc'] = 'Bu bölüm size bu üyenin açtığı konuları ve hangi konulara katılım yaptığını gösterir.';
$txt['TUPC_user_created'] = 'Ãœyenin Açtığı Konular';
$txt['TUPC_user_participated'] = 'Üyenin Katıldığı Konular';
$txt['TUPC_no_topics_created'] = 'Üye henüz bir konu açmamıştır';
$txt['TUPC_no_topics_participated'] = 'Üye henüz herhangi bir konuya katılmamıştır.';
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

akbora

Sorrry I see a problem another:

Users or visitors can see forbıdden board or topics. This is serious problem. Thanks
SMF 2.0.13
Default Theme
Utf8 Turkish
---------------

dougiefresh

Uploaded v2.2 - December 20th, 2016
o Fixed bug where user can see topics made in boards that they don't have access to.



Quote from: akbora on December 20, 2016, 03:14:55 AM
Users or visitors can see forbıdden board or topics. This is serious problem. Thanks
This update should resolve this bug report.  Thank you, akbora!

aegersz

another c00l feature by the sensational dougiefresh.

always well behaved mods that play nicely ... thanks, sir !
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin


Ian Mc

Really useful mod.

Just one issue I'm having. When I select a users threads or participated in, the order is ascending (which is fine), but when I click on the top of the date row for example, which I assume should change the order to decending, it links back to my own activity rather than reordering the users. Hope that makes sense!

airmon

Thanks for the mod, I keep seeing your name show up on useful stuff.

I'm using this mod on 2.0.13 and it does something odd. Only the "user created" link really worked for me. The "user participated" link took me to page 1 of the correct results, but if I clicked on page 2, or tried to sort so that newer posts came up first, the screen refreshed and went back to the "user created" results.





dougiefresh

#13
Uploaded v2.3 - February 10th, 2017
o Changed default sort direction to descending.
o Fixed issue where clicking on pages in "Participated In" goes back to "Topics Created" page.




@airmon:  This update should fix the bug report that you submitted!  Thank you!

Moonwink

Thanks for the MOD! 

I'm also having trouble seeing recent "Participated In" topics.   By default is sorts to show the oldest topics I replied to and I can't reverse the sort to show the newest topics.  Any attempt to change the sort order of the "Participated In" screen results in seeing the "Created" page again sorted by oldest first. 

As an request for a change, would it be possible to change the default to show the newest topics instead of the oldest topics at the top of the list?  There's a lot of water under the bridge since this oldest topics were current and 99.9% of the time I believe everyone will be interested in seeing and working with the topics they've recently been involved with.

Dougiefresh,
Thanks for the fix!  You posted it just as I clicked to post the message above.  I thought I'd go ahead and post this to ask for the sort order change.

dougiefresh

Quote from: Moonwink on February 10, 2017, 12:02:37 PM
Thanks for the MOD! 

I'm also having trouble seeing recent "Participated In" topics.   By default is sorts to show the oldest topics I replied to and I can't reverse the sort to show the newest topics.  Any attempt to change the sort order of the "Participated In" screen results in seeing the "Created" page again sorted by oldest first. 

As an request for a change, would it be possible to change the default to show the newest topics instead of the oldest topics at the top of the list?  There's a lot of water under the bridge since this oldest topics were current and 99.9% of the time I believe everyone will be interested in seeing and working with the topics they've recently been involved with.

Dougiefresh,
Thanks for the fix!  You posted it just as I clicked to post the message above.  I thought I'd go ahead and post this to ask for the sort order change.
Since nobody downloaded version 2.3 yet, I updated version 2.3 to include the request to change sort direction by default to descending.  Also updated version 2.3's changelog 2 posts back....

profzelonka

Awesome mod, thank you. !

Wanted to let you know that for some reason 2.3 is showing up as "old version" on the Package Manager page. No issues tho.

MULITRI

Thnaks for this great and neat Mod, excellent job.

I have just installed it in a fresh v2.0.13 version, and it looks great... but i have found an error....hey!! only one :)

With an User with no posts, clicking "Participated in" reports this error:


Database error, given array of integer values is empty. (topics)


The other option works fine, it shows the "No topics started" message... and when the User has messages and topics, both options works fine.

I hope you can solve this small issue, it's a great Mod for Users can find overall Topics started by any User, always useful.

Thank you.

dougiefresh

Uploaded v2.4 - February 26th, 2017
o Fixed database error that occurs when user has participated in no topics.




@MULITRI:  Hopefully this update fixes the bug report that you made.  Thank you!

MULITRI

Sure i'm going to try it, just after i can restore my forum for all the errors all around due to an old Mod i tried to add without luck hehe.

I'll let you know, Thanks a lot to be watching at your Mods to get'em up-to-date... Great Job!

MULITRI

Sorry to bump but i cannot modify my last reply.

doogiefresh... you did it again!! the error is fixed with your last update, so now your Mod is perfect!!

Thanks to you for your excellent job... Regards.

dougiefresh


BellGab.com

Hi.  This mod appears to be generating the following error:

8: Undefined index: TUPC_user_participatedApply Filter: Only show the errors from this file File: /home/michaelv/public_html/bellgab.com/Sources/Subs-Participation.php

22: 'label' => $txt['TUPC_topics'],
23: 'file' => 'Profile-Participation.php',
24: 'function' => 'TUPC_showTopics',
25: 'subsections' => array(
26: 'created' => array($txt['TUPC_user_created'], array('profile_view_own', 'profile_view_any')),
==>27: 'participated' => array($txt['TUPC_user_participated'], array('profile_view_own', 'profile_view_any')),
28: ),
29: 'permission' => array(
30: 'own' => array('profile_view_own'),
31: 'any' => array('profile_view_any'),
32: ),
33: );
34: }
35: }


Any thoughts?

And, btw, you've built a lot of great mods.  I use several.  Thanks.

dougiefresh

Uploaded v2.5 - July 11th, 2017
o Replaced IFNULL with COALESCE in database queries for better Postgres support.




@BellGab.com:  Whoops!  I missed this bug report.  I'll look into it!

dougiefresh

Uploaded v2.6 - July 17th, 2017
o Language settings moved from Profile.english.php to TUPC.english.php.




@BellGab.com:  Thank you for the bug report!  This issue has been resolved with the version 2.6 update.

landyvlad

What is the update process please?  Is it just upload and install the new one, or do I uninstall./delete the old one first?
(It'd be cool if this info was included in the description of the mod, for easy reference)

Thanks
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

dougiefresh

Quote from: landyvlad on December 18, 2017, 07:29:45 AM
What is the update process please?  Is it just upload and install the new one, or do I uninstall./delete the old one first?
(It'd be cool if this info was included in the description of the mod, for easy reference)
First, Package Manager won't allow you to install a newer version of a mod while an older version is installed.  If the package supports upgrading, Package Manager will give you the option to upgrade to the new version.  Most of my mods do not support upgrades in that fashion, mostly because some servers have issues with multiple install XML files and aren't smart enough to make it work....

The proper way to upgrade any mod that doesn't give the option through Package Manager is to uninstall the current version of the mod, then install  the new version.  Immediately deleting the old version is not mandatory at any stage of the upgrade process, although if you are happy with the new version, deletion of the old version is recommended.

digger

I think wil be better to skip recycled topics.
Russian lang in attachment.

dougiefresh

Uploaded v2.7 - January 15th, 2018
o Added Russian translation, courtsey of digger!
o Fixed queries so that recycle boards are omitted from database queries.




@digger:  You're right, recycle boards should definitely be omitted from the queries!  I've also included your Russian translation in this version.  Thank you very much for it!

landyvlad

Thanks Dougie that's a good explanation - much appreciated.
Perhaps that could be included in the SMF documentation? (I couldn't find it there).
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

digger

Quote from: dougiefresh on January 15, 2018, 11:58:15 PM
o Fixed queries so that recycle boards are omitted from database queries.
This doesn't work because you forgot to add $modSettings to the global scope. Below is a patch with a few minor fixes


===================================================================
--- forum/Sources/Profile-Participation.php (date 1516189488867)
+++ forum/Sources/Profile-Participation.php (date 1516189488867)
@@ -14,7 +14,7 @@
********************************************************************************/
function TUPC_showTopics()
{
- global $context, $txt, $scripturl, $modSettings, $smcFunc, $sourcedir, $user_info;
+ global $context, $txt, $scripturl, $modSettings, $sourcedir, $user_info;

// Set up for listing the "important" topics:
loadTemplate('ManageAttachments');
@@ -65,7 +65,7 @@
$user = \'<a href="\' . $scripturl . \'?action=profile;user=\' . $rowData["first_member"] . \'">\' . $rowData[\'first_poster\'] . \'</a>\';
else
$user = $rowData["first_member"];
- return $board . " \\\\ " . $topic . \'<div class="smalltext">\' . $txt["started_by"] . " <strong>" . $user . \'</strong></div>\';
+ return $board . " &#187; " . $topic . \'<div class="smalltext">\' . $txt["started_by"] . " <strong>" . $user . \'</strong></div>\';
'),
),
'sort' => array(
@@ -136,7 +136,8 @@
********************************************************************************/
function TUPC_Created_Count()
{
- global $smcFunc;
+ global $smcFunc, $modSettings;
+
$request = $smcFunc['db_query']('', '
SELECT COUNT(*) AS count
FROM {db_prefix}topics AS t
@@ -156,7 +157,7 @@

function TUPC_Created($start, $items_per_page, $sort)
{
- global $smcFunc;
+ global $smcFunc, $modSettings;

  $request = $smcFunc['db_query']('', '
SELECT
@@ -196,7 +197,7 @@
********************************************************************************/
function TUPC_Participated_Count()
{
- global $smcFunc, $user_info, $context;
+ global $smcFunc, $context, $modSettings;

$request = $smcFunc['db_query']('', '
SELECT DISTINCT id_topic AS id_topic
@@ -220,7 +221,7 @@

function TUPC_Participated($start, $items_per_page, $sort)
{
- global $smcFunc, $user_info, $context;
+ global $smcFunc, $context, $modSettings;

// Is the topic list defined?  If not, then do so before continuing:
if (empty($context['TUPC_topics']))


dougiefresh

Uploaded v2.8 - January 19th, 2018
o Integrated digger's patch, which adds $modSettings as global variable.




@digger:  Thank you for the patch!  It's been integrated into this mod....

shnazzle


nofapturkiye

you are smf hero indeed ,  was looking for something like this

-Rock Lee-

I leave another translation more, anything you tell me :) @dougiefresh


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v2.9 - February 12th, 2018
o Added translators section to the readme.txt file.
o Added Spanish Latin translation, courtsey of Rock Lee.
o Added LICENSE file to the mod, to clarify licensing terms.




@Rock Lee:  Thank you for the translation!  It's been included in this version!

digger

@dougiefresh
Mod doesn't track member id when topics list have more then one page. Urls looks like index.php?action=profile;area=threads;sa=created;sort=lastpost;desc;start=20 without member id in this query. When i go to next page in any profile it redirect to my own profile topics page.

ORIONzitos

PT-BR Translation here! 8) anything you tell me :) @dougiefresh
Total of translations: 10

ORIONzitos

Total of translations: 10

dougiefresh

Uploaded v2.10 - November 8th, 2018
o No functionality change.
o Updated documentation to point to new website.




@ORIONzitos and @digger:  Sorry, I didn't see these before I published this release.....  I'll address these issues soon!

dougiefresh

Uploaded v2.11 - November 9th, 2018
o Added user parameter to the base URL of the list produced.
o Added Portuguese Brazilian translation, courtsey of ORIONzitos!




@digger:  I'm having a hard time reproducing this issue, but I've included the user ID in the base URL.  Hopefully, this change will take care of the issue....

@ORIONzitos:  Thank you for your translation!  It's been included in this version!

digger

Quote from: dougiefresh on November 09, 2018, 09:11:14 PM
@digger:  I'm having a hard time reproducing this issue, but I've included the user ID in the base URL.  Hopefully, this change will take care of the issue....
Yes, it fixed now. Thanks.

landyvlad

Hi for the first time I seem to have an issue with this mod.

Reported to me by another admin.

Quote
I was looking for a particular post by a member (Speedy1959) and then having got his profile up, selected "Show User Topics" from under profile info.

First page shows topics started by Speedy1959 - all good.
Clicked on the "2" at the bottom for page 2 and......the topics shown all started by me, not Speedy1959.

For some reason when you go to Page 2 (or beyond) it changes the search to show topics started by whoever is doing the search, not the forum member selected. And if you look at the criteria at the top it has changed it to my profile! See the two screen shots of Page 1 and then when I clicked on the "2" what I got as Page 2 (see it says profile of gsxbarmy on Page 2, not speedy1959)

Any ideas please?

https://gsx1400owners.org/forum/index.php?action=forum
SMF 2.0.17
Topics Created And Participated In version 2.9  (according to package manager that's the current version)

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

landyvlad

D'oh just read above and seems 2.11 is actually current (so much for package manager's stupidity) and that it may expressly fix the issue at hand. Will do that.
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

landyvlad

Q: Does SMF 2.1 do what this mod does as standard?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

Arantor

No, 2.1 shows "posts the user made" and "topics the user started", this provides a different way of getting at things.

landyvlad

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

landyvlad

I see the mod is noted as compatible with 2.1RC2

With the release now of 2.1.0 is it compatible for use with no further changes necessary?
"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

FrizzleFried

Just installed on 2.1.1 emulating 2.1RC2.  It installs... and then the error log starts filling.

I uninstalled without really even testing.

Advertisement: