Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
xkl_contacts
Yes, I renamed it, but it still uses the txp user database to generate a list of “staff members” (authors and such).
Now it uses forms for output, and if the image associated with the username has a caption, it’ll output that as well. The caption could be used as a sig or bio.
To see it in action,
with the image/caption tags included
At the bottom of the welcome page is my contact card, using the username option to call the card plugin, so in my article form, at the end I use:
(txp:xkl_contacts form=“formname” username=“user” /)
In my form “formname”, I have
(div class=“sidebar” style=“width: 300px;”)
(span style=“float: left;”)(xkl_contacts_name) – (xkl_contacts_title)(br /)
(xkl_contacts_email)(br /)(/span)
(span)(xkl_contacts_image)(/span)
(hr style=“width:300px; text-align: left;” /)
(span style=“display: table-cell; width: 300px; “)(xkl_contacts_about)(/span)
(/div)
To download it,
xkl_contacts
I’m also using it in the sidebar, under “about the staff”
simple documentation:
The tag is
(txp:xkl_contacts form=“formname” /)
or
(txp:xkl_contacts form=“formname” username=“user” /)
the form tags are:
(xkl_contacts_name) – user’s Real Name
(xkl_contacts_title) – user’s title/role
(xkl_contacts_email) – a contact link “Contact [Real Name]” with mailto link
(xkl_contacts_image) – image (pulled from db, img name = username.ext
(xkl_contacts_about) – image caption (for image from db)
note: instead of <, > I used (,).
Last edited by nimnix (2004-07-07 20:39:57)
textpattern.org :: find and share Textpattern resources
textpattern.net :: TextBook – Textpattern wiki
Offline
Re: xkl_contacts
updated again:
same download location, but added a form tag:
(xkl_contacts_count) – this gives you an index to individual cards in the list. 1,2,3,etc.
If you want to do odd/even styles or lists with formatted numbers, this is handy.
On the sidebar of my site, I’ve done odd/even formatting for the “about the staff” list.
The plugin has documentation with it.
I’ve written some articles that show actual code and css I’m using:
How I’m using the plugin – code
Last edited by nimnix (2004-07-10 00:46:54)
textpattern.org :: find and share Textpattern resources
textpattern.net :: TextBook – Textpattern wiki
Offline
Re: xkl_contacts
To pass txp tags into my plugin I had to do a little work… The code I used is
<:?php
$cardatts=array(“rname”=>”<:txp:author />”,“form”=>“biz_cards”);
echo xkl_contacts($cardatts);
?>
Where cardatts is the array of attributes the plugin takes, and xkl_contacts is my plugin name.
My plugin uses the attributes rname and form.
Standard usage for my plugin is:
<:txp:xkl_contacts rname=“authorname” form=“form plugin uses” />
To do this, you need to know three things: the plugin name, the parameters, how it takes those parameters.
In this case, the code takes the author name passed by <:txp:author /> and returns that author’s card.
Note – extra : in the txp tag and opening php tag so that it displays
Last edited by nimnix (2004-07-16 00:44:49)
textpattern.org :: find and share Textpattern resources
textpattern.net :: TextBook – Textpattern wiki
Offline
#4 2005-09-03 18:39:02
- ketchxup
- New Member
- Registered: 2005-09-02
- Posts: 8
Re: xkl_contacts
look what i get :
<code> Undefined variable: title</code>
Offline
Re: xkl_contacts
Can you be more specific? How are you trying to use it?
textpattern.org :: find and share Textpattern resources
textpattern.net :: TextBook – Textpattern wiki
Offline
Re: xkl_contacts
Are there any plans to make this section specific? I would like to use it to produce individual bios in each section (each artist has a section), and then a full list of authors in another area?
Matthew
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
Pages: 1