1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can the files be accessed from outside

Discussion in 'XenForo Development Discussions' started by unicorn6183, Apr 5, 2013.

  1. unicorn6183

    unicorn6183 New Member

    Hi to everyone...

    I have to connect mappingsupport website with xenforo...that is , this is i have to load map accouding to the file which the user uploads,

    The file will be of types like gpx, kml , kmz & tpo .

    So when the user uploads any of these files, i have load the file in an iframe by connecting mappingsupport website..

    eg...

    http://www.mappingsupport.com/p/gmap4.php?q=http://domain.org/gps/SuperiorNationalForest.kml

    so this will loads the the map in iframe...

    But all the files are saved in DATA files...so how can i access the file from outside...

    Please help me ASAP....
     
  2. AndyB

    AndyB Well-Known Member

    Create a file called attachment.php and add the following. This example is incomplete, but the important part is shown.

    Code:
    header("Content-Type: image/jpg"); // <- change this as needed
     
    fpassthru($fp);  // <-- $fp is the full path to the attach.data file
    

    Now you can call the attachment.php file from your html location:

    Code:
    <img src="http://www.mysite.com/attachment.php?attach=' . $attachmentid . '">';
    
     
  3. unicorn6183

    unicorn6183 New Member

    Thank you...but can we do without the URL. ?

    That is if the user uploads the .gpx file, it should automatically connects the mappingsupport website and loads the map in iframe....

    Can this possible?
     
  4. AndyB

    AndyB Well-Known Member

    Everything is possible.

    In order to help I would have to understand exactly what you're wanting to do. So far all I know is that a member attaches a gpx or similar file. Are you wanting to auto-insert text into the message with the appropriate links?
     
  5. unicorn6183

    unicorn6183 New Member

    No...i will explain clearly...

    The user who replies to thread is uploading a gpx file. so normally, in the thread, we will find the file which we uploaded. Instead of just showing the file in the thread, The file should be transformed into a map which will connects mappingsupport website..

    For example..

    http://www.mappingsupport.com/p/gma...ads/superiornationalforest.kml_5212032813.kml

    See the above link, You will be shown a map.

    So i can use bbcode URL Rewriter addon to convert the above link to load a map in the iframe in the thread.

    But instead of giving this link, i just want to upload the .gpx file and it should automatically shown as map in iframe as it works by using link with the help URL Rewriter addon.

    How should i do this?

    I hope this will be clearer about my thought...

    Pls help me....even this is not clear to you , i can explain more in detail....
     
  6. unicorn6183

    unicorn6183 New Member

    hi anybody pls give me the answer........
     
  7. unicorn6183

    unicorn6183 New Member

    Hi to everyone...

    I have to connect mappingsupport website with xenforo...that is , this is i have to load map accouding to the file which the user uploads,

    The file will be of types like gpx, kml , kmz & tpo .

    So when the user uploads any of these files, i have load the file in an iframe by connecting mappingsupport website..

    eg...

    http://www.mappingsupport.com/p/gmap4.php?q=http://domain.org/gps/SuperiorNationalForest.kml

    so this will loads the the map in iframe...

    But all the files are saved in DATA files...so how can i access the file from outside...

    Let me explain clearly...

    i will explain clearly...

    The user who replies to thread is uploading a gpx file. so normally, in the thread, we will find the file which we uploaded. Instead of just showing the file in the thread, The file should be transformed into a map which will connects mappingsupport website.

    For example..

    http://www.mappingsupport.com/p/gma...ads/superiornationalforest.kml_5212032813.kml

    See the above link, You will be shown a map.

    So i can use bbcode URL Rewriter addon to convert the above link to load a map in the iframe in the thread.

    But instead of giving this link, i just want to upload the .gpx file and it should automatically shown as map in iframe as it works by using link with the help URL Rewriter addon.

    How should i do this?

    I hope this will be clearer about my thought...

    Pls help me....even this is not clear to you , i can explain more in detail....
     

Share This Page