MyBB Community Forums

Full Version: Local Themes (interesting idea) must read
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I was trying something interesting. I dont know if anyone did this before. But I am stuck. I had this idea of local themes. I do not want the users of my forum to download the themes/pictures everytime they visit the site. So, I am working on a feature that would enable users to point to pictures in their local drive (like c:\MYBB\IMAGES) and would let them change the pictures anyway they want (they would be the only person to see it anyway)
But I can not point to a local image with <img> or <iframe> tags. Can anyone help please?
<img src="C:\MyBB\images\test.gif" /> should do it...
DrPoodle Wrote:<img src="C:\MyBB\images\test.gif" /> should do it...
You might need to prefix that path with "file:///" (or "file:\\\", ive been using linux so long that ive forgoten which works Toungue)
Nope, neither of these suggestions work, as I have tried already. The local files can be opened if the location is entered to the browser directly. But for some reason img and iframe src does not accept local file addresses.
Any other ideas?
Merging...It should have been in code modifications forum anyway
Indeed. If people were able to post using html they would be able to link images with viruses from their computer. And without a way to remove the actual image (other than removing the image tag) it would be uncontrollable. So basicly its not allowed because of the security risk involved.
I dont see your point Tikitiki, what harm can it do to link to images on your computer? you are not posting them, you are just displaying them. And instead of using cache, just using a predetermined folder...
I dont see any harm in this...
Actually there is more harm in the way it is right now, by uploading to the server, (avatars, signatures etc.) the server is more prone to attacks.... Where as, if everybody keeps the themes, avatars etc. in their computer, they would be the only one to see the theme anyway, thus use the files solely.
Anyone here that knows the answer?
DrPoodle Wrote:<img src="C:\MyBB\images\test.gif" /> should do it...

unfortunately this does not do, neither does the <iframe src="C:\MyBB\images\test.gif" /></iframe>

But if you type file:///C:/mybb/test.gif to the browser directly, it works!

Strange...

PS: NO if you try <iframe src="file:///C:/MyBB/images/test.gif" /></iframe> it still doesnt work... neither the img tag...

Anyone?
It's not allowed for security purposes. Suppose you had an iframe referencing a local HTML file. A script on the main page could reference the contents of that local file. If this was allowed, a hacker could tell it to include the passwd file and be able to try crack some of the passwords (not to mention have a complete list of all users on that system).
Pages: 1 2