Poll

What new features would you like in mod_sobi2simplefeatured?

Optional Display of Category Name for each selected Entry
11 (18.6%)
Related Entries feature (selects entries from Meta Keywords data instead of Custom Field)
10 (16.9%)
Optional Display of Reviews and Ratings plug-in data
7 (11.9%)
Optional Display of Gallery plug-in image
14 (23.7%)
Javascript effects (MooTools,YooTools)
10 (16.9%)
Too many Features already - keep it simple
2 (3.4%)
Other (please specify by posting below)
5 (8.5%)

Total Members Voted: 31

Author Topic: Poll for new module features  (Read 8783 times)

0 Members and 2 Guests are viewing this topic.

Offline kenpachi01

Re: Poll for new module features
« Reply #20 on: 17. October 2009, 16:40:56 »
hi Mark,

Quote
4. Display category in entry.
Others have mentioned this, but I am not exactly sure what people mean by this. I would need some sort of specification to understand exactly what is required.

i was said you that will be great if on you module there is a possibility to add categories icons.

and to explain why that can be usefull for some kind of directories im sending you in pm my website link with explain

Regards,

Kenpachi
Country: France France |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.3 Firefox 3.5.3 | View Profile


Offline NicMason.com

[REQ:] Show Featured Entries of ALL SUBCATEGORIES of currently-viewed-category


Hi Mark,

Thank you very much for producing a great and very useful module!  I've re-styled it a bit here: http://yarraville.com.au/index.php


My question is:  Is it possible to combine the standard SOBI2 component setting of "Show Entries of Subcategories" with the SimpleFeaturedEntries module "Current Category Filter" set to "yes".

In other words, display the featured entries of all of the subcategories below the currently viewed category.

At present, the module seems to display the featured entries of the currently-viewed-category ONLY (without including the subcategories below this one.)

I hope you can understand what I'm getting at! :)

Cheers,

Nic
« Last Edit: 23. October 2009, 15:13:12 by NicMason.com »
Country: Australia Australia |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.3 Firefox 3.5.3 | View Profile NicMason.com

Offline aboututila

Re: Poll for new module features
« Reply #22 on: 23. October 2009, 18:00:01 »
Nic,

Interestingly (for me), my father was born in Yarraville, my mother in Footscray.
I was born in Ringwood.

(1) Anyway, I understand your requirements, but unfortunately what you describe in not possible in mod_sobi2simplefeatured without substantial additions to the module code, (which would also increase module database calls, processing time, and memory usage).

(2) You are correct in stating that the module can only display the featured entries of the currently-viewed-category ONLY (when Current Category Filter" set to "yes").

(3) It is not straightforward to implement a 'Show Selected Entries in Subcategories of the Currently Displayed Category' in the module since a SOBI2 Entry may belong to several Categories, and the currently displayed Category could have several thousand sub-categories. It is beyond my technical skills to write an efficient SQL query(ies) to implement your requirement.

Regards - Mark
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.3 Firefox 3.5.3 | View Profile

Offline NicMason.com

Re: Poll for new module features
« Reply #23 on: 23. October 2009, 20:42:00 »
Hi Mark,

How bizarre!  I've been living in the area for about ten years now and love it!  It's such a small world!  :grin:

Thank you, too, for the super-fast reply! :D  I'll have a go at it myself if/when I get time... One day!

Cheers neighbour!  8-)

Nic
Country: Australia Australia |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.3 Firefox 3.5.3 | View Profile NicMason.com

Offline NicMason.com

Re: Poll for new module features
« Reply #24 on: 26. October 2009, 14:30:07 »
Hi Mark,

Do you know how the main SOBI2 component does it with the setting of "Show Entries of Subcategories"..?

(I don't really care if there is a high overhead of DB calls, memory, or processing time.)

Cheers,

Nic
Country: Australia Australia |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.3 Firefox 3.5.3 | View Profile NicMason.com

Offline aboututila

Re: Poll for new module features
« Reply #25 on: 26. October 2009, 16:02:08 »
I believe that if Show Entries of Subcategories=1,
then the function 'function getChildCats ( $catid, &$catChilds )' is called  (in config.class.php at around line 2002 in SOBI2 RC 2.9.2.3) is called.

There is also another function 'function getChildCats($catid)' defined (in frontend.class.php at around line 78 in SOBI2 RC 2.9.2.3), and I believe this function is used to display the Entries in SubCategories.

config.class.php and frontend.class.php are both in MyJoomlaInstallation/components/com_sobi2

Regards- Mark
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.3 Firefox 3.5.3 | View Profile

Offline NicMason.com

Re: Poll for new module features
« Reply #26 on: 10. November 2009, 16:22:48 »
Thanks again Mark!

Much appreciated!  I'll have a look at those and see if something can be done...

Cheers,

Nic
Country: Australia Australia |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.5 Firefox 3.5.5 | View Profile NicMason.com

Offline aboututila

Re: Poll for new module features
« Reply #27 on: 13. November 2009, 21:56:10 »
Nic,

While working on another problem, I came across the following code;
Code: [Select]
    * Now get all categories witch contain this item
    */
    $p = $config->checkPerm() ? null : ' AND published = 1 ';
    $query = 'SELECT name, relation.catid, params FROM #__sobi2_cat_items_relations AS relation ' .
      'LEFT JOIN #__sobi2_categories AS cats ON relation.catid = cats.catid ' .
      "WHERE ( itemid = {$this->id}{$p} ) LIMIT {$config->maxCatsForEntry}";
$database->setQuery( $query );
    $results = $database->loadObjectList();
if ( $database->getErrorNum() ) {
trigger_error( 'sobi2::getAttributs(): DB reports: '.$database->stderr(), E_USER_WARNING );
}
in sobi2.class.php function getAttributs( $sobi2Id, $data = false ) at around line 360
which seems to be getting all the category names and ids (catid) for a given itemid (SOBI2 Entry).

and the following code;
    * returning subcategories info
    *
    * @param integer $parent
    * @return array
    */
   function getCategories($parent = 1)
   {
       $config =& sobi2Config::getInstance();
      $database =& $config->getDb();
      $published = null;
      if($parent < 1) {
         $parent = 1;
      }
      if(!(defined('_SOBI2_ADMIN')))  {
         $published = " published = 1 AND ";
      }
      $query = "SELECT `#__sobi2_cats_relations`.catid " .
              "FROM `#__sobi2_cats_relations` " .
              "LEFT JOIN `#__sobi2_categories` ON `#__sobi2_categories`.catid = `#__sobi2_cats_relations`.catid " .
              "WHERE {$published} `#__sobi2_cats_relations`.parentid = {$parent} ";
      $database->setQuery( $query );
      $cids = $database->loadResultArray();
      if ($database->getErrorNum()) {
         trigger_error("DB reports: ".$database->stderr(), E_USER_WARNING);
      }
in SigsuiTree.php function getCategories($parent = 1) at around line 227
which seems to be returning all the category ids ($cids) for the subcategories of a given 'parent' category id, and then getting information about those categories ($ret).

I don't know if this helps
Regards - Mark
Country: Honduras Honduras |  OS: Windows XP Windows XP |  Browser: Firefox 3.5.5 Firefox 3.5.5 | View Profile

Offline NicMason.com

Re: Poll for new module features
« Reply #28 on: 16. June 2010, 16:48:59 »
Hi Mark,

Thank you for the code!  I'll see if I can work something out...

Apologies for the late reply...  Haven't been here for a while!  ;)

Cheers,

Nic
Country: Australia Australia |  OS: Windows 7/Server 2008 R2 Windows 7/Server 2008 R2 |  Browser: Firefox 3.6.3 Firefox 3.6.3 | View Profile NicMason.com

Tags: