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?

FAQ Database?

Asked Modified Viewed 1,397 times
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
asked
Senior Member

How is the database read? Is it the line number? Or the Title? Can I re-assign the line numbers without damaging the content?
0 replies

6 posts

C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

https://github.com/PHPFusion/PHPFusion/blob/9.03/infusions/faq/classes/faq/faq.inc#L104

Is this what you're looking for?

What ordering you need? Change it as you wish. We have never touched FAQ infusion yet, but yes they need a settings perhaps soon.

We will start gathering ideas once new site is up.
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

I need it by name as I prefer alphabetical sort to make it easier for users to find the information they want, using the faq for videos...

Thanks Chan, Now that you pointed out the area, I'll make the change and keep you advised :-)

Gene
Edited by daimonbok1 on 17-11-2017 16:25,
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Original
        // Get Items
        $result = dbquery("SELECT ac.*,
            au.user_id, au.user_name, au.user_status, au.user_avatar, au.user_level, au.user_joined
            FROM ".DB_FAQS." ac
            LEFT JOIN ".DB_USERS." AS au ON ac.faq_name=au.user_id
            WHERE ac.faq_status='1' AND ".groupaccess("ac.faq_visibility").
            (multilang_table('FQ') ? " AND ac.faq_language='".LANGUAGE."'" : '').($cat ? " AND faq_cat_id='$cat'" : ' AND faq_cat_id=0')."
            GROUP BY ac.faq_id ORDER BY ac.faq_cat_id ASC, ac.faq_id ASC


Changed to
// Get Items
        $result = dbquery("SELECT ac.*,
            au.user_id, au.user_name, au.user_status, au.user_avatar, au.user_level, au.user_joined
            FROM ".DB_FAQS." ac
            LEFT JOIN ".DB_USERS." AS au ON ac.faq_name=au.user_id
            WHERE ac.faq_status='1' AND ".groupaccess("ac.faq_visibility").
            (multilang_table('FQ') ? " AND ac.faq_language='".LANGUAGE."'" : '').($cat ? " AND faq_cat_name='$cat'" : ' AND faq_cat_id=0')."
            GROUP BY ac.faq_name ORDER BY ac.faq_cat_name ASC, ac.faq_name ASC
        ");


Nothing happened???? Did I miss somewhere to change??? Actually something DID happen, all the faq links disappeared, they came back once I re-uploaded the original faq.inc. It's important, but the site works as is and can wait until later...
Edited by daimonbok1 on 18-11-2017 18:24,
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

I think if you just do ORDER BY ac.faq_cat_name ASC should be ok.
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Chan, I did that first and got nothing on faq.inc. I'll try it again!!!
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

As soon as I did that, I lost use of all the data.....once I change it back to id from name, all data returns.
0 replies

Labels

None yet

Statistics

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

2 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,842 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
D
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet