Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#181 2011-12-16 17:03:41

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: smd_bio : store additional biographical info about your users

Yes, it is possible to style the elements playing with classes and HTML elements sorrounding the plugin tags, but it’s a pity can’t do that job without tricks.

Anyway I understand it is not your main goal rightnow with this plugin. Many thanks for your efforts, Bloke, this plugin is awesome!

Last edited by milosevic (2011-12-16 17:04:06)


<txp:rocks/>

Offline

#182 2011-12-16 17:09:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,795
Website GitHub

Re: smd_bio : store additional biographical info about your users

milosevic wrote:

it’s a pity can’t do that job without tricks.

Not sure I follow. You have to surround your <txp:smd_bio_data /> tags with <txp:smd_bio_info> anyway (and optionally an smd_bio_author) so adding a breakclass to the info tag so that each bio_data item inside gets a fixed class, is hardly a ‘trick’ :-)

(at least I hope that’s how it works — it might not as I’ve not tried it!)

What am I missing?

Last edited by Bloke (2011-12-16 17:09:54)


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

#183 2011-12-16 17:17:15

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: smd_bio : store additional biographical info about your users

Bloke dijo:

What am I missing?

Nothing, nothing. I will play more the way you suggest. Think I’m not explaining myself correctly (sorry for my terrible english!). Thanks again, Bloke.


<txp:rocks/>

Offline

#184 2012-01-29 04:26:24

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 204
Website

Re: smd_bio : store additional biographical info about your users

Hi! I try to show all info about an Author in a page called “Profile”, but I can’t make it work. I just can see it working in an Individual Article, but not in Author page. Any ideas?

Thank you!

Offline

#185 2012-01-29 13:28:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,795
Website GitHub

Re: smd_bio : store additional biographical info about your users

robhert wrote:

Hi! I try to show all info about an Author in a page called “Profile”

What tag code do you have so far? Remember that on an individual article page, the author is automatically set for you but on list pages you need to wrap your <txp:smd_bio_info> tags with <txp:smd_bio_author>.

If you don’t specify an author (and leave the auto_detect attribute at its default) then that tag tries to figure out the author using a best guess. If you’re on an individual article page it uses the article’s author. If you’re on a /author/Some-author list page it uses ‘Some-author’. If you’re in a file_download_list container it uses the author (a.k.a. uploader) of the current file, and so on.


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

#186 2012-01-29 13:45:14

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 204
Website

Re: smd_bio : store additional biographical info about your users

Thank you Bloke!

This is my code:

<txp:smd_bio_author> <txp:smd_bio_info debug="1" items="photo" label=""> <txp:image id="{smd_bio_photo}" /> </txp:smd_bio_info> </txp:smd_bio_author>

But this give me this error: Error tag <txp:smd_bio_author> -> Textpattern Warning: tag does not exist on line 1202

I’m using on /autor/Author-name/ (my installation is in Spanish)

Now, I try out this:

<txp:article limit="1"> <txp:smd_bio_info debug="1" items="photo" label=""> <txp:image id="{smd_bio_photo}" /> </txp:smd_bio_info> </txp:article>

And seems to work well… any idea?

Offline

#187 2012-01-29 13:47:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,795
Website GitHub

Re: smd_bio : store additional biographical info about your users

robhert wrote:

<txp:smd_bio_author> -> Textpattern Warning: tag does not exist on line 1202

You’re using the beta right? The smd_bio_author tag is a new tag in the next version that still has one (minor, non-essential, but annoying when you spot it) bug left for me to iron out before I can release it.


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

#188 2012-02-13 04:51:19

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_bio : store additional biographical info about your users

Stef —

Random question because the answer does not seem obvious to me. Or maybe there isn’t one. In brief: I’m pulling a list of authors out of context of any article, so in effect just listing bios on the page. Filtering by author name and permission group works fine. But do I have the capacity to SORT the results?

My abbreviated code:

 <txp:smd_bio_author author="SMD_PRIVS:5">
 <txp:smd_bio_info fields="RealName,bio,photo">
.. display stuff for each author ...
 </txp:smd_bio_info>
 </txp:smd_bio_author>

But looking at the tag <txp:smd_bio_author />, I’m wondering if there’s some sort of “sort” option where I can control how authors are displayed, such as by one of the fields I created using smd_bio. Thoughts?


Kevin
(graphicpush)

Offline

#189 2012-02-13 18:09:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,795
Website GitHub

Re: smd_bio : store additional biographical info about your users

kevinpotts wrote:

But do I have the capacity to SORT the results?

Spookily enough I added the ability to sort that tag the other day because I spotted its glaring omission when I came to use it on a project. I just forgot to upload it. Please download the beta again and try again. You can sort by name, realname (default), email, group (aka priv), id, or last_access.


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

#190 2012-02-13 19:32:16

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_bio : store additional biographical info about your users

Do you envision adding the ability to sort results based on custom smd_bio fields?


Kevin
(graphicpush)

Offline

#191 2012-02-14 11:55:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,795
Website GitHub

Re: smd_bio : store additional biographical info about your users

kevinpotts wrote:

Do you envision adding the ability to sort results based on custom smd_bio fields?

Oh go on then.


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

#192 2012-02-14 19:54:34

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_bio : store additional biographical info about your users

Interesting. So I have two custom fields: “order” and “title”. The former is a dropdown of numbers to explicitly set a sort order of authors, the second is simply a text field for their title within the organization.

When I set to order (the dropdown list), it fails with a SQL error:

<txp:smd_bio_author author="SMD_PRIVS:3:5" sort="order asc">
... stuff ...
 </txp:smd_bio_author>

When I set to sort via title (a plain text field), it functions fine:

<txp:smd_bio_author author="SMD_PRIVS:3:5" sort="title asc">
... stuff ...
 </txp:smd_bio_author>

Thoughts?


Kevin
(graphicpush)

Offline

Board footer

Powered by FluxBB