Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Changing websites yourself.

  1. Mar 27, 2005 #1
    Is it possible to replace, lets say, some of the physicsforums icons with my own? Maybe have pf look at cache first, and then replace the images with my own?

    I guess I know it is possible, just is it easy to do? Danke.
  2. jcsd
  3. Mar 27, 2005 #2
    Phew! are you sure You wanna do it!! I mean.. PF is not gonna give u access for that!!
  4. Mar 27, 2005 #3
    Well, you could like redirect all requests to https://www.physicsforums.com/images/ [Broken] to (localhost), by editing the hosts file, set up a webserver on your own computer, download all images from PF and replace whatever ones you want to replace. More like a waste of cpu and memory if you ask me.
    Last edited by a moderator: Apr 21, 2017 at 2:04 PM
  5. Mar 27, 2005 #4
    el-half gave what I think would be the easiest way. However still seems like a pain for little gain. Our graphics aren't that bad are they? :tongue2:
    Last edited: Mar 27, 2005
  6. Mar 27, 2005 #5
    Hmm looks like a pain I guess.

    The graphics are not bad, I have gotten used to them, but I of course would like to be able to change them, or anything, to how I want it to look.

    One of the ways I was thinking was to have the website code downloaded, then edit all instances, of say http://www.website.com/images/image.gif [Broken] to file:///home/matt/images/image.gif
    Last edited by a moderator: Apr 21, 2017 at 2:05 PM
  7. Mar 27, 2005 #6
    I think you can change websites with firefox.
  8. Mar 27, 2005 #7
    I was thinking about that too. But I only know how to remove objects with firefox, not change or add, gonna do a quick search and see what comes up. Do you have any more info about that?
  9. Mar 27, 2005 #8


    User Avatar
    Staff Emeritus

    I know there is a firefox extension that does this. I read about it not too long ago. I'll have to look it up.

    [edit] I found it!!

    Last edited: Mar 27, 2005
  10. Mar 27, 2005 #9
    Thanks dduardo, checking it right now :smile:

    edit... Wow! That extension is awesome! I have not changed any images on sites yet, but they have some really cool, and useful, scripts!
    Last edited: Mar 27, 2005
  11. Mar 27, 2005 #10
    Ok I can change images, but I only know how to change ones that have an id. How do I select an image that just has a source?

    I used this to change images with an id, but many sites do not have ids for their images, any ideas?

    Code (Text):
    (function() {
    document.getElementById('ID of image').src="location of image"
  12. Mar 27, 2005 #11


    User Avatar
    Staff Emeritus

    Your making it more difficult than it has to be. You can do something like this:

    Code (Text):

    ChangeReplyButtons() {
    for (var i=0; i < document.images.length; i++) {
    if(document.images[i].src=="images/buttons/reply.gif") {
    document.images[i].src="/home/david/myreply.gif" ;
    You can add more if statements to change all the buttons. Isn't Javascript/DOM nice. I suggest you use the DOM inspector that comes with Firefox to help you.
    Last edited: Mar 27, 2005
  13. Mar 27, 2005 #12
    Thanks. I have the dom inspector installed, I guess the next step is to learn how to use it :smile:

    Also, I am assuming from your response that I do not have to enter "file:///" before "home."
  14. Mar 27, 2005 #13


    User Avatar
    Staff Emeritus

    You may or may not have to put file:///blah/blah/blah. When I type /home/dduardo into the browser it automatically resolves to file:///home/dduardo. Try it and see. Also remember that i'm on a linux system so on windows I don't know how this would work.
  15. Mar 27, 2005 #14
    Well I am on linux too :smile:

    It does not when I enter a specific location of an image that has dashes in the name, it may be something else.

    edit... and it does not seem to be working :yuck:

    This is mines.user.js
    Code (Text):

    ChangeMinesweeperPics() {
    for (var i=0; i < document.images.length; i++) {
    if(document.images[i].src=="file:///home/matt/minesweeper-beg-5.png") {
    document.images[i].src="file:///home/matt/minesweeper-int-33.png" ;
    This is minetest.html
    Code (Text):

    <img src="file:///home/matt/minesweeper-beg-5.png" />
    Last edited: Mar 27, 2005
  16. Mar 27, 2005 #15
    It may be me, not even my yahoo script is working now :mad:
  17. Mar 27, 2005 #16


    User Avatar
    Staff Emeritus

    I just created a simple script that replaces an image and it works just fine. Here is my code:

    Code (Text):

    for (var i=0; i < document.images.length; i++) {
    if(document.images[i].src=="file:///home/dduardo/flowchart.bmp") {
    document.images[i].src="sales_tax.png" ;
    Code (Text):

    <img src="flowchart.bmp">
    <img src="sales_tax.png">
    [edit]Actually, I just realized why your script doesn't work. Your just declaring the function but not actually running it. :rofl: :rofl:
  18. Mar 27, 2005 #17
    ROFL. You were right, it works now. Thanks
  19. Mar 27, 2005 #18
  20. Mar 27, 2005 #19
    Ok I am beginning to think that this will not work. I am only able to replace the images with other images on the pf website.
  21. Mar 28, 2005 #20


    User Avatar
    Staff Emeritus

    Are you sure?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Changing websites yourself.
  1. Website Feedback (Replies: 6)

  2. Indexing a website (Replies: 13)

  3. Developing a website (Replies: 8)

  4. Storage Website (Replies: 18)

  5. Is website a software? (Replies: 4)