Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#316 2016-08-03 15:47:44
Re: smd_bio : store additional biographical info about your users
Done and done!
Offline
#317 2016-08-19 14:18:10
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
Re: smd_bio : store additional biographical info about your users
Master Sifu, critical bug!
Offline
#319 2016-09-05 22:14:02
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.
Hire Txp Builders – finely-crafted code, design and Txp
Online
#320 2016-09-06 14:18:27
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
#321 2017-02-07 14:33:38
Re: smd_bio : store additional biographical info about your users
smd_bio 0.41
Textpattern v4.6.2
Getting the following errors:
Tag error: <txp:smd_bio_info fields="image" label="" wraptag="div" class="photoblog_profile"> -> Textpattern Notice: unregistered_tag while parsing form single_bottom on page archive
Tag error: <txp:smd_bio_articles limit="4" wraptag="div" class="profile" break="br" section="reports"> -> Textpattern Notice: unregistered_tag while parsing form single_bottom on page archive
a) Do I need to fix that with this code?
b) Or can I just add the following above all the code of the plugin?
if (class_exists('\Textpattern\Tag\Registry')) {
Txp::get('\Textpattern\Tag\Registry')
->register('smd_bio_info')
->register('smd_bio_articles')
;
}
c) Or do you have a newer version of smd_bio?
Last edited by Kjeld (2017-02-07 16:27:19)
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline
#322 2017-02-07 15:22:30
Re: smd_bio : store additional biographical info about your users
Kjeld wrote #303872:
Can I still fix that
Yes, but it’s only a warning, so not important. I do have a newer version but it isn’t quite complete: checkbox sets don’t look very nice in the bio page. I asked Phil about a design pattern for it ages ago and forgot to follow up.
I’ve released it today as a beta so you can at least use it. As far as I can tell, the only bug is the slightly ugly checkbox sets. And the image widget needs some visual love.
Last edited by Bloke (2017-02-07 15:28:20)
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
Online
#323 2017-02-07 16:28:26
Re: smd_bio : store additional biographical info about your users
Thanks, Bloke!
So, I guess I can just wait until you are done?
Last edited by Kjeld (2017-02-07 16:30:26)
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline
#324 2017-02-07 23:08:29
Re: smd_bio : store additional biographical info about your users
@ Bloke
For your checkbox sets, just follow the pattern used for input type=radio on the Preference panel.
(I never noticed, I’ve never used checkboxes…)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#325 2017-02-07 23:38:32
Re: smd_bio : store additional biographical info about your users
While I’m at it, a few small changes:
For the table on the list page, change the class of the first <th > in the <thead /> from .multi-edit to .txp-list-col-multi-edit (matching all other list panels)
On the users edit panels, small improvement to the display of the image row:
.smd_bio_image { display: inline-block; vertical-align: top}
.smd_bio_image img { vertical-align: bottom; margin: .2em .5em}
Edit: Here is a mockup (using Sandspaces theme).
Last edited by phiw13 (2017-02-08 07:57:32)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#326 2017-05-01 16:50:00
Re: smd_bio : store additional biographical info about your users
I was working on some code to display links to various social networks for each author but only the ones that were actually used. After getting it working, I noticed how repetitive it was.
So I made a bunch of links (Facebook, Twitter, Github, Google+. Pinterest, LinkedIn) and put them in a Category Social.
I call them using:
<txp:linklist category="Social" sort="linksort asc" >
<txp:smd_bio_info fields='<txp:link_name />'>
<txp:smd_if_bio field='<txp:link_name />'>
<a href="<txp:smd_bio_data field='<txp:link_name />' />">
<svg>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#<txp:link_name />"></use>
</svg>
</a>
</txp:smd_if_bio>
</txp:smd_bio_info>
</txp:linklist>
Offline
#327 2020-05-25 15:37:30
Re: smd_bio : store additional biographical info about your users
smd_bio v0.5.0 is (finally) here for Textpattern 4.7.0+.
- Use Txp 4.7.0-style language identifiers.
- Add class
txp-form-fieldto wrapping divs for all bio fields in admin (thanks, johnstephens). - Fix classnames and scope (thanks, philwareham and phiw13).
- Fix SQL errors when creating columns.
- Fix MySQL restrictions on DEFAULT column types.
- Alter default column types for most columns. Text-based columns are way too big and result in performance issues as they cannot be cached.
- Register tags.
- Layout fix for ‘More’ widgets.
- Use
getThings()instead ofsafe_field()to avoid triggering a bug (thanks, makss).
As usual, please report any issues or enhancements. Enjoy!
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
Online
#328 2020-05-25 23:08:35
Re: smd_bio : store additional biographical info about your users
Thank you, Bloke! I can’t believe I did something helpful for this plugin, though.
Offline
#329 2023-12-28 07:32:50
Re: smd_bio : store additional biographical info about your users
When installing sms_bio I get the following errors:
A problem occurred while loading the plugin: -> Warning: Trying to access array offset on value of type bool on line 1575
A problem occurred while loading the plugin: -> Warning: Trying to access array offset on value of type null on line 1575
I get the errors with both v0.5.0 and v0.5.1.
I am using Textpattern v4.8.8.
Any idea why this is happening?
• Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
• MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
• JapaneseStreets.com – Japanese street fashion (mostly txp)
Offline