Textpattern CMS support forum

You are not logged in. Register | Login | Help

#311 2016-07-04 10:07:34

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,339
Website

Re: smd_bio : store additional biographical info about your users

Okay, I’ll standby.

Offline

#312 2016-07-04 18:57:07

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,339
Website

Re: smd_bio : store additional biographical info about your users

Bloke,

A couple of observed behaviors:

First, if I comment out the Rewrite rules in .htaccess, and change the URL structure being passed from the bio list from this…

<a href="<txp:site_url />author/<txp:smd_wrap_all transform="case|lower, replace|| |-"><txp:smd_bio_data field="RealName" /></txp:smd_wrap_all>">

To this…

<a href="<txp:site_url />author/<txp:smd_bio_data field="RealName" />">

Then I get a profile output, except for the author’s list of published articles, which is supposed to be handled by this part of the article output form…

<h2>Articles written</h2>
<txp:smd_bio_articles wraptag="ul" break="li" author='<txp:smd_bio_data field="RealName" />' section="articles"><txp:permlink><txp:title /></txp:permlink></txp:smd_bio_articles>

(I get the header, but not the list of article titles.)

Second, in my bio output form we have this in the opening smd_bio_author tag: <txp:smd_bio_author author='<txp:author title="0" />'>. I.e. it’s expecting title="0", author username, not RealName, which is not what we were passing.

But here’s the new part, If I switch that to title="1", accounting for RealName, then the author’s articles output, which I wasn’t getting before, but not any of the rest of the bio (no bio text, no photo, no links, etc). The exact opposite of the above.

I still have the ReWrite rules commented out at this point, but that’s at least a new observation so far. Hope it kindles some insight.

Offline

#313 2016-08-02 19:58:32

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 989
Website

Re: smd_bio : store additional biographical info about your users

Hey, Stef!

I’m scoping out the new Textpattern 4.6 beta 2, and making sure everything will work on a client site before upgrading it on the public server. Woo hoo!

Checking out my user bios in the editor, I see that the smd_bio fields no longer line up well layout-wise with Phil’s new design. This isn’t a catastrophe, but it will throw off at least one of my change-averse team members.

In principle, I should be able to figure out the layout revisions and edit the plugin. If so, would you welcome a pull request to update the plugin to play nice with the new admin theme design?

Offline

#314 2016-08-03 12:04:44

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,969
Website

Re: smd_bio : store additional biographical info about your users

johnstephens wrote #300473:

would you welcome a pull request to update the plugin to play nice with the new admin theme design?

Absolutely! Please check out the github repo first though in case I’ve fixed bits of it already. Can’t remember how far I got, sorry.


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

#315 2016-08-03 15:24:45

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 989
Website

Re: smd_bio : store additional biographical info about your users

The fix is simple, just need to add a class to the markup. I’ll pore over the plugin and figure out where.

Offline

#316 2016-08-03 15:47:44

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 989
Website

Re: smd_bio : store additional biographical info about your users

Done and done!

Offline

#317 2016-08-19 14:18:10

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,339
Website

Re: smd_bio : store additional biographical info about your users

Stef,

Nothing has changed on my status since last report, but I’ve decided to modify my bio config and output a bit before wasting more time on it, mainly because the URL redirecting under the circumstances is too bizarre to get right.

So instead of using RealName for URL and display, I want to try creating two new fields for “First Name” and “Last Name” to build URLs like:

../author/destry-wion

For example:

<p>
<txp:smd_bio_info fields="fname, lname">
  <a href="/author/<txp:smd_bio_data field="fname" />-<txp:smd_bio_data field="lname" />">
  <txp:smd_bio_data field="fname" /> <txp:smd_bio_data field="lname" /></a>
</txp:smd_bio_info>
</p>

That way all new profile URLs are only different by the /author/ part of the path, which I’m hoping will make it easier to redirect URLs from ../people/first-last to ../author/first-last, instead of trying to wrangle ModRewrite rules that go from this…

../people/destry-wion

to this…

../author/Destry Wion (i.e. RealName)

to this…

../author/destry-wion

Does that make any sense? Doable?

If so, the only problem I’m having at this point is being able to create the new First Name and Last Name fields. smd_bio doesn’t seem to let me do it. I can delete fields (I did one), but I can’t create any without getting an error.

Do you have an update of the plugin available?

Offline

#318 2016-09-05 15:27:35

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,339
Website

Re: smd_bio : store additional biographical info about your users

Master Sifu, critical bug!

Offline

#319 2016-09-05 22:14:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,969
Website

Re: smd_bio : store additional biographical info about your users

Destry wrote #301062:

Master Sifu, critical bug!

Critical bug fixed on GitHub the other day, forgot to update this thread. If you need a compiled version, just yell. If not, by all means grab the .php file there and chuck it at ied_plugin_composer and let me know how it goes.


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

#320 2016-09-06 14:18:27

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,339
Website

Re: smd_bio : store additional biographical info about your users

Plugin is working. I can now edit fields in bio_config handily. Thank you.

Offline

Board footer

Powered by FluxBB