Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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: 12,446
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.

Hire 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

#97 2011-01-19 16:35:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: smd_bio : store additional biographical info about your users

hablablow wrote:

why does it fire around 80 post requests each time a form page is called

Ah. It’s because v0.30 is broken and I fixed it about 6 months ago and forgot to release it. Ooops. Hang on a sec and I’ll bundle the new one up on my site. Give me ten minutes or so.


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#98 2011-01-19 16:37:45

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

Re: smd_bio : store additional biographical info about your users

No problem thanks ! :)

What was it ? Firing JavaScript in the wrong place ?

Did you change something else in that new version ?

Last edited by hablablow (2011-01-19 16:38:53)


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

Hablablow + Webdesignofficina

Offline

#99 2011-01-19 16:43:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,446
Website GitHub

Re: smd_bio : store additional biographical info about your users

New maintenance release v0.31 fixes the abnormal load that smd_bio puts on your admin-side pages. No other new features. Just took me six months to remember to release it, d’oh!

hablablow wrote:

What was it ? Firing JavaScript in the wrong place ?

Firing javascript in every place!

Last edited by Bloke (2011-01-19 16:43:24)


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

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#100 2011-01-19 16:45:37

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

Re: smd_bio : store additional biographical info about your users

Oh Mamma !

Glad you solved it !

Kthx !


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

Hablablow + Webdesignofficina

Offline

#101 2011-02-10 20:51:52

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

Re: smd_bio : store additional biographical info about your users

Stef

Can I pick your brain?

I’m experimenting with a sort of “proof of concept” adaption of Txp for membership.

I started out thinking I could use smd_bio, but found the backend didn’t look flexible enough to create the user interface I wanted. In particular, the user tab isn’t as easily customizable as the article tab, and it lacks plugins that work with the article basis.

If I use the article tab, then bot_wtc, bot_image_upload, smd_tags, and soo_multidoc look like they will be useful in achieving the look/layout/ui I want. glz_custom_fields works at creating most of the fields I want. The problem is the output — glz_custom fields only has two tags. Excellent for creating membership reports, but limited. txp:custom_fields are pretty bare bones.

smd_bio shines with its tags.

So I’m sitting here thinking how I can get the best of both worlds . . . . .

I’ve had at least a 1/2 dozen hairball ideas, so to keep it simple, I’ll start with one:

smd_bio creating custom fields on the article tab, and being able to play with the other plugins I mentioned seems like the the most probably solution. Would that take a total/major rewrite?

Thanks

Mike

Offline

#102 2011-02-13 16:08:53

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

Re: smd_bio : store additional biographical info about your users

Alright I’m back Stef with a couple of questions, trying to implement smd_bio fields within the jmd_dashboard so that a user can change, update his bio informations from this tab. As you suggested here

In the jmd_dashboard form adding this:

<txp:mem_simple_form table="smd_bio" id_field="country">
<txp:mem_form_text name="country" required="1" label="Country" break="" />
<txp:mem_form_submit />
</txp:mem_simple_form>

Will either fire a SQL error or do nothing…

As you seem to have implemented it yourself any advices on how you achieved it is very welcome for me…

Headache.

Thanks !


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

Hablablow + Webdesignofficina

Offline

#103 2011-02-13 18:10:44

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

Re: smd_bio : store additional biographical info about your users

Alright wrong syntax:

<txp:mem_simple_form table="smd_bio">
<txp:mem_form_text name="table_country" label="Country" break="" />
<txp:mem_form_submit />
</txp:mem_simple_form>

Is behaving the correct way. Except it ads an entry to another row in my table and not to the currently logged user !

Any clues ?


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

Hablablow + Webdesignofficina

Offline

#104 2011-02-14 20:00:11

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

Re: smd_bio : store additional biographical info about your users

Stef,

Jakob solved the issue related to the way I was crafting the mem_form, here.
This updates the correct fileds for smd_bio in my table:

<txp:mem_simple_form table="smd_bio" id_field="user_ref" id_insert="0">
<txp:mem_form_text name="table_country" label="Country" break="" />
<txp:mem_form_secret name="int_user_ref" value="{userA}" />
<txp:mem_form_submit />
</txp:mem_simple_form>

But it also updates information for userB, for all users in fact … Is this related to the way smd_bio works ?

Thanks !

Last edited by hablablow (2011-02-14 20:00:38)


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

Hablablow + Webdesignofficina

Offline

#105 2011-02-26 01:49:24

skrishi
Member
From: russia federation
Registered: 2011-02-25
Posts: 52
Website

Re: smd_bio : store additional biographical info about your users

Hi, thanks for the plug-in.
But I have a problem. Instead of Russian letters (Cyrillic) appears ????? (question mark).
In other cases, when I write such articles, all is well.

Last edited by skrishi (2011-02-26 01:50:40)

Offline

Board footer

Powered by FluxBB