![]() |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| Customized code contributing mechanism Quote:
There is something else - if you contribute some (unspecific) value of money we will know you do something for community. Then you can expect we will be more willing to provide specific code for you. One way or another it is our goodwill:)
__________________ =Everything that has a beginnig has an end= =Nevere stop fighting= Site: http://www.vselink.org |
| Sponsored Links |
|
Check out the New Templates at the Pligg Pro Shop.
|
| ||||
| Quote:
|
| |||
| Disable Counts? Is there a way to disable counts for categories and subcategories? Basically if I use your code I get to see for example Entertainment [5/12] I would like to disable the [5/12] as it may be increasing my server load and slowing down my site. Kindly suggest. Quote:
|
| |||
| Fixed it myself. I guess I am learning PHP and learning it well now (I am not even missing PERL anymore). Well I commented out all the code shown before. Now I am back in control. While it was a great feature it really killed the performance on my site. So I had to get rid of it. I am still using the categories/subcategories feature and it works like charm. Now only I wish if I could figure out how to take the background color out of this table since I am getting some whitespace :) //get num of links in root category (and its subcats) (ALL-ALWAYS) // foreach ($roots as $roots_id){ // $root_count_array_total[$roots_id->category_id]= // $db->get_var("SELECT count(link_id) FROM ".table_links." WHERE link_category=".$roots_id->category_id. // " OR link_category IN (SELECT distinct subcat.category_id FROM ".table_categories. // " JOIN ".table_categories." subcat ON subcat.category_parent=".table_categories. // ".category_id WHERE ".table_categories.".category_id=".$roots_id->category_id. // " UNION SELECT distinct subcat2.category_id FROM ".table_categories. // " JOIN ".table_categories." subcat ON subcat.category_parent=".table_categories.".catego ry_id". // " JOIN ".table_categories." subcat2 ON subcat2.category_parent=subcat.category_id". // " WHERE ".table_categories.".category_id=".$roots_id->category_id.")"); //the same,but only PUBLISHED // if ($status_mode=="published"){ // $root_count_array[$roots_id->category_id]= // $db->get_var("SELECT count(link_id) FROM ".table_links." WHERE link_status=3 AND (link_category=".$roots_id->category_id. // " OR link_category IN (SELECT distinct subcat.category_id FROM ".table_categories. // " JOIN ".table_categories." subcat ON subcat.category_parent=".table_categories. // ".category_id WHERE ".table_categories.".category_id=".$roots_id->category_id. // " UNION SELECT distinct subcat2.category_id FROM ".table_categories. // " JOIN ".table_categories." subcat ON subcat.category_parent=".table_categories.".catego ry_id". // " JOIN ".table_categories." subcat2 ON subcat2.category_parent=subcat.category_id". // " WHERE ".table_categories.".category_id=".$roots_id->category_id."))"); //the same,but only QUEUED // }elseif ($status_mode=="queued"){ // $root_count_array[$roots_id->category_id]= // $db->get_var("SELECT count(link_id) FROM ".table_links." WHERE link_status=2 AND (link_category=".$roots_id->category_id. // " OR link_category IN (SELECT distinct subcat.category_id FROM ".table_categories. // " JOIN ".table_categories." subcat ON subcat.category_parent=".table_categories. // ".category_id WHERE ".table_categories.".category_id=".$roots_id->category_id. // " UNION SELECT distinct subcat2.category_id FROM ".table_categories. // " JOIN ".table_categories." subcat ON subcat.category_parent=".table_categories.".catego ry_id". // " JOIN ".table_categories." subcat2 ON subcat2.category_parent=subcat.category_id". // " WHERE ".table_categories.".category_id=".$roots_id->category_id."))"); //all // }else { // $root_count_array=$root_count_array_total; // } // } //compare and set root ids with subcats |
| ||||
| Quote:
The code has, slightly but noticeably, broken the layout in the sidebar in both ie and firefox. |
| ||||
| Added to that - I've just changed the order of the sidebar and fixed the Firefox problem, but still getting problems in IE as laid out above. |
| ||||
| Sorted the problems. Added "px" to all the values and for Opera I changed the ICO files to PNG - obviously Opera doesn't like ICOn files just as much as IE6 doesn't like the inclusion of image files without fixed dimensions. Edit: Same IE6 problems again. Ahhhhh! |
| ||||
| ahhh... this is too buggy... gonna have to kiss it good bye... |
| ||||
| Quote:
Please do not quote the whole post if it is long
__________________ =Everything that has a beginnig has an end= =Nevere stop fighting= Site: http://www.vselink.org |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
![]() |







