Textpattern CMS support forum

You are not logged in. Register | Login | Help

#321 2017-02-07 14:33:38

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

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)


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#322 2017-02-07 15:22:30

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

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#323 2017-02-07 16:28:26

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 253
Website

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)


JapaneseStreets.com – Japanese street fashion (mostly txp)
Old Photos of Japan – Japan between 1860 and 1940 (100% txp)
MeijiShowa – Stock photos of Japan between 1860 and 1940 (100% txp)

Offline

#324 2017-02-07 23:08:29

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,753
Website

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…)

Offline

#325 2017-02-07 23:38:32

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,753
Website

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)

Offline

#326 2017-05-01 16:50:00

michaelkpate
Moderator
From: Avon Park, FL
Registered: 2004-02-24
Posts: 1,214
Website

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

Board footer

Powered by FluxBB