38 users online (0 members and 38 guests)  


  Results 1 to 4 of 4
  1. #1
    MarcDK's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2003
    Posts
    2

    url-prefix via CSS?

    Ok, my problem is a bit hard to tell but I hope you can help me:

    I parse a page via the PHP include-command into my webpage.

    http://www.toensing.com/ao/member.php

    But I have no influence to the included page. Th eonly thing I can change is teh CSS-File.

    The result is, as you can see that all elements from that page have relative-paths and so the link in the table do not work.

    And now my question:

    Is it possible to include a url-prefix VIA CSS so that the links work?

    Something like:


    A.link
    }
    url-prefix: http://www.........
    }



    Does anyone have an idea?

    I hope I receive a reply as soon as possible.

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Not really.

    CSS is for styling, not for content. You best bet would be to use PHP to implement a url system. Maybe setting a $root_dir variable in the inluded file and prefixing your links that way.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    MarcDK's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2003
    Posts
    2
    The problem is: THe only thing I can change is the CSS file.

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Then your pretty stuck.

    Your best bet would be to speak to the person who has control of the 'included' page.

    Alternatively - look up the function ereg_replace, with that you can use file() to get the page data in an array, then use ereg_replace to change all the wrong urls to the correct ones, then output the result on your page.

    That will do it. if you get stuck, post back. Be glad to help.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread