I have put a link to a php program on the menu using Menu Builder. In that program how do I get the person's username?
Sorry Ronald,
but that's beyond my capabilities.
Why don't you have a look into Ossn documentation pages like 'How to write a simple component' and/or investigate components with a similar functionality - as
https://www.opensource-socialnetwork.org/component/view/3752/custom-site-pages
for example?
No, I don't want to pass the username using GET. I wanted to write a component, I just didn't know it. LOL. Can you direct me to a "How to write an OSSN Component for Dummies" tutorial?
I'm sorry, Ronald, got you wrong.
You wanted to create a link like
https://somesite.com?user=ronald
to be retrieved by somesite.com via $_GET['user']
So, that would mean to make the Menubuilder accept a variable link like
<?php echo 'https://somesite.com?user=' . ossn_loggedin_user()->username; ?>
and I don't see any chance that this will ever happen because the Menubuilder would open a wide door for hackers this way ...
So the right solution is to develop a component implementing the code above, and using the menubuilder for a normal hardlink pointing to your component's page.
yes, the I need to get the username of the currently logged on user. Thanks for your answer but it doesn't help much since i have no idea how to call ossnloggedinuser()->username. I assume that I have to load a library. Where do I find the library and how do I load it? Is there documentation somewhere that tells me how to do this?
Which username? The name of the currently logged in user?
If so you can use the returned value calling ossn_loggedin_user()->username
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)