Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Check if the user made any thread in the forum section using Template Conditionals
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #2
RE: Check if the user made any thread in the forum section using TC
Its looking difficult to do such using just template conditionals, because it might use to run sql query.

some thing like that;

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
$query = $db->simple_select("threads" "uid" WHERE lastpost < dateline);
while ($yes = $db->fetch_array($query))
{
$posted_uid = $yes['uid'];

if ($mybb->user['uid'] != $posted_uid)
{
$button = "VISIBLE";
}
else
{
$button = "IN_VISIBLE";
}
}


Although its a dirty method and might not work, but gives a little idea on how to use such things. Wink


[Image: logo.png]

[Image: twitter.png]
11-22-2010 08:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Check if the user made any thread in the forum section using TC - Imran - 11-22-2010 08:40 AM

 Standard Tools
Forum Jump: