What db tables does contain information about the blogs ...?

Hi, would like to make use of this plugin "Site Categories" - using it with wpmu and buddypress installation. In order to use pics (img) for the (sole/ single) sites - an other plugin, "avatar img ..." is neccessarry - but this plugin does not work with buddy press. But I am using Buddy Press. Not sure if I am able to modify the plugin code (non techie guy!), but what are the database tables name I would have to look for the relevant information... like categories, blog names, etc.? Could´nt find this in the php file...!

  • Fullworks

    @Stylos, it is very rare to see core wordpress database tables in plugins, as there is a wordpress function for practically every thing you need to do relating to the core tables

    e.g. function the_category() and function bloginfo()

    There are in fact so many functions it take a while to get used to them all

    generally I am putting the search term 'codex blah-blah' into google a lot. ['codex' finds the wordpress documentation ]

  • Paul

    @Stylos,

    ...but this plugin does not work with buddy press...

    Probably correct. The Site Categories plugin is probably a bad name since to many it implies something along the line of global categories.

    This is NOT the case. The Site Categories plugin simply allows one to categorize the many sites/blogs within a single WordPress Multisite system. so for example you may how 100 sites. Some are focused on Cooking or Vacations or Literature. With Site Categories you setup these categories and associate the respective sites to the category. Then on the main site there is a landing page which will list out the site by category.

    If you are still reading and still interested then I can help you. The Site Categories tables does not create its own or new database table. No, no, no. The site categories like all things in WordPress are part of the Taxonomy system.

    As part of the plugin there is a custom taxonomy setup via the WordPress core function 'register_taxonomy' which is line 750 of site_categories.php.

    The important thing to remember is this custom taxonomy is only used on the primary site of the network. Any sub-sites using the widgets for example will perform a switch_to_blog() function to set the primary site in order to query the taxonomy.

    Not sure how else to assist. Remember hacking the plugin code is a serious offense and voids your warranty! :slight_smile:

  • Stylos

    @Roibot - thanks for your hint; I was aware that there are such functions - for example I´ve managed to get the blogs of my wpmu installation listed on the "home" page by using such a BuddyPress specific one. But I just do not know how to do that in a more specific way with the "Site Categories" plug-in and possibly also extend its functionality. I do not practise coding very much, so when trying to wrap my head around things, sometimes I get lost (and might ask some vague not-to-the-point questions, sorry for that!) sometimes I find a code snipet on the net and can accomplish another small step... Unfortunately not an effective and very timeconsuming method. Appreciate your reaction, thanks!

  • Stylos

    @Paul - Hi Paul, thank you very much for getting back on this, great to talk to the developer! Please excuse me for not being precise enough when stating my initial question. I do like the "Site Categories" plug-in very much and indeed already make use of it on a wpmu/ buddypress test installation. The core functionality works fine and what it has to offer is just what I´ve been looking for. I need to categorise the blogs one can create via BuddyPress - and the great thing is during the creation process the new blog owner has to choose one (or more) categories; this is really a great functionality of the plugin! Also, I am very fond of the widget that allows me to show the categories in a side bar , that´s great too! And the possibility to have an overview of the existing categories with a category image and the number of corresponding blogs (although, guess with BuddyPress I could accomplish this somehow by listing the existing groups for they relate to the main categories).

    So everything is fine - BUT: I would like to have more, at least use the functionality to show an image (photo) for each of the sites/ blogs - not only for the categories! This is what I was referring to, when I said, that this does not work with BuddyPress, ´cause the "Site Categories" makes use of another plugin (wpmu "Avatars" plugin) in order to show the sites/blogs avatars, that does not work/ function with BuddyPress! This is a real (turmoil) limitation. Furthermore, it would be nice to have some formatting options - like the descriptive text for the site/blog would ideally be placed aside the blog´s image/ avatar, and the length of the excerpt could be choosen (of course this relates to "my preferences" for my main blog!).

    The formatting of the "categories landing page" is not ideal for my ambitions. It would perform better if one could choose the size and the shape of the image - not only square format. The reason for asking for such a functionality is the formatting of the descriptive text for each category: the category name shows up on the right side of the image, the text description of the category is positioned beneath the image and each category make use of "only" one line. So this is a lot of space "wasted" and, to my mind, it somehow looks bad in terms of Design!!! Furthermore if one has a lot of categories this makes a huge landing page where the prospect has to scroll a lot to get to a certain category - or even get lost/ confused a bit because of this formatting issue.

    That said, you might understand better that the wish arouses to do some modifications - did not thought about "hacking the code" naive me!
    I am far from doing that and it is not my intention to do so - besides, I really have to read (and get in to it) that there is a declaration at the beginning of most of the php files with wpmu that states (intentionally?) "...This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (Version 2 - GPLv2) as published by the Free Software Foundation...." I´ts not my intention to start such a discussion here now - just a statement that I will read this more carefully soon before even thinking of trying to do some minor customizations (let alone if I´ll be able to realize that with my programming skills...).

    Paul, you have my sympathy - especially for programming such a neat plugin! But I can´t help myself for being a bit ironic (hopefully in a constructive way) to ask you how the "Site Categories" product image, used all over the wpmu blog, that shows the nicely formatted upper case big font category names with the list of sites underneath it was made, even with nicely formatted corresponding category icons on the left side - is that a fake image or just a "developers-hack"?

    Now I will get back to your advice and read about the "register_taxonomy" stuff; must say this confused me already and also got me astray when checking out the "Custom Press" plugin months ago! I do have the feeling to have to tear a wall down in order to kill a fly...

    Appreciate your help very much and certainly have some more questions soon! Thanks for now, have a great day!

  • Paul

    BUT: I would like to have more, at least use the functionality to show an image (photo) for each of the sites/ blogs - not only for the categories!

    Ah. Ok.

    (wpmu "Avatars" plugin) in order to show the sites/blogs avatars, that does not work/ function with BuddyPress!

    Was not aware that plugin didn't work with BuddyPress. I can help get this working or maybe if BuddyPress has some other option. Sorry to say I don't spend much of my time in BuddyPress.

    So this is a lot of space "wasted" and, to my mind, it somehow looks bad in terms of Design!!!

    Well, first thing you have to realize is the layout of the Site Categories information is really dependent on the theme you are using it in. There is no way for us to develop something that will be universal in other words look that same on all implementations. Because we would get a lot of hate message that the layout broken something else on the site. So the decision was made to just provide the structure. Then let the site admin tweak the CSS in their theme to override the CSS structure used by Site Categories. If you provide a link or some screenshots I can help advise how you need to tweak your CSS.

    Furthermore if one has a lot of categories this makes a huge landing page where the prospect has to scroll a lot to get to a certain category - or even get lost/ confused a bit because of this formatting issue.

    I'm not sure on your point. The landing page has options to control how many categories per page, etc.

    that there is a declaration at the beginning of most of the php files with wpmu that states (intentionally?) "...This program is free software;

    Well, yes, like all WordPress this is open source (GPL) software. My previous comment was more of a joke. We see this regularly. Someone downloads or finds one of out plugins and modifies the code. Then something breaks and they want support. We always try and help them out. But seriously please consider contributing your code changes back to this thread. Then I can review and see that the important parts make it back into the actual plugin for others. Share is Community.

    how the "Site Categories" product image, used all over the wpmu blog, that shows the nicely formatted upper case big font category names with the list of sites underneath it was made, even with nicely formatted corresponding category icons on the left side - is that a fake image or just a "developers-hack"?

    Yes, that is in fact a designers concept and not something produced by Site Categories. I'm just a developer. I don't manage the marketing.

    On to your real issue. you should probably forget the register_post_type function I previously directed you to. With your new email I see you really want to address more issue with the formatting.

    To start take a look at the display templates. These are located site-categories/lib/display_templates/ Inside this folder there are 4 files. Three are used for the categories output for accordion, grid and list. The fourth template is the sites list from a specific site category.

    So if you want to add your own code to pull in an image for the site. This fourth template, display_list_category_sites.php is where you want to start. Let me know as you get into the development. I'll try and do as much hand holding as needed.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.