Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#133 2011-07-11 12:00:03

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

Re: smd_bio : store additional biographical info about your users

stephan wrote:

Obviously you noticed ;-)

Should have mentioned I’m The Terminator.

Are you Sarah Connor? :-p

I shall happily wait for the officla v.0.40 release :)

Well, the beta v0.40 that’s available is what I anticipate the final version being. Nobody’s given me any negative feedback yet so I think it’s good enough to release as it is.


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

#134 2011-07-11 12:08:55

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: smd_bio : store additional biographical info about your users

Bloke wrote:

Are you Sarah Connor? :-p

Now that leads to an awkward place… ;-)

Well, the beta v0.40 that’s available is what I anticipate the final version being. Nobody’s given me any negative feedback yet so I think it’s good enough to release as it is.

Sounds good. Are you planning on gift wrapping this and putting in on http://stefdawson.com/ anytime soon?


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#135 2011-07-11 12:11:59

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

Re: smd_bio : store additional biographical info about your users

stephan wrote:

Are you planning on gift wrapping this and putting in on http://stefdawson.com/ anytime soon?

Try my beta page. That goes for anybody else wishing to try it out. Please let me know anything you find out, good or bad.


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

#136 2011-07-13 19:12:40

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: smd_bio : store additional biographical info about your users

It seems that if I add an image type field to my user and do not assign an image that this code will not return null or an empty string (as I had hoped) but it returns the placeholder:

<txp:smd_bio_info fields="author_image" label="">
IMAGE: {smd_bio_author_image}
</txp:smd_bio_info>

Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#137 2011-07-13 19:21:09

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

Re: smd_bio : store additional biographical info about your users

stephan wrote:

It seems that if I add an image type field to my user and do not assign an image that this code will not return null or an empty string (as I had hoped) but it returns the placeholder:

Not sure why that one would show output — it’s supposed to keep quiet if it’s missing. I’ll look into it. For now, does the following code fix it, using the new <txp:smd_if_bio> tag?

<txp:smd_bio_info fields="author_image" label="">
   <txp:smd_if_bio field="author_image">
      IMAGE: {smd_bio_author_image}
   </txp:smd_if_bio>
</txp:smd_bio_info>

EDIT: get conditional statements in the right order.

Last edited by Bloke (2011-07-13 19:21:35)


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

#138 2011-07-13 19:33:29

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: smd_bio : store additional biographical info about your users

Nice try, no luck, though:

Tag error: <txp:smd_if_bio field="author_image"> ->  Warning: array_merge(): Argument #1 is not an array  on line 1540
textpattern/lib/txplib_misc.php(653) : eval()'d code:1540 array_merge()
textpattern/publish.php:1188 smd_if_bio()
textpattern/publish.php:1113 processTags()
textpattern/publish/taghandlers.php:3959 parse()
textpattern/publish.php:1188 if_plugin()
textpattern/publish.php:1113 processTags()
textpattern/lib/txplib_misc.php:1706 parse()
textpattern/publish/taghandlers.php:314 parse_form()
textpattern/publish.php:1188 output_form()
textpattern/publish.php:1100 processTags()

Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#139 2011-07-14 09:31:45

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: smd_bio : store additional biographical info about your users

One more thing. I noticed that when having a lot of images it gets very tedious to use the drop down list. Could you maybe add an option so that for the type image you can specify a category which can be used to select an image for smd_bio? If it can be set optionally it could greatly improve the management of several user’s images.


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#140 2011-07-14 13:36:46

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

Re: smd_bio : store additional biographical info about your users

stephan wrote:

Could you maybe add an option so that for the type image you can specify a category

Uhhh, from the help:

Value: … for images, it can be used to specify the parent category name under which the desired images are stored. If omitted, all images are available in the image select list

Is that not what you mean?

btw, I’ll look into the error message you cited, hopefully later today.

Last edited by Bloke (2011-07-14 13:37:21)


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

#141 2011-07-14 14:03:16

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: smd_bio : store additional biographical info about your users

Others have cryptonite as a weakness, mine seems to be literacy, I fear. Thanks for pointing in the right direction, this is exactly what I was looking for.


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#142 2011-07-14 15:45:35

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

Re: smd_bio : store additional biographical info about your users

stephan wrote:

Others have cryptonite as a weakness, mine seems to be literacy, I fear

:-) No worries, I do hide things in the docs sometimes.

Regarding the error message, can I just ask: do you only have one extra bio field defined in your theme (i.e. the author_image)? That might account for the warning message and the fact the plugin is falling over. If that is the case I’ll make sure I defend against that eventuality in the code.

Last edited by Bloke (2011-07-14 15:46:14)


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

#143 2011-07-14 16:44:03

stephan
Plugin Author
From: Bochum, Germany
Registered: 2004-07-26
Posts: 196
Website

Re: smd_bio : store additional biographical info about your users

I got two fields: author_bio (textarea) and author_image (image).


Yoko for Textpattern – A free blog themeMinimum Theme – If all you want to do is write.
Note: I am currently not actively using Textpattern, so I am not in the forums very often

Offline

#144 2011-07-14 16:44:32

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

Re: smd_bio : store additional biographical info about your users

Actually, no worries. I’ve just fixed the plugin to get rid of the warning. Try re-downloading the beta and try again.

Sorry for the bug, and thanks for bringing it up.


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

Board footer

Powered by FluxBB