I've been searching for an answer to simple(I hope)question:
How do I show username instead of fullname for album owner/photo owner?
I thought it might be a config setting in admin but cannot seem to find it.
All modifications found in forums refer to old code that does not appear to exsist.
G2 theme matrix
Thanks in advance
Posts: 565
Edit Album | Edit Permissions | New Owner
Posts: 8339
Not really acceptible, albums are generated on the fly when new user joins the site. Nobody wants their real name. This is a gamer site, so everybody knows each other by screennames.
Posts: 16504
There is this How To for comments: http://codex.gallery2.org/index.php/Gallery2:How_to_Change_Fullname_to_Username_in_Comments
It also mentions how to do this for item (albums/photos/etc) by editing ItemInfo.tpl
http://codex.gallery2.org/index.php/Gallery2:How_to_Change_Fullname_to_Username_in_Comments
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8339
Thanks nivekiam,
That got me most of the way, now where would that be for the sidebar? Album tree still shows fullnames.
Posts: 8339
oops.. found it in modules/imagblock/templates/imageblock.tpl
Posts: 16504
Well, depending on what it is in the sidebar it could be a lot of different places. But my album tree doesn't show username or full name. Are you thinking Image Block? Can you post a screenshot of what you're looking at?
edit: ah, nevermind then
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8339
actually that changed the imageblock, but not the album tree. Cannot find that one
The dhtml album tree nav.
Posts: 8339
Ok, it seems the problem lies in the album creation process. User albums are created with the first visit to the gallery, and it is naming the albums based on fullname instead of username.
Anyone have any idea where that code is?
Posts: 16504
Please post a screenshot of what you want to change. I can find no reference to fullName or userName in the albumselect module, thus the username or fullname should not even be displayed. I've never seen it displayed and see no options to turn that on or off so I don't know why that information is even displayed in your album tree.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 8339
Actually as it turns out, it is displaying the album name, which is based on the users fullname. I have gallery embedded, all user information is correctly mapped, and I have gallery set to create a user album for each user on his/her first visit to gallery. Gallery is creating this user album based on the users fullname, so that is why I'm seeing the fullnames in the album tree.
I would like to set gallery to create these user albums based on username instead of fullname.
Is that more helpful?
Posts: 565
Is this area going to do what you want?
[/modules/useralbum/classesUserAlbumHelper.class] /* Create album.. */ $albumTitle = trim($user->getFullName()); if (empty($albumTitle)) { $albumTitle = $user->getUserName(); } $albumName = $user->getUserName(); while (true) { list ($ret, $album) = GalleryCoreApi::createAlbum( $module['targetLocation'], $albumName, $albumTitle, '', '', ''); if ($ret->isSuccess()) { break; } if ($ret->getErrorCode() & ERROR_COLLISION) { $albumName .= '_'; } else { return $ret->wrap(__FILE__, __LINE__); } }
Posts: 8339
Yes that would be it, thank you very much!
I replaced: $albumTitle = trim($user->getFullName());
with: $albumTitle = $user->getUserName();
Since username cannot be empty, I don't see a problem.
I've been searching for that piece of code for hours, don't know how I missed it.
Thanks again