Go to PM user page when profile is clicked

Started by Aileen, March 12, 2008, 04:39:48 PM

Previous topic - Next topic

Aileen

Instead of going to the profile can we PM a user instead when the user name is clicked on:

on post
who's online
view profile


Thanks

Bulakbol

If you change all of those, how would you view their profile then? You can replace any occurences of
action=profile

with
action=pm;sa=send;

in Sources/BoardIndex.php and Load.php. Try it and find out what you will get.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Eliana Tamerin

I'm guessing you could view memberlist or click on the View Profile image in the post details. Just don't change the View Profile one, there's also a Personal Message/Online indicator icon that you should use instead.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Bulakbol

I'm not sure if by making the changes in BoardIndex.php and Load.php will affect those you mentioned. I haven't tried it.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Eliana Tamerin

Don't think it would be boardindex.php. Perhaps Display.php and Who.php.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Aileen

found it all

BoardIndex.php
BoardIndex.template.php
Recent.php
Load.php
MessageIndex.php
Display.template

I dont know if I missed something but it is any file with action=profile

codenaught

So does that mean you were able to figure this out Aileen? Any additional assistance needed?
Dev Consultant
Former SMF Doc Coordinator

Aileen

yes, just one problem.... all but the "profile" of the latest member in infocenter is not yet changed.

What file to edit it still says action=profile

instead of action=pm;sa=send;

codenaught

Sources/Subs.php:

// This looks weird, but it's because BoardIndex.php references the variable.
$context['common_stats']['latest_member'] = array(
'id' => $modSettings['latestMember'],
'name' => $modSettings['latestRealName'],
'href' => $scripturl . '?action=profile;u=' . $modSettings['latestMember'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . '">' . $modSettings['latestRealName'] . '</a>',
);


Notice the 'link' line.
Dev Consultant
Former SMF Doc Coordinator

Aileen

Thanks. its now all working

BTW in some of the files i edited

'href' => $scripturl . aslo

but for subs i just edited the

'link' =>


Mind if I ask for the difference between the 2.

Because when I edited the

'href' => $scripturl  in subs there was an error

codenaught

'href' will hold the actual address of the link, so for instance:

'href' => 'http://www.google.com'

Whereas, 'link' would hold the entire <a href="...">...</a> link code like:

'link' => '<a href="http://www.google.com">Google</a>'

The template will either use something like:

<a href="' . $context['some_index']['href'] . '">Google</a> or simply just $context['some_index']['link']. I am not aware of any standard for when to use one over the other (they are both used in the templates depending on the variable). But basically by providing the 'href' it allows people to customize the link as needed in the template, while the 'link' one can be used if it is just a simple link with nothing special needing to be modified from it.
Dev Consultant
Former SMF Doc Coordinator

Aileen

thank you so much akabugeyes. I think it solved my problem

codenaught

You're welcome. Just let us know if you run into any additional problems. :)
Dev Consultant
Former SMF Doc Coordinator

Aileen

One last follow up question. How can I change the link in the RSS for new members from action=profile to action=pm;sa=send

I mean what file to edit

thanks

codenaught

Dev Consultant
Former SMF Doc Coordinator

Aileen

Thank you so much. I will edit it. BTW with my previous file edits. Can I add no follow on all files. or only one file will do the trick?

Aileen


[SiNaN]

Do you still need help with this Aileen?

If yes, what you want is adding "nofollow" attribute to all user links?
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: