Results 1 to 9 of 9

Thread: Does anyone know this code?

  1. #1
    Join Date
    Apr 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Does anyone know this code?

    I've noticed that if I go to websites such as Wikipedia or eHow and I copy and paste content from the website to a Word Document, it comes with an extra line showing where the content was from (link, copyright info, etc)

    I was wondering what that code is called and if anyone knows how to write it?

    Help is greatly appreciated!

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    I've never noticed this, and I just tried to see it by copying a page from Wikipedia and nothing appears there that wasn't in the original document. Note that formatting is lost so some items may appear larger than before, but otherwise it's not doing anything special (as far as I see).

    If you can give us more information or a specific example, we might be able to explain more.

    But if there is something that's showing up, it's probably because it's hidden when viewing as HTML but no longer properly hidden in the other format: so it seems to magically appear. If you can find the text, then look in the source code (search it for those words if you want), and you can see what the code behind it is.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    I've never looked, but it is likely something as simple as a print stylesheet.

  4. #4
    Join Date
    Apr 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Weird, I had it a couple of times on Wikipedia... But here's how I got it from eHow

    I was copying info from this page: http://www.ehow.com/how_5889136_buil...ewsletter.html

    and when I pasted the headline and the first paragraph on a Word doc, it came up like this:

    How to Build an Email Newsletter
    This article was created by a professional writer and edited by experienced copy editors, both qualified members of the Demand Media Studios community. All articles go through an editorial process that includes subject matter guidelines, plagiarism review, fact-checking, and other steps in an effort to provide reliable information. By walkingbanana, eHow User

    Build an Email Newsletter
    So you want to build a successful email newsletter? HTML email has the reputation (often well deserved) of being a horrible design medium.

    The mere mention of it sends some designers into physical shock (try it if you ever get stuck in a tedious conversation about XHTML vs. HTML 5). The truth remains that businesses and individuals the world over send and receive email in HTML format by default every day, and many of them genuinely prefer it to plain text. So designers have a choice. We can stick our fingers in our ears, cover our eyes and hope it all goes away or we can learn to make the best of a challenging design medium and produce something that raises the quality level a bit.

    Read more: How to Build an Email Newsletter | eHow.com http://www.ehow.com/how_5889136_buil...#ixzz1J5OMxmWl


    When I pasted the information, the writer's copyright information appeared after the headline, which is not visible on the website. Also, after the first paragraph appears a "Read more" line with the link to the original webpage.

    I've looked through the source code but can't find how this is generated (unless I missed something). How is this done?

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    It seems like it's something about a print stylesheet as traq said, or something like a print stylesheet. (I'm not quite sure how it's done.)

    The div #AuthorProfile is set to display:none; so it's hideen. But when you copy it, it shows up. I'm not sure on that second half, why it shows up when pasted, but that's a start.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. The Following User Says Thank You to djr33 For This Useful Post:

    Kitzumi (04-11-2011)

  7. #6
    Join Date
    Apr 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Okay, thanks for your help,

    Does anyone know any good reasources for looking up print stylesheets?

  8. #7
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    you might use physical measurements (i.e., in [inches] or pt [points] instead of ems or pixels), but they're basically the same as any other stylesheet.

    HTML Code:
    <link rel="stylesheet" type="text/css" href="path/to/print.css" media="print">

  9. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can also choose to show/hide certain things or move things around. This makes sense when you have a complicated layout that would look strange on paper. You can move the content around, hide some of the navigation, and possibly remove some graphics like busy background images that will take a lot of extra ink.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #9
    Join Date
    Apr 2011
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Well, the main reason I was interested in this code was so that I could code it in a way so that if anyone copy/pasted anything from my site it would show the title of the website along with the link to the webpage.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •