step-by-step developing a component to display a short bio on every member's profile page as suggested by Dominik here:
i-need-help-with-implementing-a-feature
Step 1 (1.0dev1) provides just a basic skeleton to get that bio box in place - no bio data yet
Step 2 (1.0dev2) comes included with an almost complete shortbio-box.php
plus shortbio.input.php
allowing to enter some bio text. The necessary CSS to style the box has been added as default-css.php
Step 3 (1.0dev3) comes included with the necessary action
to save and update short bios
Step 4 (2.0) shows an alternate way of entering the short bio text: the input form is part of the account-settings page now and has been removed from the timeline. This version is stripped from any custom CSS and this way working flawlessly with all currently available themes (White theme's darkmode included). And If you get bored by viewing your own short bio again and again you may uncheck the checkbox below the input. This way it gets hidden from your own view but remains visible to other members.
figure 1 showing the shortbio editor on the account-settings page (release 2.x)
figure 2 showing the visitors view of that shortbio (release 2.x)
figure 3 showing the view of my own shortbio-box (release 1.x)
figure 4 same bio viewed by a different member (release 1.x)
Correct.
And yes, I intentionally used the PHP error_log
function to get an idea of what comes included with a member's record. And if we open our Ossn database with PHPMyAdmin and compare this logged member's record to the ossn_users
table we notice that it includes a lot more elements than the table can store!
Then, where else are these extra elements get stored instead? The answer will be found in the beginning of classes/OssnUser
: It's an extension of classes/OssnEntities
. So if we have a look into the ossn_entities
table we can in fact find all these extra member attributes like birthdate, gender, stored here.
Just the extra attribut ShortBio
seems to be missing in your ossn_entities table
. Thus your next task will be:
Locate the file and line-number where ShortBio
gets saved.
errorlog('shortbio-input $params ' . ossndump($params));
in file
ShortBio/plugins/default/forms/ShortBio/shortbio-input.php
Really?
Then, can you try to locate the file name and line number of the logging code and provide it please?
hello, I tested newest release on a complete clean install with paid OSSN but bio is not saved, instead the whole user informations are stored in logfile
[09-Dec-2024 21:15:46 UTC] shortbio-input $params <pre>Array (
[user] => OssnUser Object
(
[guid] => 1
[type] => admin
[username] => MrCrossii
[email] => XXX
[password] => XXX
[salt] => XXX
[firstname] => Dom
[lastname] => Lieger
[lastlogin] => 1733778734
[lastactivity] => 1733778946
[activation] =>
[timecreated] => 1724939451
[fullname] => Dom Lieger
[birthdate] => 04/01/1985
[gender] => male
[passwordalgorithm] => bcrypt
[cover_time] => 1724939545
[language] => en
[data] => stdClass Object
(
)[cover_guid] => 0 [iconURLS] => stdClass Object ( [topbar] => https://XXX.de/clean/avatar/MrCrossii/topbar/eb5e6c9b5ca00aa3161aae39605d8378.jpeg?ossn_cache=13b35b4e [small] => https://XXX.de/clean/avatar/MrCrossii/small/d9263a91f1afd55f9d4854055df01885.jpeg?ossn_cache=13b35b4e [smaller] => https://XXX.de/clean/avatar/MrCrossii/smaller/9fdfcf68b128d6cb4b8ca260111b383d.jpeg?ossn_cache=13b35b4e [large] => https://XXX.de/clean/avatar/MrCrossii/large/6e149ee5056fa24f68239f161db5db58.jpeg?ossn_cache=13b35b4e [larger] => https://XXX.de/clean/avatar/MrCrossii/larger/1b2b8692065bc7f2bbc407e7fd1c3613.jpeg?ossn_cache=13b35b4e ) [icon_guid] => [icon_time] => [database] => PDO Object ( ) [exe] => PDOStatement Object ( [queryString] => SELECT DISTINCT u.guid, u.* FROM ossn_users as u JOIN ossn_relationships AS r1 ON r1.relation_to =
u.guid AND r1.type = "friend:request" JOIN ossnrelationships AS r2 ON
r2.relationfrom = r1.relationto AND r2.type = "friend:request"
WHERE(u.timecreated IS NOT NULL AND (r1.relationfrom = '1' AND
r2.relationto = '1')) ORDER by u.guid ASC LIMIT 9;
))
) </pre>