[2.0.19] Topics a user has started

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
13
81%
Very Good
1
6%
Good
2
13%
Fair
0
No votes
Poor
0
No votes
 
Total votes: 16

User avatar
shadav
Registered User
Posts: 141
Joined: Thu Dec 01, 2005 7:12 pm
Location: Drowning In Corn Fields
Contact:

Post by shadav » Tue Mar 14, 2006 2:12 pm

*note*restarted board lol

does this mod work with the profile control panel mod? if not could someone tell me what files i'd have to edit to make it work with the pcp mod? thanks

Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 » Mon Mar 20, 2006 1:06 am

How would I go about changing this

{postrow.POSTER_TOPICS}

in my viewtopic_body.tpl

Code: Select all

<td> 
   <div align="center">
	<span class="postdetails">{postrow.POSTER_TOPICS}<br /></span>
   </div>
</td>
so that, when people click "Topics: #" under a user's avatar, the page with this users's topics loads?
<span class="postdetails"><a href=":?::?::?:" class="postdetails">{postrow.POSTER_TOPICS}<a/><br /></span>

Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 » Mon Mar 20, 2006 1:06 am

sorry about the double post. The forum was too busy I think. :roll:

Manipe
Former Team Member
Posts: 1146
Joined: Thu Jul 22, 2004 6:30 pm
Location: Éire
Contact:

Post by Manipe » Mon Mar 20, 2006 9:06 pm

Ivoman #7 wrote: How would I go about changing this

{postrow.POSTER_TOPICS}

in my viewtopic_body.tpl

Code: Select all

<td> 
   <div align="center">
	<span class="postdetails">{postrow.POSTER_TOPICS}<br /></span>
   </div>
</td>
so that, when people click "Topics: #" under a user's avatar, the page with this users's topics loads?
<span class="postdetails"><a href=":?::?::?:" class="postdetails">{postrow.POSTER_TOPICS}<a/><br /></span>


Instead of the :?:?:?:, you'll need to put is "search.php?search_id=usertopics&user=" followed by the user id.
My MODs: [ Topics a user has started ] , [ Profile views ] , [ Colour on poll results ] , [ Topic posters ] , [ Add number to PM ] , [ Default avatar ] , [ View category name ] , [ Null vote ] , [ Forum description in viewforum ] , [ Resync forum ids ] , [ View PM while replying ] , [ Quick poll insert ] , [ Limit login attempts ] , [ Track PMs ]

www.ManipeF1.com

Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 » Mon Mar 20, 2006 10:15 pm

And how would I get the user id behind it?
How could I let it find out what user id the user has?

brodus
Registered User
Posts: 20
Joined: Thu Apr 21, 2005 5:03 pm

Post by brodus » Tue Mar 21, 2006 3:21 pm

Installed it. Really good idea, thanks for the mod.

One Problem: Under a user's name in topic view it shows everyone has 0 topics started like so
Joined: 06 Nov 2005
Posts: 353
Topics: 0
Location: G-Vegas


However, I know it is functioning somewhat, because the totals come up in member list and profile. No errors, so I didn't know what else to post that would be helpful, other than I'm using 2.0.19

Thanks for any help :D

Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 » Tue Mar 21, 2006 3:26 pm

Did you do the SQL querie before loading the db_update.php file?

Code: Select all

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE `phpbb_users` ADD `user_topics` MEDIUMINT (8) UNSIGNED DEFAULT '0' NOT NULL AFTER `user_posts`;

#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
Upload and run "db_update.php". This updates your database, setting the number of topics a user has. Delete the file once you've run it.

brodus
Registered User
Posts: 20
Joined: Thu Apr 21, 2005 5:03 pm

Post by brodus » Tue Mar 21, 2006 3:45 pm

I installed using EasyMod, would it mess something up to try and do it with phpmyadmin now after it has been installed with easymod?

Manipe
Former Team Member
Posts: 1146
Joined: Thu Jul 22, 2004 6:30 pm
Location: Éire
Contact:

Post by Manipe » Tue Mar 21, 2006 10:56 pm

brodus wrote: I installed using EasyMod, would it mess something up to try and do it with phpmyadmin now after it has been installed with easymod?
All you need to do so is upload and run the db_update.php file to install/db_update.php. Run it and then delete it, and all the topic counts will be set.
My MODs: [ Topics a user has started ] , [ Profile views ] , [ Colour on poll results ] , [ Topic posters ] , [ Add number to PM ] , [ Default avatar ] , [ View category name ] , [ Null vote ] , [ Forum description in viewforum ] , [ Resync forum ids ] , [ View PM while replying ] , [ Quick poll insert ] , [ Limit login attempts ] , [ Track PMs ]

www.ManipeF1.com

Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 » Tue Mar 21, 2006 11:01 pm

Ivoman #7 wrote: And how would I get the user id behind it?
How could I let it find out what user id the user has?

Manipe :?:

Manipe
Former Team Member
Posts: 1146
Joined: Thu Jul 22, 2004 6:30 pm
Location: Éire
Contact:

Post by Manipe » Tue Mar 21, 2006 11:05 pm

Ivoman #7 wrote:
Ivoman #7 wrote:And how would I get the user id behind it?
How could I let it find out what user id the user has?

Manipe :?:

Sorry, didn't see that.

Well, I think you'll have to set a template variable for that, although it would be easier just to set a variable for the whole url, as it would be more within line with phpBB's coding.

I'll get to it tomorrow, and issue a small MOD here in this topic.
My MODs: [ Topics a user has started ] , [ Profile views ] , [ Colour on poll results ] , [ Topic posters ] , [ Add number to PM ] , [ Default avatar ] , [ View category name ] , [ Null vote ] , [ Forum description in viewforum ] , [ Resync forum ids ] , [ View PM while replying ] , [ Quick poll insert ] , [ Limit login attempts ] , [ Track PMs ]

www.ManipeF1.com

Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 » Tue Mar 21, 2006 11:07 pm

fantastic, Manipe :)
Looking forward to it.

Manipe
Former Team Member
Posts: 1146
Joined: Thu Jul 22, 2004 6:30 pm
Location: Éire
Contact:

Post by Manipe » Wed Mar 22, 2006 10:48 pm

Okay, here you go.

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]------------------------------------------------
# Partial find
	$poster_topics = ( $postrow[$i]['user_id'] != ANONYMOUS )

#
#-----[ AFTER, ADD ]------------------------------------------
#
	$poster_topics = ( $poster_topics ) ? "<a href=\"" . $phpbb_root_path . "/search.php?search_id=usertopics&user=" . $postrow[$i]['user_id'] . "\">" . $poster_topics . "</a>" : "";
As simple as that :wink:
My MODs: [ Topics a user has started ] , [ Profile views ] , [ Colour on poll results ] , [ Topic posters ] , [ Add number to PM ] , [ Default avatar ] , [ View category name ] , [ Null vote ] , [ Forum description in viewforum ] , [ Resync forum ids ] , [ View PM while replying ] , [ Quick poll insert ] , [ Limit login attempts ] , [ Track PMs ]

www.ManipeF1.com

Ivoman #7
Registered User
Posts: 64
Joined: Tue Mar 07, 2006 3:17 pm
Location: BELGIUM
Contact:

Post by Ivoman #7 » Wed Mar 22, 2006 11:12 pm

Works like a charme. Thumbs up! 8)

brodus
Registered User
Posts: 20
Joined: Thu Apr 21, 2005 5:03 pm

Post by brodus » Thu Mar 23, 2006 6:24 pm

Manipe wrote:
brodus wrote:I installed using EasyMod, would it mess something up to try and do it with phpmyadmin now after it has been installed with easymod?
All you need to do so is upload and run the db_update.php file to install/db_update.php. Run it and then delete it, and all the topic counts will be set.


Manipe I appreciate your response =]

I went back and reuploaded db_update.php and ran it again. It reported being succesful...
Updating the Database

SELECT COUNT(*) AS `user_topics`, `topic_poster` AS `user_id` FROM `phpbb_topics` GROUP BY `topic_poster`;

Installation Complete

Successful


Now again, the memberlist shows the # of topics started, as does a user's profile, but it still shows 0 on the sidebar of topic view.

Appreciate any insight you can give me.

Post Reply

Return to “[2.0.x] MOD Database Releases”