Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Show "main" category in forum_threads_list_panel ?

Asked Modified Viewed 3,263 times
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
asked
Veteran Member

Im trying to get the forum_threads_list_panel to show the "main" category.

Hmm, hard to axplain... This post Im writing now - it belongs under the "main" category-name: "General Addon and Modification Support".

But the forum_threads_list_panel is showing the category: "Panels and Infusions" - which is under the category "General Addon and Modification Support". But I want it to show the "main" category = General Addon and Modification Support.

I thought that this would be quite an easy job - but it ain't for me.

It's the standart non-moddet forum_threads_list_panel from V7.01.05

I've tried to insert: AND forum_cat='0' (in the WHERE in the queries) - and I also tried with: AND forum_description=''

Any help would be very appriciated.

Edit: Now I finally find the solution - which actually WAS quite easy:
$result2 = dbquery(
   "SELECT f.*, f2.forum_name AS forum_cat_name FROM ".DB_FORUMS." f
   LEFT JOIN ".DB_FORUMS." f2 ON f.forum_cat=f2.forum_id
   WHERE f.forum_id='".$data['forum_id']."'"
);

$data2 = dbarray($result2);

- and then change from:
".$data['forum_name']."

- to:
".$data2['forum_cat_name']."
Edited by smokeman on 23-04-2011 14:56,
0 replies

3 posts

N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

Wow, I was just about to post a solution for you. :P

Ironic.

Congrats,
NetriX
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Hehe, ironic yes. :)

Well, thank you - but what about your solution - is that better to use, or ?
0 replies
N
NetriX
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums
answered
Senior Member

Actually, harder in my opinion.

Quote

$result = dbquery(
"SELECT g.*, gg.*, u.user_name, u.user_id FROM ".DB_THREADS." g
LEFT JOIN ".DB_FORUMS." gg
ON g.forum_id=gg.forum_id
INNER JOIN ".DB_USERS." u
WHERE g.thread_lastuser=u.user_id
ORDER BY g.thread_lastpost DESC LIMIT 10"
);


Live Demo: http://www.phpfusionmods.com/forum/
0 replies

Category Forum

Panels and Infusions

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
N
N
NetriX 10
Need help? Having trouble?
» View our Documentation for guides, functions and more - including the Getting Started section!
» Attach Log Files and Screenshots when reporting issues
» My support days are usually Mon-Thurs. Send me a PM if urgent.
  • Senior Member, joined since
  • Contributed 566 posts on the community forums.
  • Started 93 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet