Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Filtering Thread By Thread Author
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Filtering Thread By Thread Author
Well, finally, we can do this now Biggrin

The basic concept maybe like this:

Code:
filterxt_uid=user_uid

So, we can use it for several purposes:

1. Displaying Thread By Thread Author:

To do this, find this code in our forumdisplay_thread template:

Code:
{$thread['profilelink']}

Replace it with:

HTML Code
{$thread['profilelink']} &minus; <a href="{$forumurl_q}filterxt_uid={$thread['uid']}">All Threads In This Forum</a>

Now, after the thread user name, there is a link for displaying all threads by that user in that forum id.


2. Displaying All My Threads In This Forum (Link In Threadlist):

We can put this kinds of URL directly in our forumdisplay_threadlist template:

HTML Code
<a href="{$forumurl_q}filterxt_uid={$mybb->user['uid']}">Whatever</a>

Now, when our users viewing a threadlist, they can click the link to display all threads by them. We can use it for our XThreads application.
Example for Images Gallery:

HTML Code
<a href="{$forumurl_q}filterxt_uid={$mybb->user['uid']}">Display All My Images</a>

Maybe it is better to use conditional there, so, only member can view the link.

3. Displaying All Threads By A Member In A Forum (Link In Profile Page):

Put this kinds of URL directly in our member_profile template:

HTML Code
<a href="forumdisplay.php?fid=forum_id&amp;filterxt_uid={$memprofile['uid']}">Whatever</a>

Replace forum_id with a forum ID.
Now, each user has a link in their profile page to a specified forum id to display their threads only. We can use it for our XThreads application.
Example:
Images Gallery -> Forum ID = 9:

HTML Code
<a href="forumdisplay.php?fid=9&amp;filterxt_uid={$memprofile['uid']}">Display All Images By {$formattedname}</a>


4. Displaying All Threads By A Member In A Forum (Link In Postbit):

Put this kinds of URL directly in our postbit template:

HTML Code
<a href="forumdisplay.php?fid=forum_id&amp;filterxt_uid={$post['uid']}">Whatever</a>

Replace forum_id with a forum ID.
Now, each user has a link in their postbit to a specified forum id to display their threads only. We can use it for our XThreads application.
Example:
Images Gallery -> Forum ID = 9:

HTML Code
<a href="forumdisplay.php?fid=9&amp;filterxt_uid={$post['uid']}">Display All Images By {$post['username_formatted']}</a>

Maybe it is better if we put conditional there, so, the link will not be displayed if the post author is a guest.


(This post was last modified: 02-05-2011 12:19 PM by RateU.)
08-10-2010 11:37 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Filtering Thread By Thread Author - RateU - 08-10-2010 11:37 AM

 Standard Tools
Forum Jump: