miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

a slimmer bb_func_forums.php file

Author myowndictionary .com
Guest
#1 | Posted: 8 Jan 2007 06:10 
the original file doesn't handle forum_group very well in the results of the select box.
$row=db_simpleSelect(0,$Tf,'forum_id, forum_name, forum_group','','','','forum_order')){
orders them by forum_order but not by forum_group, it should be a double-order-by
the $i has no purpose, because the loop only runs if a result is returned.
I renamed $wgr to $in_forum_group (wgr is an acronym?)

[Editor's cut - do not use this code]

to use this, I also had to change the .selectTxt font-size property to 0.75, if it's 1.05em then the words don't fit in the select box window anymore!

Author myowndictionary .com
Guest
#2 | Posted: 8 Jan 2007 06:14 
I also got rid of the $show and $st variables, cleaned it up, and also fixed it. Yes, the original didn't work, it made the forum group listing every time; this edited file (above) just shows the forum_group word one time. That's the important thing. This one works.

Author Paul
Lead Developer
#3 | Posted: 8 Jan 2007 06:27 
I don't understand what this all is about.

This file is used (specially in the latest release 2.0.3 issued just NOW) many times. The selection of forums works also for topic listing and thread listing pages. That way we're doing one SQL request, but store results in memory (which is much FASTER) and then re-produce them on other parts of pages.

I highly don't recommend anybody to apply the changes above. This file is very painful in upgrades (we ourselves fixed it many-many times), so what it does now is the most convenient solution, at which NO variables can be cut off, since they ALL are used somewhere.

Author myowndictionary .com
Guest
#4 | Posted: 8 Jan 2007 07:45 
i figured out why it won't work for me. my forum_orders are not in a line; that is, they are not
-- forum_group 1
---- forum_order 1
---- forum_order 2
---- forum order 3
-- forum_group 2
---- forum_order 4
---- forum_order 5
---- forum order 6

mine are more like
-- forum_group 1
---- forum_order 3
---- forum_order 1
---- forum order 6
-- forum_group 2
---- forum_order 2
---- forum_order 4
---- forumer order 5

so they wouldn't work.
the recent release also would have a problem, but I can just fix these things myself and not report bugs! That's what I've been doing anyway!

Author myowndictionary .com
Guest
#5 | Posted: 8 Jan 2007 07:53 
I also had to hack the bb_func_vforum.php to include


if ($cols[6]!=''){
if (in_array($cols[6], $doneArr)) {
if ($debug) echo "in_array doneArr<br>";
} else {
array_push($doneArr, $cols[6]);
$list_forums.=ParseTpl(makeUp('main_forumgroup'));
}
$keyAr++;
}


because I didn't want to manually update the database with different forum orders all the time....

Author Paul
Lead Developer
#6 | Posted: 8 Jan 2007 08:07 
Sorry, but I still don't understand why you're trying to change something.

Forum order is not the forum ID. You can order the forum titles in admin panel, using up/down arrows. Forum titles are sorted by order field, not ID field, and I think everything is working correctly in that case.

Author myowndictionary .com
Guest
#7 | Posted: 8 Jan 2007 08:11 
go to http://www.myowndictionary.com/index.php?cfile=bb_index.php&subaction= vtopic&forum=4
and check out the switch forum box.
that's how it looks out of the box for me!
I fixed that!

Author Paul
Lead Developer
#8 | Posted: 8 Jan 2007 08:14 
I still don't understand what you have fixed and what the thing you call "bug" is about. I'm suspecting you're just missing out the point how the program works or how it can be set up.

I can't check your forums main page since it reports

Fatal error: Call to a member function log() on a non-object in /var/myowndictionary/current/bb_func_vforum.php on line 66

Author Paul
Lead Developer
#9 | Posted: 8 Jan 2007 08:15 
I can just fix these things myself and not report bugs
I don't think what you call bug is really a bug.

Author myowndictionary .com
Guest
#10 | Posted: 8 Jan 2007 08:17 
aw, shucks. okay, try now.

Author myowndictionary .com
Guest
#11 | Posted: 8 Jan 2007 08:18 
+----------+----------------------------------------------+----------- ---------+-------------+
| forum_id | forum_name | forum_group | forum_order |
+----------+----------------------------------------------+----------- ---------+-------------+
| 2 | 영어로 묻고 답하고 이야기하자!! | english | 2 |
| 29 | off topic | general discussion | 12 |
| 18 | introduce yourself | general discussion | 13 |
| 32 | my daily attempt | general discussion | 14 |
| 1 | suggestion box | general discussion | 15 |
| 33 | links links | general discussion | 19 |
| 30 | translate | korean | 4 |
| 23 | korean for beginners | korean | 5 |
| 15 | korean 2 | korean | 6 |
| 27 | language fundamentals | korean | 7 |
| 24 | beginner grammar | korean | 8 |
| 31 | K-pop | korean | 8 |
| 25 | intermediate grammar | korean | 9 |
| 26 | advanced grammar | korean | 10 |
| 17 | hanja | korean | 11 |
| 4 | german questions | other languages | 9 |
| 5 | spanish questions | other languages | 9 |
| 6 | french questions | other languages | 13 |
| 16 | korean grammar forum | other languages | 14 |
| 3 | japanese questions | other languages | 16 |
+----------+----------------------------------------------+----------- ---------+-------------+
20 rows in set (0.04 sec)

Author Paul
Lead Developer
#12 | Posted: 8 Jan 2007 08:47 
I see only 14 forums from 20. Probably some of them are closed.

So, what your table means? I still don't understand where is the error. Your data is not sorted any way; sort it by forum_order and you will see forums are appearing sorted by order also on your page, like it should be.

WHERE IS THE BUG?

Specific miniBB Support Forums / Specific / a slimmer bb_func_forums.php file Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB