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

How do I move the Picture and About box in User Profile Page?

13»

Answers

  • Options
    businessdadbusinessdad Stealth contributor MVP

    To all: I'd like to inform you that I finally managed to obtain a result very close to what my client was asking, at 4 AM last night. I made it just in time, I ran out of curses from my repertoire in all five languages I know. But, at last, here it is!
    Customised User Control Panel

    It's far from being complete, as I still need to remove the Recent Activity Box, shorten the menu and display an About box (I'm still trying to figure out where the User can actually fill the About field), but I think it's a fairly good result.

    Also, since I didn't like much the way the various parts were handled, I played around a bit. Instead of rendering the Panel asset, I wrote functions that render the single parts that form it. This way I could put the Menu in a separate section and arrange the order in which the boxes appear by rendering in whatever order I liked.

    Perhaps it's not a masterpiece of elegance, but it works! Once again, thank you all for your help! :)

  • Options

    businessdad said:
    display an About box (I'm still trying to figure out where the User can actually fill the About field), but I think it's a fairly good result.

    Do you want to display the about box with an existing plugin? Or figure out which information is retrieved by Vanilla?

    There was an error rendering this rich post.

  • Options
    businessdadbusinessdad Stealth contributor MVP

    @UnderDog Neither of the two, actually. I simply saw that, in standard "user.php" view, there's a reference to $this->User->About, which would be displayed by the view if it contains something. However, I can't see where this field can be populated, there's no "About" field anywhere in User Control Panel.

  • Options

    I wouldn't worry about that then, I even think its field has the type 'text' or 'mediumtext' or whatever it is, so it can become quite messy :-)

    Be happy with what you have and if you really really want to improve things, just let us know (you can search for that 'about' part in the Vanilla source)

    There was an error rendering this rich post.

  • Options
    businessdadbusinessdad Stealth contributor MVP

    @UnderDog The issue is that displaying that About box (with data in it, obviously) is yet one more requirement by the client. I'm aware that there are plugins providing much more than just an About box, but I was checking if I could get away with just "plain-vanilla Vanilla" features. :)

    Not a big deal, I'll probably use a plugin and that's it.

  • Options
    KasperKasper Scholar of the Bits Copenhagen Vanilla Staff

    Just for future reference, I found a way to do this in 2.1 via Smarty:

    {if InSection('Profile')}
        {module name="UserInfoModule"}
        {module name="UserPhotoModule"}
    {/if}
    

    Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub

  • Options
    businessdadbusinessdad Stealth contributor MVP

    Thanks. I use 2.0, but I solved it anyway by "splitting" the theme. Now, most of the stuff is put in place by a Plugin who is handling specific events.

  • Options

    @businessdad

    if you ever want to provide the source for this

    http://vanillaforums.org/discussion/comment/166499/#Comment_166499

    for free:). I'd be eager to see it.

    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
    businessdadbusinessdad Stealth contributor MVP

    @peregrine What do you mean with "this"? The screenshot you indicate contains the result of both a theme and a plugin. :)

    I have to inform you, though, that both of them were developed for a client, who owns all rights (one more way I make a living out of my skills). I asked him if I can distribute it, but I didn't get an answer yet. Since they paid for it, I'm not sure they would like to give it away for free.

  • Options

    @businessdad said:
    peregrine What do you mean with "this"? The screenshot you indicate contains the result of both a theme and a plugin. :)

    You identified "this" correctly. and "that" was the code I was looking to see. Looked intriguing to me.

    I have to inform you, though, that both of them were developed for a client, who owns all rights (one more way I make a living out of my skills). I asked him if I can distribute it, but I didn't get an answer yet. Since they paid for it, I'm not sure they would like to give it away for free.

    understood. I suspect since you didn't get an answer by now. I won't be seeing it. Thanks for the response though. I'll stop holding my breath :).

    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
    businessdadbusinessdad Stealth contributor MVP

    @peregrine Never say never. I haven't given up , yet. However, don't expect too much, that was my second plugin for Vanilla and it needs quite a bit of refactoring. For the theme, well... Theming is really not my field, that needs even more refactoring.

    If you want to have a look at the foundation for the theme, simply download the Traditional Chocolate Theme and Plugin in the addon section. That's what I used as a starting point. :)

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited November 2012

    I found this topic rather interesting. I am also curious about that plugin module handler of yours. I think though that using just css to get what you want is the easiest. that way you don't have to work on multiple files.

    all you need is to find the names of the div classes and bodies they belong to.

    div.Photo img{width:100%;height:auto;visibility:visible!important;
      border-radius: 4px;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
     
    }

    this will move the panel anywhere you want within that body

    body#dashboard_profile_notifications.Dashboard.Profile.notifications.Profile #Panel{position:relative;left:40px!important;top:-250px!important;}

    These codes are not in the custom.css but they are in the default for you to copy into the custom. once you got it all in css you can apply it to anything or any page.

    I Love CSS3 !!

    to work with the About Box

    div.Box.About{ border-radius: 4px;
      -webkit-border-radius: 4px;
      -moz-border-radius: 4px;
     box-shadow: 0px 0px 2px #999;
        -moz-box-shadow: 0px 0px 2px #999;
        -webkit-box-shadow: 0px 0px 2px #999;
    border-color:#666;
    }
  • Options
    businessdadbusinessdad Stealth contributor MVP

    @vrijvlinder Thanks for your suggestions. I know I can move things around with CSS, the issue, in my case, was that the page structure had to be altered, as elements were "confined" in boxes put in specific places, and I could not move them so freely.

    Working with multiple files is, actually, not a big deal. The theme, as I designed it, is little more than a skeleton, it's the Plugin that goes with it that decides what to show and when. Personally, I don't like the approach I have seen sometimes, of removing things from rendering (i.e. handle Render_Before and unset this and that) when they should not show. I much prefer to render them only when it's needed, and the event system allows me to do that. :)

Sign In or Register to comment.