jDiction Forum

English => Extensions and jDiction => Topic started by: xgon on October 20, 2014, 06:36:49 pm

Title: jDiction and PhocaDownload
Post by: xgon on October 20, 2014, 06:36:49 pm
I use Phocadownload to manage the files that can be retrieved from my website.

Is it possible to have the categories and file descriptions managed by jdiction?

Thanks
Title: Re: jDiction and PhocaDownload
Post by: Harald Leithner on October 20, 2014, 07:22:49 pm
I didn't use this component i wrote my own.

But i think its only a XML file away ;)

Maybe you Figuren it out by your self and share you XML file with US or someone helps you with it (maybe developer or I)

Title: Re: jDiction and PhocaDownload
Post by: xgon on October 31, 2014, 04:53:41 am
Hello,

I made the XML file like this:

<?xml version="1.0" encoding="utf-8"?>
<jdiction>
  <component>com_phocadownload</component>
  <sections>
    <section>
      <tables>
        <table>
          <name>#__phocadownload_categories</name>
          <key>id</key>
          <class>TablePhocaDownloadCat</class>
          <file>phocadownloadcat.php</file>
          <cache fullfetch="1" />
          <exportfilter/>
        </table>
        <table>
          <name>#__phocadownload</name>
          <key>id</key>
          <class>TablePhocaDownload</class>
          <file>phocadownload.php</file>
          <cache fullfetch="1" />
          <exportfilter/>
        </table>
      </tables>
      <views>
        <view name="phocadownloadcats" list="phocadownloadcats" layout="edit" default="true">
          <form import="phocadownloadcat.xml">
            <fieldset name="main" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
              <field name="title" />
             <field name="alias" />
            </fieldset>
          </form>
        </view>
         <view name="phocadownloadfiles" list="phocadownloadfiles" layout="edit" default="true">
          <form import="phocadownloadfile.xml">
            <fieldset name="main" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
              <field name="title" />
             <field name="alias" />
            </fieldset>
          </form>
        </view>
      </views>
    </section>
  </sections>
</jdiction>


My goal is translate the files and categories, tables #__phocadownload and #__phocadownload_categories.

The problem is when I edit the translation of a category, the file with the same id gets the translation of the category.

What is wrong?


Thanks
Title: Re: jDiction and PhocaDownload
Post by: Harald Leithner on October 31, 2014, 11:56:04 am
Maybe this works better:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<jdiction>
  <component>com_phocadownload</component>
  <sections>
    <section>
      <tables>
        <table>
          <name>#__phocadownload_categories</name>
          <key>id</key>
          <class>TablePhocaDownloadCat</class>
          <file>phocadownloadcat.php</file>
          <cache fullfetch="1" />
          <exportfilter/>
        </table>
      </tables>
      <views>
        <view name="phocadownloadcats" list="phocadownloadcats" layout="edit" default="true">
          <form import="phocadownloadcat.xml">
            <fieldset name="main" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
              <field name="title" />
             <field name="alias" />
            </fieldset>
          </form>
        </view>
      </views>
    </section>
    <section>
      <tables>
        <table>
          <name>#__phocadownload</name>
          <key>id</key>
          <class>TablePhocaDownload</class>
          <file>phocadownload.php</file>
          <cache fullfetch="1" />
          <exportfilter/>
        </table>
      </tables>
      <views>
         <view name="phocadownloadfiles" list="phocadownloadfiles" layout="edit" default="true">
          <form import="phocadownloadfile.xml">
            <fieldset name="main" label="COM_JDICTION_TRANSLATION_FIELDSET_MAIN">
              <field name="title" />
             <field name="alias" />
            </fieldset>
          </form>
        </view>
      </views>
    </section>
  </sections>
</jdiction>
Title: Re: jDiction and PhocaDownload
Post by: xgon on October 31, 2014, 05:26:28 pm
it works GREAT!

Thanks.
Title: Re: jDiction and PhocaDownload
Post by: xgon on October 31, 2014, 08:32:24 pm
it works GREAT!

Thanks.

Ohhh, not great yet. There's this problem: When the category list is queried from the database, we have this result, for the default language:

Code: [Select]
array(13) {
  [0]=>
  object(stdClass)#4784 (8) {
    ["id"]=>
    string(1) "1"
    ["parent_id"]=>
    string(1) "0"
    ["title"]=>
    string(6) "IO.GSM"
    ["alias"]=>
    string(6) "io-gsm"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "0"
  }
  [1]=>
  object(stdClass)#4842 (8) {
    ["id"]=>
    string(1) "6"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "5"
  }
  [2]=>
  object(stdClass)#4786 (8) {
    ["id"]=>
    string(2) "10"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "2"
  }
  [3]=>
  object(stdClass)#4858 (8) {
    ["id"]=>
    string(1) "2"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "6"
  }
  [4]=>
  object(stdClass)#4917 (8) {
    ["id"]=>
    string(1) "5"
    ["parent_id"]=>
    string(1) "0"
    ["title"]=>
    string(6) "IO.XEC"
    ["alias"]=>
    string(6) "io-xec"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "0"
  }
  [5]=>
  object(stdClass)#4856 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "9"
  }
  [6]=>
  object(stdClass)#4915 (8) {
    ["id"]=>
    string(2) "11"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "2"
  }
  [7]=>
  object(stdClass)#4854 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "8"
  }
  [8]=>
  object(stdClass)#4913 (8) {
    ["id"]=>
    string(2) "12"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(2) "11"
  }
  [9]=>
  object(stdClass)#4852 (8) {
    ["id"]=>
    string(1) "4"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "5"
  }
  [10]=>
  object(stdClass)#4911 (8) {
    ["id"]=>
    string(2) "13"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(13) "Controladores"
    ["alias"]=>
    string(13) "controladores"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [11]=>
  object(stdClass)#4853 (8) {
    ["id"]=>
    string(1) "9"
    ["parent_id"]=>
    string(1) "0"
    ["title"]=>
    string(11) "IO.Control2"
    ["alias"]=>
    string(11) "io-control2"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "0"
  }
  [12]=>
  object(stdClass)#5019 (8) {
    ["id"]=>
    string(2) "14"
    ["parent_id"]=>
    string(1) "0"
    ["title"]=>
    string(14) "inforSolutions"
    ["alias"]=>
    string(14) "inforsolutions"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(3) "841"
    ["numdoc"]=>
    string(2) "10"
  }
}

but for the translated language, I have this result:

Code: [Select]
array(62) {
  [0]=>
  object(stdClass)#5553 (8) {
    ["id"]=>
    string(1) "1"
    ["parent_id"]=>
    string(1) "0"
    ["title"]=>
    string(6) "IO.GSM"
    ["alias"]=>
    string(6) "io-gsm"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "0"
  }
  [1]=>
  object(stdClass)#5583 (8) {
    ["id"]=>
    string(1) "6"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [2]=>
  object(stdClass)#5548 (8) {
    ["id"]=>
    string(1) "6"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [3]=>
  object(stdClass)#5442 (8) {
    ["id"]=>
    string(1) "6"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [4]=>
  object(stdClass)#5550 (8) {
    ["id"]=>
    string(1) "6"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [5]=>
  object(stdClass)#5443 (8) {
    ["id"]=>
    string(1) "6"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [6]=>
  object(stdClass)#5552 (8) {
    ["id"]=>
    string(2) "10"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [7]=>
  object(stdClass)#5444 (8) {
    ["id"]=>
    string(2) "10"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(10) "Documentos"
    ["alias"]=>
    string(10) "documentos"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [8]=>
  object(stdClass)#5554 (8) {
    ["id"]=>
    string(1) "2"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [9]=>
  object(stdClass)#5445 (8) {
    ["id"]=>
    string(1) "2"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [10]=>
  object(stdClass)#5556 (8) {
    ["id"]=>
    string(1) "2"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [11]=>
  object(stdClass)#5558 (8) {
    ["id"]=>
    string(1) "2"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [12]=>
  object(stdClass)#5447 (8) {
    ["id"]=>
    string(1) "2"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [13]=>
  object(stdClass)#5560 (8) {
    ["id"]=>
    string(1) "2"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [14]=>
  object(stdClass)#5448 (8) {
    ["id"]=>
    string(1) "5"
    ["parent_id"]=>
    string(1) "0"
    ["title"]=>
    string(6) "IO.XEC"
    ["alias"]=>
    string(6) "io-xec"
    ["access"]=>
    string(1) "1"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "0"
  }
  [15]=>
  object(stdClass)#5562 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [16]=>
  object(stdClass)#5449 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [17]=>
  object(stdClass)#5564 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [18]=>
  object(stdClass)#5450 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [19]=>
  object(stdClass)#5566 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [20]=>
  object(stdClass)#5451 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [21]=>
  object(stdClass)#5568 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [22]=>
  object(stdClass)#5452 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [23]=>
  object(stdClass)#5570 (8) {
    ["id"]=>
    string(1) "7"
    ["parent_id"]=>
    string(1) "5"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [24]=>
  object(stdClass)#5589 (8) {
    ["id"]=>
    string(2) "11"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [25]=>
  object(stdClass)#5572 (8) {
    ["id"]=>
    string(2) "11"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(8) "Firmware"
    ["alias"]=>
    string(8) "firmware"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [26]=>
  object(stdClass)#5591 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [27]=>
  object(stdClass)#5574 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [28]=>
  object(stdClass)#5593 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [29]=>
  object(stdClass)#5576 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [30]=>
  object(stdClass)#5595 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [31]=>
  object(stdClass)#5578 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [32]=>
  object(stdClass)#5597 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [33]=>
  object(stdClass)#5580 (8) {
    ["id"]=>
    string(1) "3"
    ["parent_id"]=>
    string(1) "1"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [34]=>
  object(stdClass)#5599 (8) {
    ["id"]=>
    string(2) "12"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [35]=>
  object(stdClass)#5582 (8) {
    ["id"]=>
    string(2) "12"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
  [36]=>
  object(stdClass)#5601 (8) {
    ["id"]=>
    string(2) "12"
    ["parent_id"]=>
    string(1) "9"
    ["title"]=>
    string(8) "Software"
    ["alias"]=>
    string(8) "software"
    ["access"]=>
    string(1) "2"
    ["description"]=>
    string(0) ""
    ["accessuserid"]=>
    string(1) "0"
    ["numdoc"]=>
    string(1) "1"
  }
}
>:(this code was truncated!!!

The categories, subcategories and files work this way: Categories and subcategories are stored in the same table and each has it's own id. The files have also an id, and a category id (straight forward)

The query that retrieves this data is:

a) for the default language:
SELECT cc.id, cc.parent_id, cc.title, cc.alias, cc.access, cc.description, cc.accessuserid, COUNT(c.id) AS numdoc FROM #__phocadownload_categories AS cc LEFT JOIN #__phocadownload AS c ON c.catid = cc.id AND c.published = 1 AND c.textonly = 0 WHERE cc.published = 1 AND cc.access IN (1,1,2,3,6) AND cc.language IN ('pt-PT','*') GROUP BY cc.id ORDER BY cc.ordering ASC

b)and for the translated:
SELECT cc.id, cc.parent_id, cc.title, cc.alias, cc.access, cc.description, cc.accessuserid, COUNT(c.id) AS numdoc FROM #__phocadownload_categories AS cc LEFT JOIN #__phocadownload AS c ON c.catid = cc.id AND c.published = 1 AND c.textonly = 0 WHERE cc.published = 1 AND cc.access IN (1,1,2,3,6) AND cc.language IN ('en-GB','*') GROUP BY cc.id ORDER BY cc.ordering ASC

The column numdoc (COUNT) in the translated is always equal to 1!

The bottom line is: when the xml file is present (jdiction.xml), the category list for the default language displays correctly; for the translated language, the category list has 62 items(which is the sum of all the files included in all the categories).

There must be a group or join problem in jdiction plugin.



Please help me out.

Thanks



Title: Re: jDiction and PhocaDownload
Post by: Harald Leithner on November 24, 2014, 06:35:26 pm
upps sorry I missed this thread...

problem still exists?

Its possible that there are still group problems and it is not easy to solve them correct...

jdiction changes the query by adding all primary keys and adding them to the group clause... maybe thats not the best idea....
Title: Re: jDiction and PhocaDownload
Post by: salher on August 04, 2016, 02:44:21 pm
Hi, I know this is a a very old post but I have exactly the same issue.
Any solution yet?

upps sorry I missed this thread...

problem still exists?

Its possible that there are still group problems and it is not easy to solve them correct...

jdiction changes the query by adding all primary keys and adding them to the group clause... maybe thats not the best idea....

Title: Re: jDiction and PhocaDownload
Post by: Harald Leithner on August 04, 2016, 03:16:49 pm
I maybe could be solved with jdiction 2.0 only beta access atm if you like the version I can send it to you.
Title: Re: jDiction and PhocaDownload
Post by: salher on August 05, 2016, 08:30:16 am
I maybe could be solved with jdiction 2.0 only beta access atm if you like the version I can send it to you.

Yes please. I would like to try that version.
Thanks.
Title: Re: jDiction and PhocaDownload
Post by: Harald Leithner on August 08, 2016, 03:28:38 pm
I sent you the zip file.
Title: Re: jDiction and PhocaDownload
Post by: salher on August 09, 2016, 11:33:44 am
I sent you the zip file.

Unfortunately it does not work with version 2 either. :(


Thanks anyway.