Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2007
Posts: 329
Yarp™
Yarp™
Offline
Joined: Feb 2007
Posts: 329
I would do a slightly different approach that doesn't involve a template edit:

First of all, we don't want to know every group the user is in, we just want to know if they are in (your case) group 10.

Second, running this query for every user can be time consuming. This adds a query per post, you can find out every user in a topic that is in group X by using this query:

SQL Query

select distinct(t1.USER_ID)
from ubbt_USER_GROUPS as t1,
ubbt_POSTS as t2
where
t1.USER_ID = t2.USER_ID
and t1.GROUP_ID = 7
and t2.TOPIC_ID = 18499

Using this query, you could build an array with every user from topic 18499 that is in group 7.

In /scripts/showflat.inc.php you could check out that array to adjust the Membertitle string to add a graphic.

find:
PHP Code

if ($CustomTitle && $config['ONLY_CUSTOM']) {
$postrow[$i]['Title'] = $CustomTitle;
$CustomTitle = "";
} else {
$postrow[$i]['Title'] = $Title;
$postrow[$i]['CustomTitle'] = $CustomTitle;
}


There the title is put in a string.

If you put some code just below there to add a string to the customtitle string with a graphic, you don't need to adjust the templates, and it will work for both post_side and post_top templates.

I can be more complete about this next year if you need more help, I know it sounds ages, but it's actually tomorrow laugh

Sponsored Links
Entire Thread
Subject Posted By Posted
Displaying a gif for a paying member Iann128 12/29/2008 7:44 PM
Re: Displaying a gif for a paying member Ruben Rocha 12/29/2008 9:35 PM
Re: Displaying a gif for a paying member Iann128 12/30/2008 2:54 AM
Re: Displaying a gif for a paying member blaaskaak 12/31/2008 1:37 PM
Re: Displaying a gif for a paying member Iann128 12/31/2008 5:35 PM
Re: Displaying a gif for a paying member blaaskaak 01/01/2009 10:20 PM
Re: Displaying a gif for a paying member Iann128 01/01/2009 10:53 PM
Re: Displaying a gif for a paying member Iann128 01/02/2009 6:31 AM
Re: Displaying a gif for a paying member blaaskaak 01/02/2009 12:29 PM
Re: Displaying a gif for a paying member Iann128 01/02/2009 7:08 PM
Re: Displaying a gif for a paying member blaaskaak 01/02/2009 10:11 PM
Re: Displaying a gif for a paying member Iann128 01/06/2009 4:13 AM
Re: Displaying a gif for a paying member blaaskaak 01/06/2009 8:20 AM
Re: Displaying a gif for a paying member Iann128 01/06/2009 3:04 PM
Re: Displaying a gif for a paying member AllenAyres 01/15/2009 5:05 PM
Re: Displaying a gif for a paying member blaaskaak 01/15/2009 6:39 PM
Re: Displaying a gif for a paying member AllenAyres 01/16/2009 6:17 PM
Re: Displaying a gif for a paying member Ohton 01/16/2009 11:32 PM
Re: Displaying a gif for a paying member AKD96 01/20/2009 8:29 AM
Re: Displaying a gif for a paying member Iann128 02/16/2009 6:33 AM
Re: Displaying a gif for a paying member blaaskaak 02/17/2009 7:20 PM
Re: Displaying a gif for a paying member Iann128 02/18/2009 2:57 AM
Re: Displaying a gif for a paying member sirdude 02/20/2009 12:25 AM
Re: Displaying a gif for a paying member AKD96 02/20/2009 1:23 AM
Re: Displaying a gif for a paying member Iann128 06/01/2010 5:26 PM
Re: Displaying a gif for a paying member AllenAyres 06/03/2010 5:58 PM
Re: Displaying a gif for a paying member Iann128 10/12/2010 5:23 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)