Changing website logo problem

Posted by OffNet 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Changing website logo problem
March 21, 2017 06:50PM
Hi everyone!

Now i have an image to the Piratebox and installed it and changed the index.html file as i wanted on my raspberry pi

But here is the problem: at some point i cant insert my Logo on to the piratebox
Now what i did was, downloading WinSCP to ssh into the PirateBox files. Now after that, i tried to insert the logo on to the /opt/piratebox/shared/content/img/ folder since my website was there instead and it doesnt work.
I know i can't cause i dont have root permission to do that.

How do i fix it?
Re: Changing website logo problem
March 21, 2017 08:09PM
Hi,
change the permissions of the folder to 777 via ssh access,
sudo chmod a+w  /opt/piratebox/shared/content/img/

Or, lay down a copy of the files to the user alarm's home directory and copy it over to the webfolder later via ssh and
sudo cp <my image> /opt/piratebox/shared/content/img/

best regards Matthias
Re: Changing website logo problem
March 21, 2017 09:42PM
Thank you so much for helping me! You just made my daysmiling smiley
Re: Changing website logo problem
August 29, 2017 01:11PM
So, there's a few index.html files where the option 'files' could be changed to 'downloads'.

Along with /opt/piratebox/ (www and www_content folders within) there is also /mnt/sdshare/share/ (content and shared)
I've managed to edit and save to the pi the four index.html files (in one case, /mnt/sdshare/share/Shared/HEADER.txt) so that they all say 'downloads' instead of 'files'. However when I got to the Home page, I see it say 'downloads' for a split second before reverting right back to 'files'. But on the page with all the files, that option actually says 'downloads' and stays.

What am I missing?
Re: Changing website logo problem
August 29, 2017 02:47PM
Hi,
The places are, close to what your wrote:

/opt/piratebox/www/content -- links to --> /opt/piratebox/share/content
/opt/piratebox/share/Shared/HEADER.txt
+++--->the corresponding template is /opt/piratebox/src/HEADER.txt

/opt/piratebox/www_content is a template folder and is not used during runtime.

For the menubar of /content, you need to adjust the language files for your language or disable the language Javascript. You can find the files in /opt/piratebox/www/content/locales

You can disable the JS multi-language feature with removing

[code=HTML] <script type="text/javascript" src="/content/js/l10n.js"></script>[/code]

Best regards Matthias


This is only my signature.
Re: Changing website logo problem
August 30, 2017 06:37AM
I'll have to look into this in a few hours when I get home.
It's good to know what is and isn't used on the actual piratebox page.
Quote
Matthias
/opt/piratebox/www_content is a template folder and is not used during runtime.
is there any reason for this being left in the install then if it isn't used in the final stage?


As far as removing the javascript line, I'm just going to have to take your word on it for now...I'd like to learn more on javascript though, any good sources on where to start my learning journey?
Re: Changing website logo problem
August 30, 2017 07:04AM
Quote

is there any reason for this being left in the install then if it isn't used in the final stage?
The reason is, that if you end up hitting a wall an the UI does not work anymore during your customizations, you can simply delete the content folder inside the "share" (on OpenWrt on the USB stick).. and during next reboot the a fresh copy of the content folder will be placed in the share folder.
So it is a failsave option for UI modifications.
Is that a good argument from your point of view? :-)

Quote

As far as removing the javascript line, I'm just going to have to take your word on it for now...I'd like to learn more on javascript though, any good sources on where to start my learning journey?
In fact, I am only using that i8n building block/library...and I am a JS noob.
I can recommend [codecombat.com]

best regards Matthias
Re: Changing website logo problem
August 30, 2017 11:58AM
Quote
Matthias
/opt/piratebox/www/content -- links to --> /opt/piratebox/share/content

Looking at /opt/piratebox/www/content in WinSCP it links to /mnt/sdshare/share/content
not sure if that's what you meant

Quote
Matthias
/opt/piratebox/share/Shared/HEADER.txt
+++--->the corresponding template is /opt/piratebox/src/HEADER.txt

So, the folder /opt/piratebox/share/ is actually just a shortcut to /mnt/sdshare/share
what's the point of having a shortcut like that when you could just as easily link the actual folder?


and finally...
Quote
Matthias
For the menubar of /content, you need to adjust the language files for your language or disable the language Javascript. You can find the files in /opt/piratebox/www/content/locales

You can disable the JS multi-language feature with removing

[code=HTML] <script type="text/javascript" src="/content/js/l10n.js"></script>[/code]

just to be sure, I'm removing the <script> part of mnt/sdshare/share/content/index.html correct?
Nevermind, I just commented it out to be safe, and now 'Downloads' displays as an option on the /content/ page.



Edited 1 time(s). Last edit at 08/30/2017 12:11PM by pshock13.
Re: Changing website logo problem
September 02, 2017 08:31PM
Quote

what's the point of having a shortcut like that when you could just as easily link the actual folder?
Depending on the environment a symlink looks exactly like the folder pointed to OR
it looks like a shortcut.

The complete configuration points always to /opt/piratebox/share
If that folder is on the same partition like opt/piratebox , or it is a symlink to a different folder & filesystem or another partition is mounted to /opt/piratebox/share - that makes no further configuration changes needed.