B
Blueprintβ€’9mo ago
gmrrh

Tutorial: Add a new Button to the nebula sidebar

Important files to add a new sidebar button in nebula: /src/views/sidebar/content.blade.php /src/views/wrapper/script.blade.php
public/editor/edit/sidebar.php client/wrapper.blade.php Its really just copying the code of the alredy existing buttons and replacing all variable names Did 5 buttons without ANY PHP knowledge in ~1h So it's really not hard and stop writing to Emma about it.
No description
96 Replies
ImAxolotlicek
ImAxolotlicekβ€’9mo ago
Hello, I'm trying to do it, where is the main folder should I just do nano /src/views/sidebar/content.blade.php for example in /var/www/pterodactyl or where? Because when I do it in /var/www/pterodactyl nothing pops up from these files that you provided...
gmrrh
gmrrhOPβ€’9mo ago
The nebula.blueprint file is a renamed .zip file. So decompress it and in there you have the files
ImAxolotlicek
ImAxolotlicekβ€’9mo ago
And when I alredy have it installed can I somehow just edit it?
gmrrh
gmrrhOPβ€’9mo ago
Unarchive, edit, archive again, and install
ImAxolotlicek
ImAxolotlicekβ€’9mo ago
okay, but the config from nebula designer will reset, wouldn't it?
gmrrh
gmrrhOPβ€’9mo ago
No
ImAxolotlicek
ImAxolotlicekβ€’9mo ago
It's saved in DB?
SloudPL
SloudPLβ€’9mo ago
this tutorial is useful thank you gmrrh i think yes when i was doing reinstall it automaticly took from somewhere my old config
Emma
Emmaβ€’9mo ago
Nebula saves all of it's settings in the Pterodactyl database.
DracoFAAD v2
DracoFAAD v2β€’9mo ago
can a plugin add it tho πŸ€”
Emma
Emmaβ€’9mo ago
extensions are not supposed to edit each other, thats considered out-of-scope
DracoFAAD v2
DracoFAAD v2β€’9mo ago
Thanks for the clarification!
EinfachEmer
EinfachEmerβ€’9mo ago
Hey, it says after I try to install the modified nebula "22:58:48 FATAL: Extension configuration file not found or detected.", I renamed the .blueprint to .zip, unpacked it, changed all the things above, compressed it to .zip and changed the name to .blueprint is there anything wrong from my side?
gmrrh
gmrrhOPβ€’9mo ago
You need to compress the files not the folder @EinfachEmer
EinfachEmer
EinfachEmerβ€’9mo ago
1 sec i think this was such an 5IQ move thank you so much @gmrrh i didnt think twice I guess i made a mistake, SERVER ERROR 500 now xD
gmrrh
gmrrhOPβ€’9mo ago
Maybe you can find out why in the log.
EinfachEmer
EinfachEmerβ€’9mo ago
I guess im only too dumb to add th extra buttons
gmrrh
gmrrhOPβ€’9mo ago
Komm Privat, kann dir wahrscheinlich besser helfen
EinfachEmer
EinfachEmerβ€’9mo ago
hab added
n9kas
n9kasβ€’8mo ago
were the icons
Golli
Golliβ€’8mo ago
Kannst du mir bitte auch bei Gelegenheit helfen? Oh wollte nicht pingen, tut mir leid
CodeExplorerX
CodeExplorerXβ€’8mo ago
how can i make another button like "More" with the same list of elements but a little bit sorted. i want to display some additions in a separate button "Minecraft"
Sarthak
Sarthakβ€’8mo ago
literally by just modifying the code
CodeExplorerX
CodeExplorerXβ€’8mo ago
Here is the block with the code: <!-- Item: More --> <div class="tooltip-toggle"> <span class="tooltip">More</span> <button data-tippy-content="More" style="display:none" id="sidebarAccountMore" class="sidebarButton"> @if($n_sidebar_account_more== "" || $n_sidebar_full == "1") <i class="sidebarIcon {{ $__account_more }}"></i> @else <img class="customicon" src="{{ $n_sidebar_account_more }}"></img> @endif @if($n_sidebar_full == "1")<span class="wideSidebarSpan" style="color: var(--sidebarPrimary)">More</span>@endif </button> </div> @endif In the photo I attached any mentions of "account_more". I assumed that the list was stored in the database dbGet('nebula', 'sidebar_account_more'). But there is no list there at all. What should be changed?
No description
No description
Emma
Emmaβ€’8mo ago
These are used for getting custom sidebar icons working. Basically unneeded for custom sidebar buttons.
CodeExplorerX
CodeExplorerXβ€’8mo ago
Where then are the elements of the list stored that appear when you click on more?
Emma
Emmaβ€’8mo ago
Elements of the list are read from Pterodactyl's navigation bar and added to the more menu when you click on it.
CodeExplorerX
CodeExplorerXβ€’8mo ago
but they are stored in some variable, right?πŸ˜… So that later they could be sorted somehow and the necessary ones could be displayed, and not all that are thereπŸ˜…
Emma
Emmaβ€’8mo ago
they aren't, hence why adding them to the sidebar has not been implemented yet nebula has to figure out everything on its own
CodeExplorerX
CodeExplorerXβ€’8mo ago
that is, for now it will be extremely difficult to implement what I want due to the lack of the mechanism for saving the list? If I understood everything correctly, will there be such an opportunity in the future?
Emma
Emmaβ€’8mo ago
You can manually add items to the list by editing the source code. There will probably someday be a feature for adding items to the sidebar directly We've got other things to iron out first.
CodeExplorerX
CodeExplorerXβ€’8mo ago
Got it, thank you very much for your help!
Emma
Emmaβ€’8mo ago
(please do not share large portions of nebula sourcecode)
gmrrh
gmrrhOPβ€’8mo ago
Klar, schreibe mir einfach
CodeExplorerX
CodeExplorerXβ€’8mo ago
And if possible, could you help me too? I wrote to you, but your profile is private
Zuetlau
Zuetlauβ€’7mo ago
follow this to a t and didn't work modifying those files
gmrrh
gmrrhOPβ€’7mo ago
The guide works with the latest nebula version... So its an error on your side
Zuetlau
Zuetlauβ€’7mo ago
@gmrrhif I send you what I added into the files might you be able to tell me where I went wrong? also is there a way to display a logo at the top of the sidebar as well
Emma
Emmaβ€’7mo ago
That's a builtin Nebula setting
Zuetlau
Zuetlauβ€’7mo ago
Hmm I haven't discovered that yet Only on the login page
Emma
Emmaβ€’7mo ago
You'll also need to edit /public/libraries/currentPage.js I think Are you using the thin or wide sidebar
Zuetlau
Zuetlauβ€’7mo ago
Wide
Zuetlau
Zuetlauβ€’7mo ago
No description
Emma
Emmaβ€’7mo ago
Take a peek in Designer > Sidebar and click on the + next to the "Sidebar type" option
Zuetlau
Zuetlauβ€’7mo ago
its there, I appreciate it, didnt catch that one hiding
Emma
Emmaβ€’7mo ago
Alrighty!
Zuetlau
Zuetlauβ€’7mo ago
gunna go mess with this some more now appreciate the help!
Emma
Emmaβ€’7mo ago
No problem! ^-^
Zuetlau
Zuetlauβ€’7mo ago
yay it shows, but doesnt follow format or have icon ;P and for the next question if I may ask, how do I go about linking that to a actual page with a container
No description
gmrrh
gmrrhOPβ€’7mo ago
Dont share the code in public πŸ˜…
Zuetlau
Zuetlauβ€’7mo ago
this wasn't a large portion...
No description
Zuetlau
Zuetlauβ€’7mo ago
even Emma didnt comment on the code being shown like she did with the other person. I kept the code shown minimal and to the point
Emma
Emmaβ€’7mo ago
mhm
Phedona
Phedonaβ€’6mo ago
Samma Freundchen hier nur Englisch
gmrrh
gmrrhOPβ€’6mo ago
Reagieren auf eine ewig alte Nachricht? Das gibt ne Anzeige
Phedona
Phedonaβ€’6mo ago
Hab's zu spΓ€t gemerkt da war meine Ansage schon raus xD
NoPantsMcDance | suhosting.net
My question is I've added a new button "VS Mods" and when I click it it takes me to the correct page, however as you can see in the screenshot the sidebar highlights the "More" button, how can I fix this?
No description
mrbeeenopro
mrbeeenoproβ€’6mo ago
Disable image search on nebuda design
mrbeeenopro
mrbeeenoproβ€’6mo ago
No description
NoPantsMcDance | suhosting.net
So this removed the more button but doesn't highlight the VsMods button still.
Emma
Emmaβ€’6mo ago
You'll need to add it to public/libraries/currentPage.js as well. After that you should be good to go
NoPantsMcDance | suhosting.net
ahh that makes sense, tyvm!
Emma
Emmaβ€’6mo ago
No problem!!
Indie
Indieβ€’6mo ago
are you able to remove buttons? I removed some and added some and now I'm getting 500 server error
Dragon Sam
Dragon Samβ€’6mo ago
@Emma (Sorry for the ping just really needed some help.) How can I add catagorys for the buttons? I tried to do it myself but all the buttons just disappeared. Kind of like the image I am replying to but not a button just text.
Emma
Emmaβ€’6mo ago
Look at how the dividers are implemented. You'll need to add <div>s with <span>s inside of them while inside of the sidebarCategory(?) element-thing.
Dragon Sam
Dragon Samβ€’6mo ago
What files would that be in if you had to guess?
Emma
Emmaβ€’6mo ago
Don't remember the exact location, just the one where the sidebar is. Look for some sidebarButton classes
Dragon Sam
Dragon Samβ€’6mo ago
Alright
Dragon Sam
Dragon Samβ€’6mo ago
I did it, thanks for your help πŸ™‚ Final Result:
No description
Emma
Emmaβ€’6mo ago
awesome ^-^ glad you figured it out!!
Dragon Sam
Dragon Samβ€’6mo ago
Thanks, and for anyone else who want to know go to: /src/views/wrapper/sidebar/content.blade.php and add:
<!-- Catagory: Management -->
@if($n_sidebar_always_visible_buttons == "1")
<div class="sidebarCatagory"></div>
@if($n_sidebar_full == "1")<span style="color: var(--sidebarPrimary); font-size: 22px;"><strong>Management</strong></span>@endif
@endif
<!-- Catagory: Management -->
@if($n_sidebar_always_visible_buttons == "1")
<div class="sidebarCatagory"></div>
@if($n_sidebar_full == "1")<span style="color: var(--sidebarPrimary); font-size: 22px;"><strong>Management</strong></span>@endif
@endif
^^^ That would be for "Management"
mrbeeenopro
mrbeeenoproβ€’6mo ago
Wow look so cool
Dragon Sam
Dragon Samβ€’6mo ago
Thanks πŸ˜„
vaze
vazeβ€’6mo ago
dont have such a file?
Dragon Sam
Dragon Samβ€’6mo ago
I am using the latest version of nebula? If anyone needs help with this you can DM me.
Emma
Emmaβ€’3mo ago
If you need help with this probably best to ask it here^^ If anyone asks you to share your Nebula download, don't share it. Doing so poses a risk of your access being removed from the theme and future updates.
Anthony
Anthonyβ€’3mo ago
hi ye i need help ofc i won't share it πŸ’€
Emma
Emmaβ€’3mo ago
This was more in general
Anthony
Anthonyβ€’3mo ago
im in content.blade.php got two extensiosn installed, Plugin manager and player manager
Emma
Emmaβ€’3mo ago
mhm
Anthony
Anthonyβ€’3mo ago
how do i make them show like a normal link instead of em being in the More link 😭 bru
Emma
Emmaβ€’3mo ago
As mentioned above
No description
Anthony
Anthonyβ€’3mo ago
🀣 k thx
Emma
Emmaβ€’3mo ago
This is currently not a built-in Nebula feature, you are modding the theme, it's not a magic button you can click. There's a chance that this becomes built-in functionality at some point. This requires refactoring a large part of the theme if we were to change this functionality, because introducing a middle ground will keep people asking for more. If you have any specific questions, feel free to ask!!
Anthony
Anthonyβ€’3mo ago
thanks Emma
Jutuz
Jutuzβ€’3w ago
Hi! How can I show specific add-ons based on the server type? For example, if it's a Minecraft server, I want to display the Minecraft add-ons, not the ones for Rust.
gmrrh
gmrrhOPβ€’3w ago
In the Blueprint settings there is a egg specific setting
Jutuz
Jutuzβ€’3w ago
Could you clarify which settings menu you mean? The main Configure Blueprint modal only shows the general flags shown in the image, not settings for individual add-ons.
No description
Jutuz
Jutuzβ€’3w ago
@Emma
Saelman
Saelmanβ€’3w ago
Dont @ people.
Jutuz
Jutuzβ€’3w ago
Oh, I didn't know. I couldn't find any information that pinging is prohibited.
Blueprint
Blueprintβ€’3w ago
Don't do that!
Avoid mentioning staff and/or other members for support.
Sent by prplwtf β€’ byte snippet-ping
gmrrh
gmrrhOPβ€’3w ago
Not this one, in the settings of every addon that you want to show/not to show
Jutuz
Jutuzβ€’3w ago
All of my addons were manually installed in Pterodactyl, they are not Blueprint addons.
gmrrh
gmrrhOPβ€’3w ago
Then they will most likely break the panel sooner or later

Did you find this page helpful?