We have now opened a commercial services section here on the forum for registered users. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.
Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.
For running J!5.1 you must https://fabrikar.com/forums/index.php?wiki/update-from-github/ or include the new file manually https://fabrikar.com/forums/index.php?threads/joomla-5-1-and-fabrik-cannot-find-files-error.54473/post-285151 See also Announcements
// $model is the list model, we want to get its data and then alter it.
$data = $model->getData();
foreach ($data as $group)
{
foreach ($group as $row)
{
// Set a default rgb colour that will be used if nothing has been filled in by the colour picker
$default = '155,20,45' ;
// tablename___colour_raw is the raw full name of the Colour Picker element
$c = (string) $row->tablename___colour_raw === '' ? $default : $row->tablename___colour_raw;
// Update the 'birthday' element, wrapping it with a span with our selected colour.
$row->tablename___birthday = '<span style="color:rgb(' . $c . ')">' . $row->tablename___birthday . '<span>';
}
}
// $model is the list model, we want to get its data and then alter it.
$data = $model->getData();
foreach ($data as $group)
{
foreach ($group as $row)
{
$nowDate = strtotime($row->events___start_raw);
$thenDate = strtotime("today");
$dateDiff = $thenDate - $nowDate;
$row->events___start = round($dateDiff / 86400);
}
}
$data = $model->getData();
//Fabrik4 and Fabrik3
$app = Joomla\CMS\Factory::getApplication();
foreach ($data as $group) {
foreach ($group as $row) {
FabrikWorker::sendMail(
$app->getCfg('mailfrom'),
$app->getCfg('fromname'),
$row->tablename___email_raw,
"A row has been deleted!",
"Some message text, perhaps using some form data like this: {$row->tablename___element} "
);
}
}
/*Fabrik3 only
foreach ($data as $group) {
foreach ($group as $row) {
FabrikWorker::sendMail(
$this->config->get('mailfrom'),
$this->config->get('fromname'),
$row->tablename___email_raw,
"A row has been deleted!",
"Some message text, perhaps using some form data like this: {$row->tablename___element} "
);
}
}
*/
$f=$model->filters;
if (count($f)==0) return;// no filter active
if (in_array('220',$f['elementid']) ||in_array('222',$f['elementid'])) //if a filter is set for element_id 220 or 222
{
$model->setPluginQueryWhere('some-keyword', "privacy=2");//exclude all records with privacy=2 (will add AND privacy=2 to filter condition)
}
else {
$model->unsetPluginQueryWhere('some-keyword');//remove the additional filter condition
}