Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Add @username to the left columm
Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Jun 8, 2013 - 8:22 pm

Hello! i would like to know if is possible to add the @username just below the "name to show" on the left column of a single topic view...

 

I know that it mus be added on the first row of the spTopicView.php but i dont know hoy to call it... 

 

The "show" name is

 

sp_PostIndexUserName('tagClass=spPostUserName spCenter');

but i dont know how to call to the @username 

 

 

can anyone help me?

 

 

 

 considere registrandote

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 9, 2013 - 3:51 am
  1. By @username - do you mean the login name (as opposed to the display name which the forum currently uses for all user display)?
  2. I do not really know what you mean by 'name to show'. Can you explain? Or perhaps an image?
  3. And then - which user do you mean? The user who is currently looking at the site?
andy-signature.png
YELLOW
SWORDFISH
Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Jun 9, 2013 - 4:03 am

Hi Yellow Swordfish

Thanks for answering

For Q1. Exactly i want to show the login name and at the same time the display name

Q2. I wanted to say the " display name " instead of "name to show" ( sorry for my poor english)

Q3. What i want to do is put the login name down to the display name 

 

In your case could be 

AVATAR
Yellow Swordfish

@yellowswordfish (loginname)

Location 

 

ect...

 

I just wanted to let know that i know the place where to put it, i need only the Function that is calling to the login name 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 9, 2013 - 4:18 am

We do not actually have a supplied template function for that as we have never been asked for it before. Most users want to hide and protect their login name and not let it be known. But - something like this will work:

echo '<div class="spPostUserLocation spCenter">';
echo $spThisPostUser->user_login;
echo '</div>';

although note that this re-uses the class used for the location data.

As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/)

andy-signature.png
YELLOW
SWORDFISH
Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Jun 9, 2013 - 4:21 am

Thanks, i wil try it...

 

The main reasons is that i have a large forum of 38.000 users... if they try to mention one to another it becomes a total nighmare if you dont know the login name...

Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Jun 9, 2013 - 4:25 am

It worked! many thanks!!!

 

Anychange to show a @ in front of the login name? 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 9, 2013 - 4:41 am

You're welcome

andy-signature.png
YELLOW
SWORDFISH
Avatar
Carlos
Spain
Member
Free Members
sp_UserOfflineSmall Offline
Jun 9, 2013 - 4:45 am

Any chance to show a @ in front of the login name? 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 9, 2013 - 5:04 am

Just echo it out before the login name:

echo '@' . $spThisPostUser->user_login;

that will work.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625