...overview of the extension...
Yii 1.1.5 or above.
'modules'=>array( 'dashboard' => array( 'debug' => true, 'portlets' => array( 'News' => array('class' => 'News', 'visible' => true, 'weight' => 0), 'Forums' => array('class' => 'Forums', 'visible' => true, 'weight' => 1), 'Videos' => array('class' => 'Videos', 'visible' => true, 'weight' => 2), 'Blogs' => array('class' => 'Blogs', 'visible' => true, 'weight' => 3), 'Friends' => array('class' => 'Friends', 'visible' => true, 'weight' => 4), ), ), ),
Access the dashboard page by index.php/dashboard
User can create own portlet.
a:
class Blogs extends DPortlet { protected function renderContent() { echo 'Blogs Content'; } protected function getTitle() { return 'Blogs'; } protected function getClassName() { return __CLASS__; } }
b: Put this portlet file into /modules/dashboard/portlets directory.
c: Add this portlet into dashboard configuration like step 1.
Total 10 comments
Add 'DEFAULT 0' to table def in DashboardModule.php to avoid save error
$sql = "CREATE TABLE IF NOT EXISTS `dashboard_portlet` ( `id` int unsigned NOT NULL auto_increment, `dashboard` int unsigned NOT NULL DEFAULT 0 , `uid` int unsigned, `settings` text character set utf8 default NULL, PRIMARY KEY (`id`) ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;";Otherwise great little module!
I got the following message while moving portlets, i have set enableSsrfValidation=true in my config file. how do get fix this issue?. any help appreciated
Error message : "The CSRF token could not be verified."
Hello All, I have done the same steps just like Add in config/main.php:
But not getting any results when going to the url index.php/dashboard. Any help and suggestions will be highly appreciable.
thank you for the extension baut it doesn't work with me, oleaase can someone help me, i have followed the steps here but it doesn't work when i access the page index.php/dashboard
I think I've made some changes that address my last comment:
in DefaultController.php change the last half to:
Line 25 of dashboard.php iterate over the new $allPortlets var
IN views/default/index.php add the allPortlets var
Hi,
First, cool extension. I got it up and running painlessly!
I started out with 2 portlets and viewed my admin user's dashboard. Then I went back to config and added more Portlets. These new portlets did not appear in the toggle portlets screen.
I got them to appear by deleting settings in the DB for that user.
I'm trying to figure out where to query the config to list all portlets now.
Thanks, hope this helps.
First, Thank you for your comments.
For issue 1: your must control user access by your site access control. This is access control is prior to action. Your can try srbac module to do this.
For issue 2: I will check this and fix this bug if it exists.
First thank you very much for your sharing. I have two things:
1- You must check in the default controller if the user is guest or not, otherwise an exception will be thrown if the user is not logged in.
2- I found a bug, when you press "Toggle Portlet" a pop up window will appear ask you to hide or show portlet, ok, uncheck the first one and press "save" button, nothing happen! I supposed when uncheck or check one of the available Portlet in pop up window, and pressed "save" button something happen, but no.
thats it, and thank you again for your sharing.
Thanks for your suggestion. This is in project plan. I will achieve this functionality in 1.2.
very nice module. what do you think about extending it a bit. for example - adding extra buttons to the title - like "settings". And persisting Widget config and state in DB. I'll give it a try myself. thanks for sharing :)
Leave a comment
Please login to leave your comment.