We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

{$username} | Forum

Nirmalya Ghosh
Nirmalya Ghosh Dec 11 '12
Hello everyone,

I just wanted to know how can I get a link on my sidebar that would show the user's photos?


Meaning, suppose I'm logged in wit the username "username".

Now, when I click on the photos in ""My Profile", I go to "www.mywebsite.com/photo/useralbums/username"


I just wanted to know can I make a link such that when a user, logged in by any name, can access their own photos.


Suppose, a user has logged in with username "username1".


Now, when he clicks on the link, he goes to "www.mywebsite.com/photo/useralbums/username1"


Again, when another user has logged in with username "username2".


Now, when he clicks on the link, he goes to "www.mywebsite.com/photo/useralbums/username2"




Like that. How can I do that?

Nirmalya Ghosh
Nirmalya Ghosh Dec 11 '12
please help
Alia Team
Alia Dec 12 '12
Nirmalya,

>I just wanted to know how can I get a link on my sidebar that would show the user's photos?


I am not sure what you mean, but this kind of link already exists on "My Profile" page. Please see screen shot attached. Let me know if you meant something else.

matt
matt Dec 12 '12
Hi,

I'm looking to do this too.

The screenshot you give Aliia, shows latest photos across the site. I think Nirmalya and I are looking for a way to pass the username variable - so that each user gets taken to their own photos/albums.

Edit. The 'Quick Link' widget on the Prefs page seems to do this?

Cheers

Matt
The Forum post is edited by matt Dec 12 '12
Nirmalya Ghosh
Nirmalya Ghosh Dec 12 '12
Ya Matt, I want something like that. Just a link (like that in the Quick Link) to do that!
Alia Team
Alia Dec 13 '12
Nirmalya, if you would like to have a link to "My Albums" for example on your main page, then you can add a Custom Text/HTML widget.

1.You will need to use $GET method to retrieve "username" variable into your <a-href> link.  I recommend googling how this method can be used in html.

2.Once you are done with creating an html link, you can just post it into the "Content" field of  Custom Text/HTML widget.
matt
matt Dec 13 '12
I'm not making progress on my syntax.... but assuming we need to get the $username variable...

<input type="hidden" value="<?php echo $_GET['username']; ?>"

<a href="/photo/useralbums/?username">My Photos</a>

hmmmmm

Needs more work.  Any tips?
matt
matt Dec 15 '12
Hiya, I'm still struggling to a make this work in the HTML widget?

Any tips please?

<input type="hidden" value="<?php echo $_GET['username']; ?>"

<a href="path/to/oxwall/photo/useralbums/?username=<?php echo $username; ?>">My Albums</a>
Alia Team
Alia Dec 16 '12
Matt, unfortunately I can not give exact instructions on how the code should be build since I am not a developer myself. May be other members have a solution to this.
matt
matt Dec 16 '12
No probs :) I am not a developer either, but a community organizer :)  The questions was for anyone reading? So anyone got a solution for my code snippet? As you can see, I am trying to learn - so any help, much appreciated.

x
Matt
Nirmalya Ghosh
Nirmalya Ghosh Dec 23 '12
Madam,

Can you please tell me which file I need to modify to modify the quick links, that shows beside the newsfeed?

I think if I could have a look at it, then I could create another quick link for the "my profile" section.

Thank you.

Alia Team
Alia Dec 25 '12
Nirmalya,

1. quick_links.php  under ow_system_plugins/base/components
2. quick_links.html under ow_system_plugins/base/views/components
Kяuncн Leader
Kяuncн Jul 15 '13
Looking to modify the Quick Links widget, I done a search and there is no quick_links.html, there is however a quick_links_widget.html and that is not what I need to modify/Hide My Videos link..
ross Team
ross Jul 16 '13
ow_plugins/video/init.php

find this function and comment it


function video_quick_links( BASE_CLASS_EventCollector $event ){    $service = VIDEO_BOL_ClipService::getInstance();    $userId = OW::getUser()->getId();    $username = OW::getUser()->getUserObject()->getUsername();
    $clipCount = (int) $service->findUserClipsCount($userId);
    if ( $clipCount > 0 )    {        $event->add(array(            BASE_CMP_QuickLinksWidget::DATA_KEY_LABEL => OW::getLanguage()->text('video', 'my_video'),            BASE_CMP_QuickLinksWidget::DATA_KEY_URL => OW::getRouter()->urlForRoute('video_user_video_list', array('user' => $username)),            BASE_CMP_QuickLinksWidget::DATA_KEY_COUNT => $clipCount,            BASE_CMP_QuickLinksWidget::DATA_KEY_COUNT_URL => OW::getRouter()->urlForRoute('video_user_video_list', array('user' => $username))        ));    }}OW::getEventManager()->bind(BASE_CMP_QuickLinksWidget::EVENT_NAME, 'video_quick_links');

ross Team
ross Jul 16 '13
Topic was moved from General Questions.
Kяuncн Leader
Kяuncн Jul 16 '13
Thank you, removed from the function as follows:

function video_quick_links( BASE_CLASS_EventCollector $event )
{
    $service = VIDEO_BOL_ClipService::getInstance();
    $userId = OW::getUser()->getId();
    $username = OW::getUser()->getUserObject()->getUsername();

    $clipCount = (int) $service->findUserClipsCount($userId);

    if ( $clipCount > 0 )
    {
        $event->add(array(
            BASE_CMP_QuickLinksWidget::DATA_KEY_LABEL => OW::getLanguage()->text('video', 'my_video'),
            BASE_CMP_QuickLinksWidget::DATA_KEY_URL => OW::getRouter()->urlForRoute('video_user_video_list', array('user' => $username)),
            BASE_CMP_QuickLinksWidget::DATA_KEY_COUNT => $clipCount,
            BASE_CMP_QuickLinksWidget::DATA_KEY_COUNT_URL => OW::getRouter()->urlForRoute('video_user_video_list', array('user' => $username))
        ));
    }
}
OW::getEventManager()->bind(BASE_CMP_QuickLinksWidget::EVENT_NAME, 'video_quick_links');




The Forum post is edited by Kяuncн Jul 16 '13
ali
ali Apr 11 '23
В Арт Академи в София, децата могат да се научат на различни техники за рисуване, керамика, крафт с полимерна глина и много други изкуствени дейности. През последните години, училището се е утвърдило като един от най-добрите центрове за изкуство за деца в София. Една от големите предимства на Арт Академи е, че децата не само могат да се забавляват, но и да учат много полезни умения като търпение, точност и творческо мислене. Децата могат да се развиват в своите умения и да изразят своята индивидуалност. В Арт Академи има и опитни учители, които ще насочат децата и ще им помогнат да развият своя талант. Всички материали и оборудване, необходими за изкуството, са на разположение в училището. Арт Академи
Emma Willems
Emma Willems Apr 12 '23
Great place for work kantoor in Eindhoven