Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Mobile Theme - Send PM

edited January 2012 in Vanilla 2.0 - 2.8

Maybe I'm missing something but is there an easy way to send a user a PM from the mobile view. It looks like the only way is to click on your Inbox, click the thought bubble and then type in the username. Is seems that this functionality should be included in the user profile.

Tagged:

Answers

  • Options

    I think the mobile theme is also missing the 'activities' tab and I could not figure out where to set which theme to use.
    Also, bump for interest.

  • Options
    sahotataransahotataran Developer, Bay Area - CA ✭✭✭

    check out the mobile theme

    There was an error rendering this rich post.

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    It is very interesting that i didn't find any other discussion regarding the usage of private messaging in the mobile template. Did anyone dig into this?

    More than 55% of users of my forums use mobile devices (beeing almost 40 using smartphones) and the demand for private messaging from a mobile template is getting asked for.

    I guess it not just done by mobilefriendly TRUE. Any help would be great.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited April 2013

    @phreak
    You can send PM but you need to activate the panel in the mobile theme. I just remodeled my Mobile theme , you can download it and see what I did and do that to your own .

    http://vanillaforums.org/addon/mobile-theme

    Just replace the tpl with mine to see what I did. It does not affect the style. Only the components.

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    @vrijvlinder: Thanx it worked how you described. Now i have another questions. :)

    I do not want the whole Panel loaded on the specific sites, but i want specific panels loaded. Where is it possible to configure those but "just" for the mobile version.

    Can anybody jump in and help me?

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    If you mean modules in the panel , then yes, just like the guest module you can pick which to show or not. It can be done by css or by adding $this->RemoveModule(name of module) and add it to the mobile themehooks .

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP

    I tried it that way, but this seems to be a decent workaround for a simple feature. Do you think there is a way to call a new conversation outside of the Javascript popup for the mobile version?

    Thanx for your input @vrijvlinder.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    I don't quite follow... if you want something not to pop just put in the antagonist js in the tpl or php master of the theme.

  • Options
    hgtonighthgtonight ∞ · New Moderator
    edited August 2013

    @phreak Add this to your mobile theme's theme hooks file.

    public function ProfileController_Render_Before($Sender) {
      if ($Sender->Menu) {
        $Sender->Menu->AddLink('Options', sprintf(T('Send %s a Message'), $Sender->User->Name), '/messages/add/'.$Sender->User->Name, FALSE, array('class' => 'MessageLink'));
      }
    }
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited August 2013

    Thanx hgtonight. It works great, i just understood quite a lot more about themehooks. :)

    I know now 2 ways to integrate it:

    1.) By just put a link into a themefile linking to "~/messages/add/" (no predefined user)
    2.) By adding to like hgtonight suggested to the main menu above (user predefined)

    I've edited the main menu very strong and both do not apply perfectly. The 1.) way can not pick up a username in the recipients. The 2nd version binds me only to the main menu. Does anyone have an idea how to call ~/messages/add/ with the member the user wants to write from any link possible. Or is there a way to create a link with user through the framework...

    {messageToUser} or something like this? I want to move this link freely.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited August 2013

    Does anyone have an idea how to call ~/messages/add/ with the member the user wants to write from any link possible

    The plain link messages/add takes you to the messages form and the recipient list so you can put the name in yourself. I can't think of a way of being able to tell who you are sending to unless the link is in their profile and their user id is the recipient by virtue that the link is in their profile.

    This may be achieved possibly by adding the message link to each user in the discussions somewhere associated with the avatar/author/user. The following link will be added to the menu . The point is the structure which should add the message link and add the id and username. I tested and it only adds the user name atm....However not sure if it adds my user name or someone else's ...as well.

    In any event You can use css to move it anywhere you want from the menu. Or you can use the insert div plugin to add it to the comments.

    $this->Menu->AddLink('NewMessage', T('NewMessage'), 'messages/add/{Username}',array('Garden.SignIn.Allow'), array('class' => 'Messagelink'));

    you can also make the link popup so they don't have to open a new page

    <script type="text/javascript"> 
    
    $(document).ready(function() {
    $('#Menu li.Messagelink a').popup();
    
    </script>
    
  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited August 2013

    You could try something like this to add that link in the meta for the discussions and comments, this would go in the theme hooks file.

    public function DiscussionController_BeforeCommentMeta_Handler($Sender) {
            $Author = $Sender->EventArguments['Author'];
            if ($Author->Photo) {
                $MessageLink = "messages/add";
                echo ('$MessageLink',T('Message'), array('class' => 'MessageLink'));
            }
        }
    
Sign In or Register to comment.