1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

ragtek Todays Birthdays

Discussion in 'Add-on Releases [Archive]' started by ragtek, Jul 29, 2011.

  1. ragtek

    ragtek Guest

    This add-on adds an sidebar block which shows the users, who have today birthday.
    (Attention, ATM it doesn't include the timezone offset! It's using the servertime)

    If nobody have birthday, the block won't be shown!
    This add-on also respects the privacy settings.

    (Attention, as all my sidebar blocks, this add-on requires my add-on helper framework)

    After the installation, go into your acp => options => sidebar blocks and configure the position of the block

    0 template edits required
    0 new queries added

    ATTENTION
    If you're getting this error:

    you have to change
    file: Ragtek_TBSBB_Model
    search for
    Code:
    ragtek.today_birthdays
    
    replace with
    Code:
    ragtek_today_birthdays
    
     

    Attached Files:

    Phillip, Puntocom, Reedswood and 8 others like this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Any screenshots?
    Is it just user name or also avatar displayed?

    Does the block display if there are no birthdays?

    What about profile privacy? Is that catered for?

    How many queries does it add to the page load and/or increased MB?
     
  3. ragtek

    ragtek Guest

    RC2 adds 1?? Query to the indexpage.

    My plan is, to run the birthday query only once per day, to grab the users and to store them in the xenforo cache, so it won't add any query to the standard pageloads....
     
    Brogan likes this.
  4. ragtek

    ragtek Guest

    *UPDATE*

    1.0.0 Gold available
    Changehistory:
    This add-on runs an cronjob at midnight, collects the todays birthdays and saves them to the xenforo cache.
    So it doesn't require any additional query anymore;)

    The cache is also being rebuild if somebody changes:
    • His birthday
    • the birthday privacy setting
    And if a user account gets deleted.
     
    ShadyX, Veer and Alien like this.
  5. Alien

    Alien Well-Known Member

    Can we get a future option to display usernames as text only too?
     
    Garamond likes this.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Just to let you know there's a /dev folder included in the .zip

    Just testing it out and I think it would benefit with some changes on the layout, etc.
    This is how it currently looks:
    birthday.PNG

    So you end up with a lot of dead space to the right of each avatar and there is no tooltip or overlay on hover.

    Perhaps it would be better to display them as the followed member avatars are?

    members.PNG
     
  7. ragtek

    ragtek Guest

  8. Brogan

    Brogan XenForo Moderator Staff Member

    Ah, fair enough.

    Did you see my comments about the layout, etc?
    (I edited my post)
     
  9. ragtek

    ragtek Guest

    do you know how i can do this?*g*
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    Check the sidebar_online_users template.

    Code:
    <xen:if is="{$visitor.user_id}">
        <xen:if hascontent="true">
        <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
        <ul class="followedOnline">
            <xen:contentcheck>
                <xen:foreach loop="$onlineUsers.records" value="$user">
                    <xen:if is="{$user.followed}">
                        <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                    </xen:if>
                </xen:foreach>
            </xen:contentcheck>
        </ul>
        <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>
        </xen:if>
    </xen:if>
     
  11. ragtek

    ragtek Guest

    My idea for this was to make it in the next version like the staff online box (avatar and name and title) OR only the name because i hate the "only avatar" idea.
    I don't know the avatars of all the users... and i don't want to move the mouse too see the toolbox...

    my 0.02$ ^^
    But as usual, i'm open for suggestions:)
     
  12. Brogan

    Brogan XenForo Moderator Staff Member

    No worries, I'll wait for the next version then :)
     
  13. ragtek

    ragtek Guest

    i'm no UI guy so i'm open for ideas & suggestins:)
    the 2 current design ideas:
     

    Attached Files:

  14. Brogan

    Brogan XenForo Moderator Staff Member

    Personally speaking, I think the vertical stacked one will take up too much space as there is a lot of unused horizontal space.

    My preference would just be the avatar with information on hover such as name and age, etc.

    It's your add-on though ;)
     
  15. Floris

    Floris Guest

  16. Veer

    Veer Well-Known Member

    Yeah, mine too.. just avatars idea would be nice, Plus on hover display Name + Age (something like 19th b'day).
     
  17. Veer

    Veer Well-Known Member

    I like it, something like this would be nice:
    membersbd.png
     
  18. ragtek

    ragtek Guest

    OK first line isn't the problem
    second line (people celebrating ... ) is a problem because of my non existing css knowledge:D
    i should really start learning this stuff:(
     
  19. Brogan

    Brogan XenForo Moderator Staff Member

    I can help you work on it if you like?

    You can literally re-use the "following avatar" code and just change the phrases.

    For example:
    Code:
    <div class="secondaryContent">
        <h3>{xen:phrase todays_birthdays}</h3>
    
        <xen:if is="{$onlineUsers.records}">
    
            <xen:if is="{$visitor.user_id}">
                <xen:if hascontent="true">
                <h4 class="minorHeading">{xen:phrase people_celebrating_their_birthday}:</a></h4>
                <ul class="todaysBirthdays">
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.followed}">
                                <li title="{$user.username}, {$user.age} {xen:phrase today}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
                </xen:if>
            </xen:if>
        </xen:if>
    </div>
    I haven't changed the corresponding code, just the phrases and removed some of the a href links.
     
  20. ragtek

    ragtek Guest

    That's what i have now:
    Code:
    <div class="section avatarList">
        <div class="secondaryContent">
            <h3>{xen:phrase ragtek_todays_birthdays}: {xen:count $users}</h3>
     <h4 class="minorHeading">People celebrating their Birthday</h4>
           <ul class="followedOnline">
                <xen:foreach loop="$users" value="$user">
                      <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
                </xen:foreach>
            </ul>
        </div>
    </div>
    Only the age calculating is missing, then it's finished^^
     

    Attached Files:

    Veer, Alien and Brogan like this.

Share This Page