Ignore the entire first part of this post which is really meant as a reply to Jaanus for this post he made to me a while back. Move on to "THAT SAID"
While I understand the concept and wish I still had the health and spirit to get into helping out, it?s just not something I could do right now. I don?t mean to sound condescending to anyone who is having fun with it ? or to sound selfish - but I learned years ago that I cannot take on any more than I need to do. The stress of any sort of community involvement only makes my condition worst. It wasn?t an easy thing to do, but I?ve basically been forced into a near hermit-like existence. The old me is missed, but the new me was finally accepted as a part of life.
My days of playing in the sandboxes of cyberspace are long past. I still enjoy playing with the new technologies as they come out. But I don?t do it to with the intent of ?making money? off of it or even to be ?sociable?- I do it out of curousity and to ?keep up? with the technology. It?s ?a hobby?.
I don?t Twitter, I don?t chat, I don?t Skype, I don?t have a Facebook page ? hell, I don?t even have a cell phone (really!).
Yet all of the aforementioned technologies or innovations - I played with them extensively when they first emerged in their earliest beta stages. But like most everything else in my life, once something becomes ?mainstream?, it?s generally about the time I lose interest and move on.
THAT SAID, I worked today on solving my biggest bitch about Fabrik. (Joined tables always being included as ?editable? in forms.)
After spending nearly the entire day just diving into the Fabrik code and trying to better understand the design, I came up with a solution that required changes in 5 lines of code in 2 php files.
If you want to take my changes and post them as a GitHub ?pull request? ? please do so. But like I said, I have no intent becoming anything more than a beta tester - at least not at this time or the foreseeable near future.
The only part of this "new feature" that I didn?t do today ? (and am hoping I won?t have to do myself, if this gets added to the Fabrik core) ? is to add the one added parameter that would be needed in the ?Groups? configuration.
That parameter would be an additional yes/no element ? i.e. ?Read-Only: o No o Yes? (with the default of No)
I just manually added that ,"read only":"1" to the end of the params field in the #__fabrik_groups where I wanted to use this new feature. Generally it would be used only in Groups that were Joined Groups.
Anyhow ? here?s the changes I made.
In /components/com_fabrik/models/form.php ? in public function getGroupView($tmpl = '') ? just after the line
Then at line 4139? I added the additional readonly parameter flag...
THEN in /components/com_fabrik/models/element.php at line 1546 ? public function preRender($c, $elCount, $tmpl)
and a few lines down this if/else was changed?
THAT?S IT! Now any Group flagged as ?readonly? in the params will have the elements shown as readonly ?details? instead of input elements.
BTW, when working on this today I ran across an ?out of memory? error numerous times (and I have memory set to 256M). I boiled that down to inside that same public function getGroupView($tmpl = '') function in /components/com_fabrik/models/form.php (line 4110?)
Really? You want to reiterate the entire ?$this? object here? You might want to find an alternative to that one, as it's a real memory hog.
While I understand the concept and wish I still had the health and spirit to get into helping out, it?s just not something I could do right now. I don?t mean to sound condescending to anyone who is having fun with it ? or to sound selfish - but I learned years ago that I cannot take on any more than I need to do. The stress of any sort of community involvement only makes my condition worst. It wasn?t an easy thing to do, but I?ve basically been forced into a near hermit-like existence. The old me is missed, but the new me was finally accepted as a part of life.
My days of playing in the sandboxes of cyberspace are long past. I still enjoy playing with the new technologies as they come out. But I don?t do it to with the intent of ?making money? off of it or even to be ?sociable?- I do it out of curousity and to ?keep up? with the technology. It?s ?a hobby?.
I don?t Twitter, I don?t chat, I don?t Skype, I don?t have a Facebook page ? hell, I don?t even have a cell phone (really!).
Yet all of the aforementioned technologies or innovations - I played with them extensively when they first emerged in their earliest beta stages. But like most everything else in my life, once something becomes ?mainstream?, it?s generally about the time I lose interest and move on.
THAT SAID, I worked today on solving my biggest bitch about Fabrik. (Joined tables always being included as ?editable? in forms.)
After spending nearly the entire day just diving into the Fabrik code and trying to better understand the design, I came up with a solution that required changes in 5 lines of code in 2 php files.
If you want to take my changes and post them as a GitHub ?pull request? ? please do so. But like I said, I have no intent becoming anything more than a beta tester - at least not at this time or the foreseeable near future.
The only part of this "new feature" that I didn?t do today ? (and am hoping I won?t have to do myself, if this gets added to the Fabrik core) ? is to add the one added parameter that would be needed in the ?Groups? configuration.
That parameter would be an additional yes/no element ? i.e. ?Read-Only: o No o Yes? (with the default of No)
I just manually added that ,"read only":"1" to the end of the params field in the #__fabrik_groups where I wanted to use this new feature. Generally it would be used only in Groups that were Joined Groups.
Anyhow ? here?s the changes I made.
In /components/com_fabrik/models/form.php ? in public function getGroupView($tmpl = '') ? just after the line
Code:
$groupParams = $groupModel->getParams();
Code:
// Bauer ADDED (at about line 3991?) ? reads Group ?readonly? param
$ro = $groupParams->get('readonly');
Code:
//$element = $elementModel->preRender($c, $elCount, $tmpl,);
// Bauer ADDDED PARAM $ro (readonly)
$element = $elementModel->preRender($c, $elCount, $tmpl, $ro);
Code:
// Bauer ADDED last param as readonly flag
public function preRender($c, $elCount, $tmpl, $readonly = false)
Code:
if (!$this->canUse())
{
$this->_editable = false;
}
else
{
// Bauer CHANGED
// $this->_editable = ($model->_editable) ? true : false;
$this->_editable = (($model->_editable) && (!$readonly)) ? true : false;
}
BTW, when working on this today I ran across an ?out of memory? error numerous times (and I have memory set to 256M). I boiled that down to inside that same public function getGroupView($tmpl = '') function in /components/com_fabrik/models/form.php (line 4110?)
Code:
$elementModel->_form = $this;