News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

modifying user info on posts

Started by Faevilangel, August 10, 2009, 02:08:07 PM

Previous topic - Next topic

Faevilangel

i am looking into a mod that involves the member name next to their post

i have found where it shows - display.template.php and the code is


$message['member']['link']


now where do i find the above so i can modify it ?

thanks
I am available for theme work, pm me for info

Arantor

It really isn't as simple as that.

What exactly do you want to do with posts? A user's name is already against their post - at least normally.
Holder of controversial views, all of which my own.


Faevilangel

basically in vb, the user name when clicked displays a menu, so was going to do this to smf

I am available for theme work, pm me for info

Arantor

You'd be better off not touching how $message['member']['link'] is built in Display.php, but simply modifying how it is displayed in Display.template.php, you can get the user name from $message['member']['name'] and their id from $message['member']['id'].

Though if you are planning to distribute as a mod, I can see the potential benefit in modding it in Display.php itself and injecting a JS menu into ['link'].
Holder of controversial views, all of which my own.


Faevilangel

yeah hopefully will release it as a mod  8)

this will be my first so going to be a fun exercise
I am available for theme work, pm me for info

Arantor

In which case, I would look at Display.php not Display.template.php, if only because you are marginally more likely to make it easier to install (and not have to have hundreds of 'how do I put this on [insert-theme-name] theme' requests)

Any problems please do ask in the forum; there are plenty of current modders about.
Holder of controversial views, all of which my own.


Faevilangel

thanks mate, great help as usual  :D
I am available for theme work, pm me for info

Advertisement: