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

Insert data from Profile Extender fields into Discussion Header

2»

Comments

  • Options

    @meshugy said:
    peregrine Perfect, thanks!

    my pleasure.

    we are like "lichen" a symbiotic organism exhibiting commensalism and mutualism. One provides the photosynthesis and the other provides a suitable substrate to collect water and minerals. As a result both organisms thrive better together.

    meshugy and peregrine = pirogi organism

    thanks for continued support!

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

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder said:
    The brand has passed many hands, I tried those at a NAMM show. Very nice guitars for sure. But I would stop short of paying those figures. I am not a gypsy but I am frugal ;)

    What you played at NAMM are the Asian made D'Angelico knockoffs. They sort of look like the original D'Angelico guitars, but don't sound like them at all. Here is a real one: http://www.djangobooks.com/Item/selmer-dangelico-archtop

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes , I am aware of that, been in the biz for 30 years. Met the original owners and their subsequent owners. The same can be said for D'Aquisto guitars and many many others. It is a cut throat business ... the korean made guitars are fine quality in comparison to chinese made. But they will never replace the original workmanship that is for sure.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder You suggestions are similar to what I was thinking. I don't think I really need any sort of popup image, but rather just a link from the user's guitar name to an image they uploaded into a public gallery. I'll look into it, thanks for your thoughts!

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    @meshugy check out this video from this years winter NAMM , my good friend Skunk Baxter just happens to be playing at the D'Angelico booth ,what a coincidence ...

    http://www.namm.org/embed/22738

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @vrijvlinder nice! You have some talented friends...

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    Regarding our discussion of linking photos of users guitars with their role title, I came up with this: a wordpress blog set up like a gallery were users can publicly upload photos of their guitars along with other information about their instrument:

    http://www.djangobooks.com/gallery/guitars/

    I don't have the public upload form setup yet, but that's coming.

    What I plan to do is add a field to the profile extender in Vanilla for "Guitar Gallery." The user can enter the url of the guitar they uploaded to the gallery. That url will then be added to their role title so other users browsing the forum can easily click on it to view that user's guitar.

    My question for everyone here is: Is there a more elegant way to connect the user's Vanilla profile with the wordpress blog post that the user submitted for their guitar? I have the wordpress blog integrated with Vanilla both for SSO and comments. It would be cool if after the user submitted their guitar to the gallery there was some button they could click to link it to their Vanilla profile. I'm sure there's a way to do it but may be far more trouble than it's worth. But I can dream....

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited January 2014

    Thanks, I just thought it was funny how we were talking about those guitars and my friend was in the video. Known him for many years.

    Have you tried the galleries plugin ? It has a user upload form and they can add an image link in the profile extender or the signatures plugin .

    It would be cool if after the user submitted their guitar to the gallery there was some button they could click to link it to their Vanilla profile.

    Well there is the MyAttachments plugin but that one puts images attached in discussions as a gallery in the users profile.

    If you don't want to use the galleries plugin, you could just make a Category called gallery and users can post images .

  • Options
    meshugymeshugy Musician/Hacker ✭✭
    edited January 2014

    Yes, I took a look at the Galleries plugin. Nice work on that....it is definitely an option. However, ideally I need more than just a single image upload. I want users to be able to load numerous images and include other information about the instrument like it's history, construction, etc. Using WP allows me to do that which is why I'm exploring that option.

    like this: http://www.djangobooks.com/gallery/1940s-busato/

    Also, everything would be searchable....

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Well that is a whole other ball game, I tried adding drag and drop to the galleries plugin but was not successful .
    That is the only option atm. People can create albums with their name and upload images and you can add captions.

    It is not sophisticated by any means though.

    You would need to be able to let people also log into wordpress when they log into Vanilla.
    Set up a gallery page . I would see if there are front end uploaders as plugins to add to the gallery.

    I would have to look into it more and test things in my WP to see how it can be done if at all.

  • Options
    meshugymeshugy Musician/Hacker ✭✭
    edited January 2014

    Yes, there are numerous front end uploaders for WP. I'll probably go with one called Gravity Forms as it should be able to do everything I need: http://www.gravityforms.com/

    Allows me to create a public form with multiple fields and multiple images uploads. Takes all that data and creates a wordpress blog post and puts the images in the WP media directory. Pretty much does all the work for me...

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Here is an option , remember allowing the public uploading images is risky so take all precautions necessary.

    http://wordpress.org/plugins/frontend-uploader/

    http://wordpress.org/plugins/nextgen-public-image-uploader/

  • Options
    meshugymeshugy Musician/Hacker ✭✭
    edited January 2014

    I checked out those ones....they don't have all the functionality I need. Not bad though...

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    Yes, you just need to find the ones that do what you want. They can also be modified.

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    the sql could be changed to do multiples fields if you wanted to use like

    @peregrine I'd like to do one other field. So what would I change to the code you submitted to do the following:

    1) Display a field from the Profile Extender called "My Guitar" with the RoleTitles plugin (this is what the code you provided already does, so nothing different there)

    2) Embed the "My Guitar" RoleTitle with a link from a field in the Profile Extender named "Guitar Gallery"

    What I'm trying to do is allow users to display what guitar they own via the RoleTitle plugin and have that name of that guitar linked to a page in our community guitar gallery. So say the user enters "Fender Stratocaster" in the My Guitar field and enters "http://mysite/gallery/fender_stratocaster" in the Guitar Gallery field. I'd like that link to be added to the title "Fender Stratocaster."

    Thanks again for all your help...

  • Options
    peregrineperegrine MVP
    edited January 2014

    @meshugy said:

    @peregrine I'd like to do one other field. So what would I change to the code you submitted to do the following:

    you would change the sql extraction to get the profile.extender fields for each user and tie the guitar name with guitar link and echo the pair.

    If you have problems, let me know and i can probably write something up for you tomorrow.

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

  • Options
    peregrineperegrine MVP
    edited January 2014

    @meshugy said:

    @peregrine I'd like to do one other field. So what would I change to the code you submitted to do the following:
    

    1) Display a field from the Profile Extender called "My Guitar" with the RoleTitles plugin (this is what the code you provided already does, so nothing different there)

    2) Embed the "My Guitar" RoleTitle with a link from a field in the Profile Extender named "Guitar Gallery"

    What I'm trying to do is allow users to display what guitar they own via the RoleTitle plugin and have that name of that guitar linked to a page in our community guitar gallery. So say the user enters "Fender Stratocaster" in the My Guitar field and enters "http://mysite/gallery/fender_stratocaster" in the Guitar Gallery field. I'd like that link to be added to the title "Fender Stratocaster."

    Thanks again for all your help...

    this should do it if I read you correctly.

    just rename the righthand side of equation appropriately for your setup.

         $NameofProfileField = "Profile.Testing";   
        $NameofProfileFieldLink = "Profile.testinglink";   
    

      public function DiscussionController_AuthorInfo_Handler($Sender) {
            $this->_AttachTitle($Sender);
    
           $Type= $Sender->EventArguments['Type'];
            if ($Type == 'Discussion') {
            $Author = $Sender->EventArguments['Discussion'];
            } else {
            $Author = $Sender->EventArguments['Comment'];
            }
            $AuthorID = $Author->InsertUserID;
            $NameofProfileField = "Profile.Testing";
            $NameofProfileFieldLink = "Profile.testinglink";
            $SQL = Gdn::SQL();
            $this->PfeData = $SQL
            ->Select('*')
            ->From('UserMeta')
            ->Where(array('UserID' =>$AuthorID,'Name like ' => "Profile.%"))  
            ->Get()->ResultArray();
    
            foreach($this->PfeData as $DataSet) {
            if ($DataSet['Name'] ==  $NameofProfileField)
              $pseudotitle =  htmlspecialchars($DataSet['Value']);
             if ($DataSet['Name'] == $NameofProfileFieldLink)
                $pseudolink =  "http://" . htmlspecialchars($DataSet['Value']);
            } 
             $Anchor = Anchor($pseudotitle,$pseudolink,array('target'=>"_blank",'title'=>$pseudotitle));
            echo WrapIf($Anchor, 'span', array('class' => 'MItem AuthorTesting'));  
            }
    

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

  • Options
    peregrineperegrine MVP
    edited January 2014

    @meshugy

    ugh!! finally after hours of coding blunders to eventually take care of possible outcomes.

       public function DiscussionController_AuthorInfo_Handler($Sender) {
        $this->_AttachTitle($Sender);
    
       $Type= $Sender->EventArguments['Type'];
        if ($Type == 'Discussion') {
        $Author = $Sender->EventArguments['Discussion'];
        } else {
        $Author = $Sender->EventArguments['Comment'];
        }
        $AuthorID = $Author->InsertUserID;
        $NameofProfileField = "Profile.Testing";
        $NameofProfileFieldLink = "Profile.testinglink";
        $SQL = Gdn::SQL();
        $this->PfeData = $SQL
        ->Select('*')
        ->From('UserMeta')
        ->Where(array('UserID' =>$AuthorID,'Name like ' => "Profile.%"))  
        ->Get()->ResultArray();
    
        $pseudotitle = $pseudolink = "";
        foreach($this->PfeData as $DataSet) {
        if ($DataSet['Name'] ==  $NameofProfileField)
          $pseudotitle =  htmlspecialchars($DataSet['Value']);
         if ($DataSet['Name'] == $NameofProfileFieldLink)
            $pseudolink =   htmlspecialchars($DataSet['Value']);
        } 
    
    
         if ($pseudolink) {
             if (!preg_match('|^https?://|i', $pseudolink)) { 
             $pseudolink = "http://" .$pseudolink;
             }
        $Anchor = Anchor($pseudotitle,$pseudolink,array('target'=>"_blank",'title'=>"click me to see my pic of " . $pseudotitle));
        } else {
        $Anchor = $pseudotitle;
        }
    
        echo WrapIf($Anchor, 'span', array('class' => 'MItem AuthorTesting'));  
    }
    

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

  • Options
    meshugymeshugy Musician/Hacker ✭✭

    @peregrine genius! Works perfectly....thanks for adding the hover link info as well. I appreciate the time and effort you put into this, and my users will as well. This will definitely enhance the user experience on my site....

  • Options

    thanks @meshugy. as I said before symbiosis works! thank you as well.

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

Sign In or Register to comment.