Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,474
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)


Where is that emoji for a solar powered submarine when you need it ?

Offline

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

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

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

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

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-field to 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 of safe_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.

Txp Builders – finely-crafted code, design and Txp

Offline

#328 2020-05-25 23:08:35

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

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

Board footer

Powered by FluxBB