sm0k1nggnu  [ Profile ]

Sort by: Date / Title /

  1. 9 years ago
    1. <html>
    2. <head>
    3. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    4.  
    5. <title>Blog Posts</title>
    6. <style type="text/css">
    7. <!--
    8. .rss{
    9. width:200px;
    10. display:block;
    11. float:left;}
    12.  
    13. .rss h3 a{
    14. color:#89b81d}
    15.  
    16. -->
    17. </style>
    18. </head>
    19. <body>
    20. <h2>Foo</h2>
    21. <?php
    22.  
    23. $insideitem = false;
    24. $tag = "";
    25. $title = "";
    26. $description = "";
    27. $link = "";
    28. $i = 0;
    29.  
    30.  
    31. function startElement($parser, $name, $attrs) {
    32.         global $insideitem, $tag, $title, $description, $link;
    33.         if ($insideitem) {
    34.                 $tag = $name;
    35.         } elseif ($name == "ITEM") {
    36.                 $insideitem = true;
    37.         }
    38. }
    39.  
    40. function endElement($parser, $name) {
    41.         global $insideitem, $tag, $title, $description, $link,$i;
    42.        
    43.                 if ($name == "ITEM" && $i < 1) {
    44.                 printf("<div class="rss"><h3 class="rssHeader"><a href='%s'>%s</a></h3>", trim($link),utf8_decode(htmlspecialchars(trim($title))));
    45.                
    46.                 //Ohne Beschränkung
    47.                 //printf("<p>%s</p></div>",utf8_decode(htmlspecialchars(trim($description))));
    48.                
    49.                 //Mit Beschränkung
    50.                 $short = explode("n", wordwrap($description, 150, "n")); //Ausgabe auf n Zeichen kürzen
    51.                 printf("<p>%s ...</p><a href='".trim($link)."'>mehr</a></div>",htmlspecialchars(trim($short[0])));
    52.                
    53.                 $title = "";
    54.                 $description = "";
    55.                 $link = "";
    56.                 $insideitem = false;
    57.                 $i++;
    58.         }
    59. }
    60.  
    61.  
    62. function characterData($parser, $data) {
    63.         global $insideitem, $tag, $title, $description, $link;
    64.         if ($insideitem) {
    65.         switch ($tag) {
    66.                 case "TITLE":
    67.                 $title .= $data;
    68.                 break;
    69.                 case "DESCRIPTION":
    70.                 $description .= $data;
    71.                 break;
    72.                 case "LINK":
    73.                 $link .= $data;
    74.                 break;
    75.         }
    76.         }
    77. }
    78.  
    79. $xml_parser = xml_parser_create();
    80. xml_set_element_handler($xml_parser, "startElement", "endElement");
    81. xml_set_character_data_handler($xml_parser, "characterData");
    82. $fp = fopen("http://blogurl.com/rss.php","r")
    83.         or die("Error reading RSS data.");
    84. while ($data = fread($fp, 4096))
    85.         xml_parse($xml_parser, $data, feof($fp))
    86.                 or die(sprintf("XML error: %s at line %d",
    87.                         xml_error_string(xml_get_error_code($xml_parser)),
    88.                         xml_get_current_line_number($xml_parser)));
    89. fclose($fp);
    90. xml_parser_free($xml_parser);
    91.  
    92. ?>
    93. </body>
    94. </html>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2054"></script>
  2. 9 years ago
    1. <?php
    2.         $useragent = $_SERVER['HTTP_USER_AGENT'];
    3.  
    4.    
    5. if( eregi("(msie) ([6]{1})",$useragent) )
    6. {print "IE 8.0 -> do something";}
    7.  
    8. else
    9. { } 
    10. ?>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1706"></script>
  3. 10 years ago
    1. #menu ul li:before{
    2.  content: "\00BB \0020";
    3.  list-style-type: none;
    4.  list-style-image: none;
    5. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1691"></script>
  4. sponsorised links
  5. 10 years ago
    1. <html>
    2. <head>
    3. <style type="text/css"><!--
    4. body{background:url('image.jpg') no-repeat}
    5.  
    6. #wrap{
    7.         margin:0;
    8.         padding:0;
    9.         width:100%;
    10.         height:100%;
    11.         background:url('image2.jpg') no-repeat;
    12.         }
    13.  
    14. //--></style>
    15.  
    16. </head>
    17. <body>
    18. <div id="wrap">
    19. hier alles andere
    20. </div>
    21. </body>
    22. </html>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1652"></script>
  6. 10 years ago
    1. <!--
    2. These hover controls can be achieved with some simple CSS code, without any JavaScript. Simply style the <div> with the controls when its parent <div> is in a hover state. Here’s the code to hide and show the controls (using a <div> with the class “controls” inside a <div> with the class “message”):
    3. -->
    4.  
    5. .message .controls { display: none; }
    6. .message:hover .controls { display: block; }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1396"></script>
  7. 10 years ago
    1. include "/inc/config.php";
    2. error_reporting(E_ALL ^ E_NOTICE);
    3.  
    4. $sql ="INSERT INTO dvd
    5.                      (column_name1,column_name2)
    6.           VALUES
    7.                      ('$value1','$value2')";
    8.  
    9.         $result = mysql_query($sql) OR die(mysql_error());
    10.         print_r($sql);
    11.  
    12.  
    13. #############################################
    14. ################config.php####################
    15.  
    16.     error_reporting(E_ALL);
    17.  
    18.     define('MYSQL_HOST',     'localhost');
    19.     define('MYSQL_USER',     'username');
    20.     define('MYSQL_PASS',     'password');
    21.     define('MYSQL_DATABASE', 'database_name');
    22.     $db_link = mysql_connect(MYSQL_HOST, MYSQL_USER,MYSQL_PASS);
    23.    $db = mysql_select_db("database_name");
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1276"></script>
  8. 10 years ago
    1. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    2.  
    3.     * Filename: print.css
    4.     * Version: 0.0.0 (200x-mm-dd)
    5.     * Website: http://www.site.de
    6.     * Author: Author Name
    7.     * Description: Print Layout for WordPress Standard Theme
    8.  
    9.     == INDEX: ===================================
    10.         _general : general definitions and resets
    11.         _special wp tags :
    12.         ============================================
    13.        
    14.         == CHANGES =================================
    15.         0.0.0 -
    16.         ============================================
    17. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
    18.  
    19.  
    20. /* _general
    21. ==========================================*/
    22.  
    23.  
    24. #header, #respond, #footer, #commentform, #headerimg, a#tooCool, #searchform, #s, #submit, #sidebar, #wp-calendar {
    25.         display: none;
    26. }
    27.  
    28. #respond p, #comment p, #commentform p {
    29.         display: none;
    30. }
    31.  
    32. select, input, textarea, ckeckbox, img, dd {
    33.         display: none;
    34. }
    35.  
    36. .navigation, .postmetadata, .subscribe {
    37.         display: none;
    38. }
    39.  
    40. body {
    41.   text-align: left;
    42.   margin: 0;
    43.   padding: 0;
    44.   font: 12pt Garamond, Palatino, "Times New Roman", Times, serif;
    45.   color: black;
    46.   background: transparent;
    47. }
    48.  
    49. h1, h2, h3, h4, h5, h6 {
    50.         font-weight: bold;
    51.   margin: .75em 0 .5em 0;
    52.   text-align: left;
    53.   page-break-after: avoid;
    54. }
    55.  
    56. p {
    57.   margin: .5em;
    58. }
    59.  
    60. a, a:visited, a:hover, a:visited:hover {
    61.   color: darkolivegreen;
    62.   background: transparent;
    63.   text-decoration: none;
    64. }
    65.  
    66. a[href]:after {
    67.         content:" (link to: <"attr(href)">) ";
    68.         color: lightgrey;
    69.         background-color:inherit;
    70.         font-style:italic;
    71.         font-size: 9pt;
    72. }
    73.  
    74. *[name]:after {
    75.         content:" [#"attr(name)"]";
    76.         color: lightgrey;
    77.         background-color:inherit;
    78.         font-style:italic;
    79.         font-size: .7em;
    80. }
    81.  
    82. *[title]:after {
    83.         content:" ("attr(title)")";
    84.         color: lightgrey;
    85.         background-color:inherit;
    86.         font-style:italic;
    87.         font-size: .7em;
    88. }
    89.  
    90. *[acronym]:after {
    91.         content:" ("attr(acronym)")";
    92.         color: lightgrey;
    93.         background-color:inherit;
    94.         font-style:italic;
    95.         font-size: .7em;
    96. }
    97.  
    98. *[cite]:after {
    99.         content:close-quote" (Source: "attr(cite)")";
    100.         font-size: .7em;
    101. }
    102.  
    103. * {
    104.         quotes: "\201E" "\201C" "\201A" "\2018";
    105. }
    106.  
    107. q:before, blockquote:before {
    108.         content:open-quote;
    109. }
    110.  
    111. q:after, blockquote:after {
    112.         content:close-quote;
    113. }
    114.  
    115. blockquote, q, cite {
    116.         padding-left: 2em;
    117. }
    118.  
    119.  
    120. /* _special wp tags
    121. ==========================================*/
    122.  
    123. code {
    124.         font: .8em 'Courier New', Courier, Fixed;
    125.   color: gray;
    126.         padding-left: 2em;
    127. }
    128.  
    129. code a[href]:after {
    130.         content:"";
    131. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1089"></script>
  9. 10 years ago
    My standard css framework
    1. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    2.  
    3.     * Filename: framework.css
    4.     * Version: 0.0.0 (200x-mm-dd)
    5.     * Website: http://www.site.de
    6.     * Author: Author Name
    7.     * Description: Main Layout
    8.  
    9.     == STRUCTURE: ==============================
    10.     * Page width: 000 px
    11.     * Number of columns: 0
    12.     ============================================
    13.    
    14.     == INDEX: ===================================
    15.         _general : general definitions and resets
    16.         _logo :
    17.         _menu
    18.         _content :
    19.         _sidebar :
    20.         _footer :
    21.         ============================================
    22.        
    23.         == CHANGES =================================
    24.         0.0.1 - Added some Bla Bla
    25.         0.0.2 - Deleted some Blubb
    26.         ============================================
    27. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
    28.  
    29.  
    30. /* _general
    31. ==========================================*/
    32. * {
    33.         margin:0;
    34.         padding:0;
    35.         border:0;
    36.         font-weight:inherit;
    37.         font-style:inherit;
    38.         font-size:100%;
    39.         font-family:inherit;
    40.         vertical-align:baseline;
    41. }
    42.  
    43. body {
    44.         line-height:1.5;
    45. }
    46.  
    47. table {
    48.         border-collapse:separate;
    49.         border-spacing:0;
    50. }
    51.  
    52. caption, th, td {
    53.         text-align:left;
    54.         font-weight:normal;
    55. }
    56.  
    57. table, td, th {
    58.         vertical-align:middle;
    59. }
    60.  
    61. blockquote:before, blockquote:after, q:before, q:after {
    62.         content:"";
    63. }
    64.  
    65. blockquote, q {
    66.         quotes:"" "";
    67. }
    68.  
    69. a img {
    70.         border:none;
    71. }
    72.  
    73. body {
    74.         font-size:75%;
    75.         color:#222;
    76.         background:#fff;
    77.         font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
    78. }
    79.  
    80. h1, h2, h3, h4, h5, h6 {
    81.         font-weight:normal;
    82.         color:#111;
    83. }
    84.  
    85. h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
    86. h2 {font-size:2em;margin-bottom:0.75em;}
    87. h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
    88. h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;height:1.25em;}
    89. h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
    90. h6 {font-size:1em;font-weight:bold;}
    91. h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
    92.  
    93. p {margin:0 0 1.5em;}
    94. p img {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
    95. p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
    96.  
    97. a:focus, a:hover {color:#000;}
    98. a {color:#009;text-decoration:underline;}
    99.  
    100. blockquote {margin:1.5em;color:#666;font-style:italic;}
    101. strong {font-weight:bold;}
    102. em, dfn {font-style:italic;}
    103. dfn {font-weight:bold;}
    104. sup, sub {line-height:0;}
    105. abbr, acronym {border-bottom:1px dotted #666;}
    106. address {margin:0 0 1.5em;font-style:italic;}
    107. del {color:#666;}
    108. pre, code {margin:1.5em 0;white-space:pre;}
    109. pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
    110. li ul, li ol {margin:0 1.5em;}
    111. ul, ol {margin:0 1.5em 1.5em 1.5em;}
    112. ul {list-style-type:disc;}
    113. ol {list-style-type:decimal;}
    114. dl {margin:0 0 1.5em 0;}
    115. dl dt {font-weight:bold;}
    116. dd {margin-left:1.5em;}
    117. table {margin-bottom:1.4em;width:100%;}
    118. th {font-weight:bold;background:#C3D9FF;}
    119. th, td {padding:4px 10px 4px 5px;}
    120. tr.even td {background:#E5ECF9;}
    121. tfoot {font-style:italic;}
    122. caption {background:#eee;}
    123. .small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
    124. .large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
    125. .hide {display:none;}
    126. .quiet {color:#666;}
    127. .loud {color:#000;}
    128. .highlight {background:#ff0;}
    129. .added {background:#060;color:#fff;}
    130. .removed {background:#900;color:#fff;}
    131. .first {margin-left:0;padding-left:0;}
    132. .last {margin-right:0;padding-right:0;}
    133. .top {margin-top:0;padding-top:0;}
    134. .bottom {margin-bottom:0;padding-bottom:0;}
    135.  
    136.        
    137.  
    138. /* _logo
    139. ==========================================*/
    140. #logo{
    141. }
    142.  
    143. /* _menu
    144. ==========================================*/
    145. #menu{
    146. }
    147.  
    148. /* _content
    149. ==========================================*/
    150. #content{
    151. }
    152.  
    153. /* _sidebar
    154. ==========================================*/
    155. #sidebar{
    156. }
    157.  
    158. /* _footer
    159. ==========================================*/
    160. #footer{
    161. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1088"></script>

First / Previous / Next / Last / Page 1 of 1 (8 posteets)