Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: jmd_dashboard: Customizable dashboard
0.2 is up – you can now edit the tab name (link in help file).
Offline
Re: jmd_dashboard: Customizable dashboard
Thanks jm. That did the trick.
Mike
Offline
Re: jmd_dashboard: Customizable dashboard
jm
Sorry to be a pain. Another bug maybe? When clicking on the Dashboard tab both the dashboard and extension tabs are highlighted, and all the extension subtabs are present. I assume that’s not the intended behavior?
I have this on two installs. One is a fresh install with only has jmd_dasboard and jmd_count, so I don’t think its other plugins.
Mike
Offline
Re: jmd_dashboard: Customizable dashboard
No, that’s how it’s setup. The top-row dashboard tab is a link to the jmd_dashboard extensions tab. What do you all think-
- Get rid of the jmd_dashboard subtab (won’t be in dropdown nav)
- Don’t highlight the top-row dashboard tab
- All of the above
Offline
#35 2008-05-30 16:44:44
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,319
Re: jmd_dashboard: Customizable dashboard
4. Mention in the documentation. ;)
After deactivating one line in the code and an update, where the deactivation got overwritten, I’ve got used to it.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#36 2008-08-11 20:33:20
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: jmd_dashboard: Customizable dashboard
i was just in the middle of customizing my dashboard whilst a dashboard shown in another browser tab. So out of nowhere, when I refreshed the tab… won’t load anymore! >.< is there something wrong?
<txp:Ruhh />
Offline
Re: jmd_dashboard: Customizable dashboard
If you have invalid TXP code in the dashboard form, then you might get a white page on some servers. Is that what you mean by “won’t load anymore?” Make sure you’re using 0.2 too.
Offline
#38 2008-08-12 11:43:59
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: jmd_dashboard: Customizable dashboard
JM
Howdy. One preg_blahblahblah ‘gotcha’ that can lead to blank pages is not checking for returned NULL (error) values. I only just found this out recently so I thought I’d better share it.
Doing things like…
return preg_replace($pattern, $matches[0][0] . $dashTab, $buffer);
…is dangerous. Try…
$tmp=preg_replace($pattern, $matches[0][0] . $dashTab, $buffer);
return (NULL === $tmp) ? $buffer : $tmp;
…or…
$tmp=preg_replace($pattern, $matches[0][0] . $dashTab, $buffer);
if( NULL !== $tmp ) $buffer = $tmp;
unset($tmp);
return $buffer;
…instead just to be safe. At least if the replace ever errors you won’t wipe the entire buffer.
— Steve
Offline
#39 2008-08-12 16:09:32
- Ruhh
- Member

- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: jmd_dashboard: Customizable dashboard
Actually, not even close to a white page. Just won’t load as in won’t open Dashboard at all. Stays on current page while that browser loading.gif is ongoing. I don’t remember exactly what happened that lead to that problem. But I am guessing after I played around with changing the tab name.
<txp:Ruhh />
Offline
Re: jmd_dashboard: Customizable dashboard
Is there a way to allow other access levels to view the Dashboard? I tried adding add_privs('jmd_dashboard', 3); but still get Restricted Area
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: jmd_dashboard: Customizable dashboard
Does this work for you?
add_privs('jmd_dashboard', '1, 2, 3, 4, 5');
Offline
Re: jmd_dashboard: Customizable dashboard
jm wrote:
Does this work for you?
add_privs('jmd_dashboard', '1, 2, 3, 4, 5');
Sure does, thanks!
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#43 2009-02-25 13:45:09
- koobs
- Member
- Registered: 2008-11-25
- Posts: 27
Re: jmd_dashboard: Customizable dashboard
Hi, Could somebody please explain how I get the dashboard to show as top level menu item. When I log in I get the dashboard page but it’s under Extensions>jmd_dashboard.
All help appreciated – thanks
Offline
Re: jmd_dashboard: Customizable dashboard
With txp 4.2.0, go to advanced preferences subtab, and in default_event select jmd_dashboard. A little late, but it works.. :)
Offline
Re: jmd_dashboard: Customizable dashboard
I will clarify the last few messages, now I have got this working for myself. This is for an install on Textpattern 4.2.
To allow users of different privileges the rights to this plugin, you need to edit the first function in the plugin code. Put something like the following as the top line of that function. The second parameter is a string.
add_privs('jmd_dashboard', '1, 2, 3');
If you want to change where in the tabs the Dashboard shows up, you can edit the next line. Having the Dashboard under Extensions is generally not so useful, especially since most of my users do not have rights to see this. You can also change the menu option to read whatever you like. Like so:
register_tab('content', 'jmd_dashboard', 'Welcome');
Finally, to get this to be the first thing a user sees on login, you need to choose from the menu Admin > Preferences. Click on “Advanced” and look in the “Admin” section. Change “Default admin tab” to be your Dashboard.
Last edited by robin746 (2010-04-03 18:19:28)
robin
Offline