Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#205 2012-05-29 13:47:21

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: smd_bio : store additional biographical info about your users

Another question:

When using <txp:smd_bio_data> and widget setting on front-end, my textareas don’t have any size attributes? Textarea size settings work in the backend user manager . I use beta 0.40 with mem_form.

Offline

#206 2012-05-29 15:42:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: smd_bio : store additional biographical info about your users

Teemu wrote:

Any possibility to get this to support special characters?

Ooops, I forgot to set the table collation properly. Try the latest beta which will upgrade the tables to UTF-8 when you next visit the Bio config panel. Should also fix the textarea sizes for you.

Please let me know how you get on. I’m planning to release this version later today.

Last edited by Bloke (2012-05-29 15:43:38)


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

#207 2012-05-30 02:42:43

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: smd_bio : store additional biographical info about your users

New beta works great. I uninstalled the old plugin and then installed the new one, which seems to clear the smd_bio tables, but won’t drop them though. Fortunately I had only test data in.

Another question…

When displaying data from textarea with <txp:smd_bio_data> value attribute, would it be possible to keep line breaks as it shows inside the textarea?

Last edited by Teemu (2012-05-30 04:22:25)

Offline

#208 2012-05-30 03:09:56

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: smd_bio : store additional biographical info about your users

I just plugged in the beta download to take it for a spin, and I have some warnings that are persistent in all production status modes when I access the extensions tab. Nothing special about the environment I’m running it in.

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘.COLUMNS where table_name = ‘mobilesmd_bio_meta’ AND table_schema = ‘textpattern’ at line 1 select COLLATION_NAME from mobileINFORMATION_SCHEMA.COLUMNS as INFORMATION_SCHEMA.COLUMNS where table_name = ‘mobilesmd_bio_meta’ AND table_schema = ‘textpattern’ AND column_name = ‘title’ in /Applications/MAMP/htdocs/mobile/textpattern/lib/txplib_db.php on line 89

Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘.COLUMNS where table_name = ‘mobilesmd_bio’ AND table_schema = ‘textpattern’ AND’ at line 1 select COLLATION_NAME from mobileINFORMATION_SCHEMA.COLUMNS as INFORMATION_SCHEMA.COLUMNS where table_name = ‘mobilesmd_bio’ AND table_schema = ‘textpattern’ AND column_name = ‘user_ref’ in /Applications/MAMP/htdocs/mobile/textpattern/lib/txplib_db.php on line 89

Textpattern version: 4.4.1 (r3575)
Last update: 2012-05-13 01:19:59/2011-06-18 05:17:14
Document root: /Applications/MAMP/htdocs
$path_to_site: /Applications/MAMP/htdocs/mobile
Textpattern path: /Applications/MAMP/htdocs/mobile/textpattern
Permanent link mode: section_id_title
upload_tmp_dir: /Applications/MAMP/tmp/php
Temporary directory path: /Applications/MAMP/htdocs/mobile/textpattern/tmp
Site URL: localhost:8888/mobile
PHP version: 5.3.6
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: America/Denver
Server local time: 2012-05-29 20:55:46
DST enabled?: 0
Automatically adjust DST setting?: 0
Time zone: (+64800)
MySQL: 5.5.9
Locale: en_GB.UTF-8
Server: Apache
Apache version: Apache
PHP server API: apache2handler
RFC 2616 headers:
Server OS: Darwin 10.8.0
Active plugins: smd_bio-0.40
Admin-side theme: classic 4.4.1

Pre-flight check:
————————————
/Applications/MAMP/htdocs/mobile/textpattern/setup/ still exists
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

————————————

Offline

#209 2012-05-30 08:29:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: smd_bio : store additional biographical info about your users

Teemu wrote:

New beta works great. I uninstalled the old plugin and then installed the new one, which seems to clear the smd_bio tables

It’s suposed to do both. Best upgrade path is simply to reinstall the new one so data is preserved. I’ll have to look into why it’s not dropping the tables on deletion.

When displaying data from textarea with <txp:smd_bio_data> value attribute, would it be possible to keep line breaks as it shows inside the textarea?

Ah, didn’t test that bit. Of course it should. I’ll fix that for you today, with luck.

rsilletti wrote:

…INFORMATION_SCHEMA.COLUMNS…

For some reason on some servers, this pops up. Since I run the upgrade check on every visit to the Bio config panel you’ll see it every time. I normally silence the warnings with PHP’s @ before the call but forgot this time. Will fix.

Out of curiosity, did your tables get upgraded to utf8-general-ci, or are they still latin? I have never worked out if this warning means the table alteration fails or succeeds.


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

#210 2012-05-30 11:00:30

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: smd_bio : store additional biographical info about your users

Tables are currently set to utf8-general-ci.

Offline

#211 2012-06-01 10:08:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: smd_bio : store additional biographical info about your users

Please try the latest beta version which fixes the newline issue in textarea value fields, and I’ve also found another way to check the collation which is not only less prone to errors, it saves a query too. Result!

Feedback gratefully appreciated as ever, please.


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

#212 2012-06-01 10:33:19

Teemu
Member
From: Shanghai
Registered: 2010-04-27
Posts: 60

Re: smd_bio : store additional biographical info about your users

I can confirm newline issue in textarea value fields is fixed. Thanks again Stef!

Offline

#213 2012-06-03 03:52:34

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: smd_bio : store additional biographical info about your users

All looks well on the update.

Offline

#214 2012-07-31 13:37:48

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Re: smd_bio : store additional biographical info about your users

Hi!
I have read the Parsing_Tag_Attributes on text boot and also the comment of johnstephens and Bloke but my code don’t work. It output nothing!

<txp:smd_bio_info author='<txp:comment_name />' items="sign" debug="1">{smd_bio_sign}</txp:smd_bio_info>

Obviusly, in a comments form and all comments users are registred.

Oooo!!! I’m stupid!!! <txp:comment_name /> it’s a link!!!!!

<txp:smd_bio_info author='<txp:comment_name lnk="0" />' items="sign" debug="1">{smd_bio_sign}</txp:smd_bio_info>

Now it’s work!

Last edited by MarcoK (2012-07-31 13:59:20)

Offline

#215 2012-08-26 10:41:06

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: smd_bio : store additional biographical info about your users

Has anyone figure out a way to post data from mem_self_register straight into a smd_bio field?

I’m finally biting the bullet and converting my customised table of user data over to smd_bio – it seems to make sense as all of the work has been done for me (thanks Stef!).

The only problem I have is that I want to be able to enter a surname on the registration form. I’m using jQuery to create a username that is the firstname plus the first character of the surname. Of course, all of this works but the surname is now lost – someone has to go back in and re-enter it. Ideally, this could all be done in a single step, but I’m not good enough to figure out how to modify a plugin to post to two different tables.

Thanks for any ideas.

Offline

#216 2012-09-06 22:49:53

cabes
Member
Registered: 2008-01-01
Posts: 28

Re: smd_bio : store additional biographical info about your users

Hello! I want to have a couple specific authors report to another author, and I want the head author to be able to login using cbe_frontauth and see the information about the authors that are under them. I have all the login working and got it working to show just their articles, but cant seem to wrap my mind around how to get this to work. I have a field in smd user manager that called “reportto” where I enter the username of the author that they report to. This is what I have, but I think the logic must be wrong because it seems like I should define this in the bio_author field and not need the if_bio:

<txp:smd_bio_author author=“SMD_ALL”>

<txp:smd_if_bio field=“reportto” value=”<txp:cbe_frontauth_whois />”>

<txp:smd_bio_info fields=“name, RealName, department” labeltag=“dt” wraptag=“dl” break=“dd” />

</txp:smd_if_bio>

</txp:smd_bio_author>

I would greatly appreciate any help to solve this!
Thanks,
Caleb

Offline

Board footer

Powered by FluxBB