The widget that shows the users most latest edits and creations is exactly what I need, but I'd also like it to include everything that other people have edited and/or created, but only from certain parents.
I have no qualification in PHP.
This is the code that generates the widgets that shows the recent resources the user has edited:
<?php
/**
* @package modx
* @subpackage dashboard
*/
/**
* Renders a grid of recently edited resources by the active user
*
* @package modx
* @subpackage dashboard
*/
class modDashboardWidgetRecentlyEditedResources extends modDashboardWidgetInterface {
public function render() {
$this->modx->controller->addHtml('<script type="text/javascript">Ext.onReady(function() {
MODx.load({
xtype: "modx-grid-user-recent-resource"
,parent: "'.$this->modx->user->get('id').'"
,renderTo: "modx-grid-user-recent-resource"
});
});</script>');
return $this->getFileChunk('dashboard/recentlyeditedresources.tpl');
}
}
return 'modDashboardWidgetRecentlyEditedResources';
It's fairly simple so I'm lead to believe that I could achieve what I want with little modification? If someone could help me out with this I'd be really thankful.