Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2008-05-30 01:59:07

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_dashboard: Customizable dashboard

0.2 is up – you can now edit the tab name (link in help file).

Offline

#32 2008-05-30 15:14:21

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: jmd_dashboard: Customizable dashboard

Thanks jm. That did the trick.

Mike

Offline

#33 2008-05-30 16:08:32

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

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

#34 2008-05-30 16:20:33

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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-

  1. Get rid of the jmd_dashboard subtab (won’t be in dropdown nav)
  2. Don’t highlight the top-row dashboard tab
  3. 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

#37 2008-08-12 03:47:26

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

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

#40 2008-10-01 03:43:55

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#41 2008-10-01 03:58:39

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: jmd_dashboard: Customizable dashboard

Does this work for you?

add_privs('jmd_dashboard', '1, 2, 3, 4, 5');

Offline

#42 2008-10-01 04:42:20

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: jmd_dashboard: Customizable dashboard

jm wrote:

Does this work for you?

add_privs('jmd_dashboard', '1, 2, 3, 4, 5');

Sure does, thanks!


My Plugins

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

#44 2009-10-12 16:06:12

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

#45 2010-04-03 18:19:04

robin746
Member
From: Ireland
Registered: 2007-09-22
Posts: 113
Website

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

Board footer

Powered by FluxBB