Need a quick help

I'm making a new button that will take you to your profile album.  In language settings, I added a new key and I'm trying to figure out how to add member's nickname in the url. 

For example:
<a href="http://mysite.com/m/photos/browse/album/{nickname}-s-photos/owner/{nickname}">
Upload to my profile page
</a>

{nickname} and {username} aren't working.  I tried <firstname> and that doesn't work.  What's the right code that pulls a member's nickname?

Quote · 16 Nov 2010

Should be {nickname}'s

 

not {nickname}-s

 

I believe :)

Nothing to see here
Quote · 16 Nov 2010

I didn't change the whole url.  What i see is this...

http://mysite.com/m/photos/browse/album/Patrick-s-photos/owner/Patrick

I'm assuming that's how it is. :/

 

Should be {nickname}'s

 

not {nickname}-s

 

I believe :)

 

Quote · 16 Nov 2010

What page you trying to put this button on?

Many people, and i guess you do as well, believe that {nickname} or other such variables are defined and work everywhere. That however is not the case.

https://www.deanbassett.com
Quote · 16 Nov 2010

Hey deano!

You see the button "Upload to my profile".  If they click it, I want them to go to this url....

http://www.mysite.net/m/photos/albums/my/add_objects/{nickname}-s-photos/owner/{nickname}

Some people still don't get how to upload a photo to their profile page.  I think this way might help. :/

screenshot20101116at121.png

 

what about doing this way...http://www.mysite.net/m/photos/albums/my/add_objects/<?php echo ['nickname'] ?> -s-photos/owner/<?php echo ['nickname'] ?>

Is it possible to use php instead?  :/  Do you have any better idea?

Quote · 16 Nov 2010

You cannot use php in html templates. So how are you adding the buttons? Via template, or via modifying one of the photo modules scripts.

If via script, then dolphin has a built in function to get the nickname.

getNickName(); returns the nick name of the current member, or getNickName(####) gets the nickname of the member id specified.



https://www.deanbassett.com
Quote · 16 Nov 2010

hmmm... This is what i did.....

I went to inc/classes/BxDolFilesTemplate.php

around line 171, i added some lines...

function getAdminShort ($iNumber, $sAlbumUri, $sNickName) {
$iNumber     = (int)$iNumber;
$sAlbumUri   = process_db_input($sAlbumUri, BX_TAGS_STRIP);
$sNickName   = process_db_input($sNickName, BX_TAGS_STRIP);
$sLinkPref   = $this->_oConfig->getBaseUri();
$sLinkAdd    = $sLinkPref . 'albums/my/add_objects/' . $sAlbumUri . '/owner/' . $sNickName;
$sLinkBrowse = $sLinkPref . 'albums/my/manage_objects/' . $sAlbumUri . '/owner/' . $sNickName;
$aUnit = array(
'fileStatCount' => _t('_' . $this->_oConfig->getMainPrefix() . '_count_info', $iNumber, $sLinkBrowse),
'fileStatAdd' => _t('_' . $this->_oConfig->getMainPrefix() . '_add_info', $sLinkAdd),

'fileStatCount2' => _t('_' . $this->_oConfig->getMainPrefix() . '_count_info2', $iNumber, $sLinkBrowse),
'fileStatAdd2' => _t('_' . $this->_oConfig->getMainPrefix() . '_add_info2', $sLinkAdd),

'fileStatCount3' => _t('_' . $this->_oConfig->getMainPrefix() . '_count_info3', $iNumber, $sLinkBrowse),
'fileStatAdd3' => _t('_' . $this->_oConfig->getMainPrefix() . '_add_info3', $sLinkAdd),

 

and line 191

function getAdminAlbumShort ($iNumber) {
$iNumber = (int)$iNumber;
$sLinkPref = $this->_oConfig->getBaseUri();
$sLinkAdd = $sLinkPref . 'albums/my/add/';
$sLinkBrowse = $sLinkPref . 'albums/my/manage/';
$aUnit = array(
'fileStatCount' => _t('_' . $this->_oConfig->getMainPrefix() . '_albums_count_info', $iNumber, $sLinkBrowse),
'fileStatAdd' => _t('_' . $this->_oConfig->getMainPrefix() . '_albums_add_info', $sLinkAdd),

'fileStatCount2' => _t('_' . $this->_oConfig->getMainPrefix() . '_albums_count_info2', $iNumber, $sLinkBrowse),
'fileStatAdd2' => _t('_' . $this->_oConfig->getMainPrefix() . '_albums_add_info2', $sLinkAdd),

'fileStatCount3' => _t('_' . $this->_oConfig->getMainPrefix() . '_albums_count_info3', $iNumber, $sLinkBrowse),
'fileStatAdd3' => _t('_' . $this->_oConfig->getMainPrefix() . '_albums_add_info3', $sLinkAdd),

 

and In modules/boonex/photos/templates/base/admin_short.html, I added some there..

<span class="manage_button" align="center">

<span class="manage_text">__fileStatAdd2__</span>

</span>

<span class="manage_button" align="center">

<span class="manage_text">__fileStatAdd3__</span>

lastly, I added 2 new keys in language settings.  So my question is.. is there a way to pull a member's nickname in language settings?  So umm... where should i put getNickName();?  In language settings or in BxDolFilesTemplate.php?

 

EDIT: sorry.. i didn't realize how much crap i put in here.  Well.. hope you understand what i'm trying to do. :)

Quote · 16 Nov 2010

looks like a load of work. i would just create an FAQ and post that link there. outside that, the first thing you are going to have to do, is create a real path, then create the mod_rewrite for it i would say

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 16 Nov 2010

WICKED!  I tried getNickName() in BxDolFilesTemplate.php and it works!  Thanks deano! I appreciate your help! Laughing

You cannot use php in html templates. So how are you adding the buttons? Via template, or via modifying one of the photo modules scripts.

If via script, then dolphin has a built in function to get the nickname.

getNickName(); returns the nick name of the current member, or getNickName(####) gets the nickname of the member id specified.



 

Quote · 17 Nov 2010

 

For example:

<a href="http://mysite.com/m/photos/browse/album/{nickname}-s-photos/owner/{nickname}


can some one tell me how to make the link to say : http://mysite.com/photos/browse/album/

 

I don't like the M in all the link that little m on the links is driving me nuts  and I thing the link look ridiculous with the M

Post Reply - if you going to help - No for - bla bla bla bla
Quote · 17 Nov 2010

good question on this. i find the /m/ rather annoying as well

 

For example:

<a href="http://mysite.com/m/photos/browse/album/{nickname}-s-photos/owner/{nickname}


can some one tell me how to make the link to say : http://mysite.com/photos/browse/album/

 

I don't like the M in all the link that little m on the links is driving me nuts  and I thing the link look ridiculous with the M

 

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 17 Nov 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.