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.

Link from Forum Profile to Main Site Profile

edited June 2014 in Vanilla 2.0 - 2.8

2.1 Baseline theme.

When someone logs into my main site (VLDpersonals) they are also logged into the forum (Vanilla) as well. That is great news. I do have the issue with two profiles, but some users seem to enjoy a forum profile and a site profile. I was thinking of providing a link in each persons vanilla profile to their main site profile. But how?

Member Example: lehmartin898

Forum Member Profile Link

/asian-dating/profile/10001/lehmartin898
(I want to place a link from their vanilla profile to main site profile)

Site Member Profile Link

/member/28539/ OR friendly URL is /lehmartin898

I know for example when I link a members name on VLDPersonals to his profile it looks like this.

<a href="{top.virtual_path}{member_profile_link}">username</a>

Since their member numbers are not the same how could I do this?

Thanks for any feedback.

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited June 2014

    Since their member numbers are not the same how could I do this?

    It should automatically know which user it is since it checks if user is logged in to build the profile .

    To add another link to the profile , I would used profile extender plugin with a field for their other profile link.

  • edited June 2014

    Sorry, I meant to say if you member "Jane" or "Guest" and want to go from lehmartin898 forum profile to his site profile, not your own.

  • I would just like to hard code it in because members would never go to the trouble of adding it.

  • hgtonighthgtonight ∞ · New Moderator

    Are the usernames the same between Vanilla and VLDPersonals?

    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.

  • Yes, the user name's are the same forum /profile/10001/lehmartin898 V/S main site /lehmartin898

  • peregrineperegrine MVP
    edited June 2014

    put in plugins/AddForumLink/default.php

         <?php if (!defined('APPLICATION')) exit();
    
    
            // Define the plugin:
            $PluginInfo['AddForumLink'] = array(
               'Name' => 'AddForumLink',
               'Description' => 'Add Forum Link',
               'Version' => '1',
               'Author' => "An Asian Date",
            );
    class AddForumLink extends Gdn_Plugin {
    
    
      public function UserInfoModule_OnBasicInfo_Handler($Sender) {
    
         $User = $Sender->User;
    
            echo Wrap(T("MainSiteLink: "), 'dt', array('class' => 'Mainsite'));
            if ($Sender->User > 0) {
            $YourSite = "http://www.example.com";
            echo "<dd>";
            echo Anchor("Click to Date Me Here: $User->Name", $YourSite . $User->Name,TRUE);
            echo "</dd>";
            } else {
            echo T("none selected");
          }
       }
    }
    
    

    revised

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited June 2014

    Thank you peregrine. This forced me to use a little brain power and figure out what to do with the code and upload the plug in. The only problem is the link itself from forum melindaspenpals.com/asian-dating/user to main site melindaspenpals.com/user needs tweaking.

    When I click the forum profile link it takes me to melindaspenpals.com/asian-dating/www.melindaspenpals.com/user

    Sorry, I hope I explained it right.

  • @kozmosis66

    it should work, shouldn't it. based on what you sadi for links.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I revised it try it again.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Ok! So I got it to work with your revisions. But then the WYSIWYG (CLEditor) comments box got really really long. So when I disabled the AddForumLink plugin the comments box went back to normal size. I have no idea why that would happen.

  • peregrineperegrine MVP
    edited June 2014

    needs a slash at the end.

    $YourSite = "http://www.example.com/";

    But then the WYSIWYG (CLEditor) comments box got really really long.

    the plugin has no impact on WYSIWYG (CLEditor)) with the changes on my test forum, I don't see how it possibly could.

    try changing the line to

    this
    echo Anchor("Click to Date Me Here: $User->Name", $YourSite . $User->Name,TRUE);

    to

    echo Anchor(T("Click to see Details About Me"), $YourSite . $User->Name,TRUE);

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited June 2014

    @vrijvlinder, at least someone is clicking awesome. :) on the reactions.

    someday kozmosis66 and others will learn about the reactions feature. :p

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    I think @kozmosis66 is waiting to finish getting it to work and then will go on an awesome reaction spree !!! hint hint .....

  • peregrineperegrine MVP
    edited June 2014

    or asian date will show up at my doorstep. carrying a donation :) in lieu of an awesome.

    and he is getting some serious airplay posting his forum name on the site in all the discussions.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • edited June 2014

    Ok sorry, I did not even see these reaction features. I promise to thank you in a donation type of way, really! The first one is with it enabled second with it disabled. The box was so big I couldn't capture it all in the shot.

    Thanks I already figured out the trailing slash. Attached are the screens of it on and off same threads.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Have you tried using the cleditor that comes with vanilla?

    Also is this happening in IE or across all . Autogrow must be disabled.

    You can do it with css by giving it a fixed height and make scrollbars show if the content gets too long.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Try this css in your custom.css file

    .cleditorMain {
    width:100%!important;
    height:480px!important;
    }
    .cleditorMain iframe {
    height:480px!important;
    width:100%!important;
    }
    .cleditorMain textarea,.cleditorMain textarea:focus {
    height:480px!important;
    width:100%!important;
    outline:none;
    overflow:auto;
    resize:none;
    }
    
  • vrijvlinder, it was happening in both Chrome and IE. Sorry, I cannot find this custom.css file. I found other css files but not this one?

  • peregrineperegrine MVP
    edited June 2014

    I cannot find this custom.css file.

    the figure shows an imaginary theme called brand friendly as an example in yout

    /themes folder (where all your themes are.)

    also see: theme tutorials and http://vanillaforums.org/addon/annotatedcss2.1-theme

    great stuff here
    http://vanillaforums.org/discussion/comment/206536/#Comment_206536

    and here

    http://vanillaforums.org/discussion/20231/how-to-become-somewhat-adept-at-modifying-vanilla-

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited June 2014

    Not to push my own themes, but I cover all this in my themes. Maybe you can find a nice one that fits your needs to modify . In case you are using the default theme and that is not a good idea to modify...

    You might like this one if you like purple

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

Sign In or Register to comment.