-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translation of duente custom menus #3
Comments
Correct |
Or you mean you couldn't find this register button in your html? |
SO if I get you right, the translation lives in the template? will I be able to switch between english and french after that? |
Some of those buttons are hard coded indeed. Because there is no language text available in mybb I could re-use. Meaning all the template changes are final and once changed they are that language you now translating to. |
I fixed the issue by using MyBB global variables! I am leaving it here :) I will work further on the solution and make a later pull request to your repo if you agree
|
I was able to create translations for the "Messages" drop-down menu, but it involves modifying the global.lang.php file... The variables in this sub-menu are used inside the scope of the usercp context and can't be reached by the navbar... @Danger89, I need you opinion on that: Those menu items were not meant to be called from outside the usercp context, and they mostly all open the same view, with filters. Don't you think we should simply remove the drop-down for safety reasons? Same goes for the user drop-down... some of the options in the theme are not meant to be accessed from the navbar (and could override some permissions on the forum even!) |
I did a lot of work on the template today, and even fixed some bugs (my php/css is a little rusty, but I managed to make it work!)
Let me know what you think... I still think the Private Messages menu should not be a menu, instead just a link Tomorrow, I am going to try to make the "0 unread" background transparent, unless the amount is 1 or more |
That looks very good. You are free to export the theme from mybb incl stylesheet + template. Which I will use to create a new new version! |
I was inspired by @Normand-Nadon and experimented a little bit. :) This was the result: changes: header_welcomeblock_member <span class="hide" style="color:#fff;"> {$lang->welcome_back} </span>
<span class="dropdown">
<a class="white" data-toggle="dropdown" href="#"><font color="#fff"><i class="fa fa-envelope-o fa-2x" aria-hidden="true"></i></font></a>
<a id="pm_notification" href="private.php?fid=1" title="Ungelesene Nachrichten"> {$mybb->user['pms_unread']}</a>
<ul class="dropdown-menu bullet pull-center notification animated fadeIn faster" role="menu" aria-labelledby="dLabel">
<li role="presentation"><a href="private.php?fid=1"> Posteingang </a> </li>
<li role="presentation"><a href="private.php?action=send"> Neue Nachricht </a></li>
<li role="presentation"><a href="private.php?fid=2"> Gesendeten Nachrichten </a></li>
<li role="presentation"><a href="private.php?action=tracking"> Nachrichten verfolgen </a></li>
</ul>
</span>
<span class="dropdown">
<a class="header_avatar" data-toggle="dropdown" href="#"><font color="#fff"><img style="vertical-align: bottom; border-radius: 55%; transition:all 0.3s ease;" src="{$mybb->user['avatar']}" height="35px" width="35px" class="miniav"/></font></a>
<ul class="dropdown-menu bullet pull-center notification animated fadeIn faster" role="menu" aria-labelledby="dLabel">
<li role="presentation"><a href="{$mybb->settings['bburl']}/usercp.php"> Benutzer-CP </a></li>
<li role="presentation"><a href="{$mybb->settings['bburl']}/usercp.php?action=profile"> Profil bearbeiten </a></li>
<li role="presentation"><a href="{$mybb->settings['bburl']}/usercp.php?action=options"> Optionen bearbeiten </a></li>
<li role="presentation"><a href="{$mybb->settings['bburl']}/usercp.php?action=editsig"> Signatur bearbeiten </a></li>
<li role="presentation"><a href="{$mybb->settings['bburl']}/usercp.php?action=editlists"> Freundesliste </a></li>
<li role="presentation"><a href="{$mybb->settings['bburl']}/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}"> Ausloggen </a></li>
{$modcplink}
{$admincplink}
</ul>
</span> duendev3.css #pm_notification {
top: -5px;
left: 100%;
transform: translateX(-50%);
position: absolute;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #dc3545;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
} and .open>.dropdown-menu {
margin-top: 5px;
box-shadow: rgba(50,50,93,0.25) 0px 2px 5px -1px,rgba(0,0,0,0.3) 0px 1px 3px -1px;
left: 50%;
transform: translateX(-50%);
display: inline-block;
} @Normand-Nadon were you able to solve the problem with the transparent background when there are "0 messages"? |
@sakis-tech I wish to finish it during the holidays though... I will send the results. I like your envelope thingy... where did you get it? is it already in the template? |
@sakis-tech This is how I fixed it on my version: <span class="dropdown">
<a class="white" data-toggle="dropdown" href="#"><font color="#fff"><strong> {$lang->welcome_pms} </strong> <i style="font-size: 10px; vertical-align: middle;" class="fa fa-chevron-down fa-fw"></i></font></a>
<ul class="dropdown-menu bullet pull-right notification animated fadeIn faster" role="menu" aria-labelledby="dLabel">
<li role="presentation"><a href="private.php?fid=1"> {$lang->duente_pm_inbox} </a> </li>
<li role="presentation"><a href="private.php?action=send"> {$lang->duente_pm_send} </a></li>
<li role="presentation"><a href="private.php?fid=2"> {$lang->duente_pm_sent} </a></li>
<li role="presentation"><a href="private.php?action=tracking"> {$lang->duente_pm_track} </a></li>
</ul>
</span> As you can see, it involved custom translations, and I don't like it... For the CP menu, here is what I've got, and it uses all stock MyBB translations. <span class="dropdown">
<a class="white" data-toggle="dropdown" href="#"><img style="border-radius: 55%; transition:all 0.3s ease; margin-top: -2px;" src="{$mybb->user['avatar']}" onerror="this.onerror=null;this.src='{$mybb->settings['bburl']}/images/default-avatar.png';" height="25px" align="middle" class="miniav"/></i></a>
<ul class="dropdown-menu bullet pull-right notification animated fadeIn faster" role="menu" aria-labelledby="dLabel">
{$usercplink}
<li role="presentation"><a href="{$mybb->settings['bburl']}/usercp.php?action=profile"> {$lang->postbit_button_profile} </a></li>
<li role="presentation"><a href="{$mybb->settings['bburl']}/usercp.php?action=editlists"> {$lang->welcome_open_buddy_list} </a></li>
{$modcplink}
{$admincplink}
<hr style="width:90%; background-color:#dddddd">
<li role="presentation"><a href="{$mybb->settings['bburl']}/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}"> {$lang->welcome_logout} </a></li>
</ul>
</span> We will get there! |
@Normand-Nadon Again, it's GPL licensed, could you share the latest changes with me so other people can benefit from this (once you think you are ready)? |
Sorry for the delay @Danger89 I think I will simply remove the out-of-context links to the mailbox and call it a day fow now! |
There, I merged my ideas with those from @sakis-tech and ended-up with this... It is still a WIP, but I hope you like it too! :) What was achieved:
|
Thanks! I will definitely take a look at this! And if this is validated, I will create a new release out of this, so everybody can benefit from the improvements. |
So, did you have time to look at it? Is it worthy of making it to the main branch? |
Yea, so you did additional changes as well 😢 . Like changing the background color from Then, I need to do the same for the templates. |
Do you provide a way to translate words used in your menus (as they are not covered by the base template)
Thank you!
The text was updated successfully, but these errors were encountered: