Eighteen Male Download 1.0dev4

German Michael Zülsdorff 8 months ago

Eighteen Male

Sound crazy? Yes, actually this is just a showcase for aspiring Ossn developers of how to extend the profile page to display a member's age and gender in response to Dominik's post https://www.opensource-socialnetwork.org/discussion/view/6431/can-someone-help-me-edit-the-profile-and-search-of-ossn

Okay, so: Where is the code we need to alter? The way to find it is thoroughly documented in https://www.opensource-socialnetwork.org/wiki/view/1137/how-to-find-something-a-word-pattern-in-the-source-code

This time we do a right-click->inspect on the profile page just below the member name and get something like


enter image description here


And since Dominik wants to add (18) after the class 'user-fullname' it makes sense to use this pattern for searching. On a Linux command-line you would execute a

grep -Rn 'class="user-fullname"' .

which gives

./components/OssnProfile/plugins/default/profile/pages/profile.php:77

That is: We need to edit line #77 of profile.php?

NO - remember: https://www.opensource-socialnetwork.org/wiki/view/704/should-i-modify-core-files
In fact, we can leave profile.php completely untouched and add our extras by means of the Ossn function

ossn_extend_view('file_to_extend', 'by_file_with_extensions');

And right that's where 1.0dev1 of this component starts ...

Have fun!

Comments
German Dominik L Replied 8 months ago

Need to setup a test environment, thank you

Component

Developer: Michael
License ossnv4
Type: Tools
Requires Ossn Version : 7.2
Latest Version: 1.0dev4
Last Updated 8 months ago
Repository Url View Repository

Versions