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
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.
I'm guessing you could view memberlist or click on the (http://www.simplemachines.org/community/Themes/smsite/images/icons/profile_sm.gif) 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.
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.
Don't think it would be boardindex.php. Perhaps Display.php and Who.php.
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
So does that mean you were able to figure this out Aileen? Any additional assistance needed?
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;
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.
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
'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.
thank you so much akabugeyes. I think it solved my problem
You're welcome. Just let us know if you run into any additional problems. :)
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
That would be News.php. :)
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?
any updates on this?
Do you still need help with this Aileen?
If yes, what you want is adding "nofollow" attribute to all user links?