Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#85 2011-01-17 18:17:26

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

Re: smd_bio : store additional biographical info about your users

Bloke wrote:

maverick wrote: In theory yes. I think mem_admin_parse does it but it’s a function not a tag so you’d need some PHP.

yep – mem_admin_parse is a get/post function and designed to work w/ other plugins.

aside: I can see potential and possibilities if various pages on the admin side could be customizes using txp/plugin tag . . . for those of us php illiterate . . . not sure if it would be technically possible though . . . anyway

In the meantime, though, jmd_dashboard (derived from asy_dashboard), uses textpattern and plugin tags (via a form named jmd_dashboard). It could be used as is I would think, but might be a bit more elegant if updated to use the new home tab.

Then drop smd_bio tags on the form, mem_form, and it should be good to go?

Offline

#86 2011-01-17 18:33:08

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: smd_bio : store additional biographical info about your users

Are you suggesting Mike that with the use jmd_dashboard + mem_form we could have the smd_bio fields somewhere on a splash page inside Txp ?


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#87 2011-01-17 18:52:23

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

Re: smd_bio : store additional biographical info about your users

Not having tried it . . . but in theory it seems like it could work.

jmd_dashboard is supposed to parse any regular txp or plugin tags in its form. So displaying smd_bio tags should be simple enough in theory.

That leaves updating the information. since mem_form is just another plugin, it too should work w/ jmd_dashboard. So if it can do the update, it seems like you would be set.

If you want to use the new home tab feature in Txp 4.3.0:

  • net-carver has an unpublished plugin that uses the new home tab.
  • esq_adminsplash is mentioned possibly using it in a future update.
  • Not sure if Jon-Michael has any plans for jmd_dashboard. You’d need to ask.

Of the three, jmd_dashboard is the only one I know of that is designed to handle txp tags.

Last edited by maverick (2011-01-17 19:16:25)

Offline

#88 2011-01-17 19:28:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,432
Website GitHub

Re: smd_bio : store additional biographical info about your users

maverick wrote:

Not having tried it . . . but in theory it seems like it could work.

I see where you’re coming from now (I was being dim earlier). Yes that should work fine. Great idea. Would love to see it running.

Of the three, jmd_dashboard is the only one I know of that is designed to handle txp tags.

Not tried jmd_dashboard but net-carver’s supports tag parsing and Textile (I believe it was based on aro_myadmin: could be wrong).

Last edited by Bloke (2011-01-17 19:29:56)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#89 2011-01-17 20:14:22

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: smd_bio : store additional biographical info about your users

Thank you folks.
Mike, correct me again if I’m wrong: in theory, not tried yet, I could build a dashboard page with jmd_dashboard and using smd_bio tags in it… I would then be able to update the bio fields values from this dashboard page without having to browse to the user tab anymore ?
I’m not sure if mem_form is necessary here, in what scenario it would be useful…
Not sure either to understand what you mean by “updating the information”….

Last edited by hablablow (2011-01-17 20:16:40)


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#90 2011-01-17 20:28:55

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

Re: smd_bio : store additional biographical info about your users

hablablow

I’ve not used mem_form personally. So I’m unable to help w/ the specifics of how to set it up.

jmd_dashboard (and from Stef’s post, net-carver’s unpublished plugin) can parse smd_bio tags. I would imagine it would require a creative use of a conditional (if_author) type tag to only show only the logged in user’s info. That gets you part of the way there.

However, smd_bio tags only allow for output. That’s where mem_form would come in – it gives you the ability to submit updated information back into the database.

The outcome is a customized user profile page. They can only see the information you allow them to see (i.e. their own), and of that information, they can only update the fields you allow them to update (using mem_form).

There is no need to go to Admin -> Users, or even to have access to the Admin tab.

Does that help make it as clear as mud? ;)

Last edited by maverick (2011-01-17 20:29:27)

Offline

#91 2011-01-17 20:30:43

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

Re: smd_bio : store additional biographical info about your users

Bloke wrote:

net-carver’s supports tag parsing and Textile

Drooling :)

Offline

#92 2011-01-17 20:33:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,432
Website GitHub

Re: smd_bio : store additional biographical info about your users

hablablow

I’m trying something similar now (not with this plugin but for something else).

To expand on maverick’s point, using jmd_dashboard, build a TXP Form that has an HTML form in it, generated by mem_form (or mem_simple_form) tags (Argh Formformform!) I’m not sure if jmd_dashboard works the same way sed_dashboard does, so you may not build your output in a TXP Form, but I think they all work pretty much the same.

Anyway, you tell mem_form that you want to update the smd_bio table and get it to display text boxes / input controls that mimic the ones you’ve set up in smd_bio. When someone hits the big fat Submit button, mem_(simple_)form will store the contents of the page to the database, thus updating the user’s bio details.

The trickery comes from the fact that you know who has logged in (the $txp_user variable) and you can get their priv level if necessary so all you do is switch-case on the priv level or user name (you can use smd_multi_select for this if you like!) and display the appropriate form controls for that user. Et voila: a custom edit screen for your bio info from a different tab on the admin side that’s customised per user.

Thanks Mike for making me see the light. This is a rather groovy technique: I’ve just started putting a dashboard together on my own site to help me manage some of the non-TXP tables that govern the way my site operates. Yabba Dabba Dooo.

Last edited by Bloke (2011-01-17 20:38:06)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#93 2011-01-17 21:26:19

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

Re: smd_bio : store additional biographical info about your users

:) Your suggestion inspired my brainstorming! Glad if it was of use :)

I’ve been digging through old plugins, etc. I see that mem_user_workspace also adds a tab, uses mem_admin_parse, installs a form, and has functions for a basic user profile. So it seems to work along the same idea.

However, I’ve never used it before, and can’t get it to work in 4.3.0. Looking briefly at the code, it doesn’t appear to have smd_bio’s flexibility to customize the profile and I’m not sure if the output is just for the admin side tab or if its available as tags on the front side of the website as well

Last edited by maverick (2011-01-17 21:28:18)

Offline

#94 2011-01-17 22:28:52

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: smd_bio : store additional biographical info about your users

Mind blowing and as clear as cristall… I’ll return later in this thread when something nice shows up.
Thanks, both of you !

Last edited by hablablow (2011-01-17 22:33:48)


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#95 2011-01-18 14:17:14

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: smd_bio : store additional biographical info about your users

Started to use jmd_dashboard and came accross this comment from net-carver
Not sure what to think about this…


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

#96 2011-01-19 16:29:49

hablablow
Member
From: Paris
Registered: 2004-12-13
Posts: 309
Website

Re: smd_bio : store additional biographical info about your users

Stef,

I’m currently running into another and completely different problem with the smd_bio plugin…
Textpattern was very slow once working inside the admin. Turned on my net console and it appears that smd_bio is responsible for making more than 80 requests on a form page for example. Wether the form has smd_bio tags in it, is used on the site or not, doesn’t make any difference. Turning smd_bio off and everything switches back to normal with around 15 requests per form page. Turning it on and it raises to 95.
Browsing the source of a form page and I notice that you are calling images for authors etc…
Question is why does it fire around 80 post requests each time a form page is called… That’s huge ! And gives quite some job for Appache as well…


_
_I plant seeds for future visions. Farmer of your eyes. Subliminal engineer of your minds. eion founder__

Hablablow + Webdesignofficina

Offline

Board footer

Powered by FluxBB