Changeset 632638
- Timestamp:
- 12/01/2012 09:46:14 AM (13 years ago)
- Location:
- mj-news/trunk
- Files:
-
- 2 deleted
- 4 edited
-
css/jquery-ui-1.8.16.custom.css (deleted)
-
css/mj.css (modified) (1 diff)
-
index.php (modified) (2 diffs)
-
js/mjnew.js (deleted)
-
readme.txt (modified) (2 diffs)
-
screenshot-1.JPG (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
mj-news/trunk/css/mj.css
r630794 r632638 9 9 } 10 10 11 12 /* =WordPress Core 13 -------------------------------------------------------------- */ 14 .alignnone { 15 margin: 5px 20px 20px 0; 16 } 17 18 .aligncenter, 19 div.aligncenter { 20 display: block; 21 margin: 5px auto 5px auto; 22 } 23 24 .alignright { 25 float:right; 26 margin: 5px 0 20px 20px; 27 } 28 29 .alignleft { 30 float: left; 31 margin: 5px 20px 20px 0; 32 } 33 34 .aligncenter { 35 display: block; 36 margin: 5px auto 5px auto; 37 } 38 39 a img.alignright { 40 float: right; 41 margin: 5px 0 20px 20px; 42 } 43 44 a img.alignnone { 45 margin: 5px 20px 20px 0; 46 } 47 48 a img.alignleft { 49 float: left; 50 margin: 5px 20px 20px 0; 51 } 52 53 a img.aligncenter { 54 display: block; 55 margin-left: auto; 56 margin-right: auto 57 } 58 59 .wp-caption { 60 background: #fff; 61 border: 1px solid #f0f0f0; 62 max-width: 96%; /* Image does not overflow the content area */ 63 padding: 5px 3px 10px; 64 text-align: center; 65 } 66 67 .wp-caption.alignnone { 68 margin: 5px 20px 20px 0; 69 } 70 71 .wp-caption.alignleft { 72 margin: 5px 20px 20px 0; 73 } 74 75 .wp-caption.alignright { 76 margin: 5px 0 20px 20px; 77 } 78 79 .wp-caption img { 80 border: 0 none; 81 height: auto; 82 margin: 0; 83 max-width: 98.5%; 84 padding: 0; 85 width: auto; 86 } 87 88 .wp-caption p.wp-caption-text { 89 font-size: 11px; 90 line-height: 17px; 91 margin: 0; 92 padding: 0 4px 5px; 93 } 94 95 96 97 /* css for news */ 98 div#mjnew{ font-family: 'MyriadProRegular';} 99 div#mjnew h3 { border-bottom: 1px solid #DDDDDD; font-size: 17px; line-height: 1.5em; text-transform: capitalize;} 100 .mj-post-inner { border: 1px solid #DDDDDD; /* margin-bottom: 4px; */ padding: 11px 14px;} 101 .mjfooter .fr{float: right;} 102 .mjfooter .fl{float: left;} 103 .clr{clear: both; height:0px;display:block;} 104 .mjfooter { background: none repeat scroll 0 0 #DDDDDD; margin: 0 0 19px; padding: 0 17px;} 105 #mjnew .page_nav a{ background: none repeat scroll 0 0 #DDDDDD; color: gray; padding: 6px;} 106 #mjnew .page_nav span{background: none repeat scroll 0 0 gray; border: 1px solid; color: #FFFFFF; padding: 6px;} 107 /* css for news */ -
mj-news/trunk/index.php
r630794 r632638 15 15 16 16 17 add_action("wp_enqueue_scripts", "mjnewsStyle"); 18 function mjnewsStyle() { 19 wp_register_style( 'mjnewform', plugins_url( '/css/mj.css', __FILE__ ),'all' ); 20 wp_enqueue_style( 'mjnewform' ); 21 } 22 23 17 24 18 25 function mj_news_type_creation() { … … 47 54 ?> 48 55 49 <div id=" accordion">56 <div id="mjnew"> 50 57 <?php 51 query_posts("post_type=News&post_status=publish"); 58 59 $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 60 $args=array( 61 'post_type' => 'news', 62 'post_status' => 'publish', 63 //'orderby' => 'menu_order', 64 'posts_per_page' =>4, 65 'caller_get_posts' =>1, 66 'paged' =>$paged, 67 ); 68 query_posts($args); 52 69 global $post; 53 70 if ( have_posts() ) : while ( have_posts() ) : the_post(); 54 71 55 72 ?> 56 <h3> 57 <a href="#"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> 58 </h3> 59 <span><?php echo date('d F, Y',strtotime($post->post_date));?></span> 60 <div><?php echo substr(get_the_content(),0,200); ?></div> 61 <div><a href="<?php echo get_permalink();?>">Read More</a></div> 62 73 <div class="mj-post"> 74 <div class="mj-post-inner"> 75 <h3> 76 <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> 77 </h3> 78 <div><?php echo substr(get_the_content(),0,200); ?></div> 79 <div><a href="<?php echo get_permalink();?>">Read More</a></div> 80 </div> 81 <div class="mjfooter"><span class="fl">Posted by : <?php echo the_author();?></span><span class="fr">Posted on : <?php echo date('d F, Y',strtotime($post->post_date));?></span> 82 <div class="clr"></div> 83 </div> 84 </div> 63 85 <?php 64 86 65 87 endwhile; 66 88 endif; ?> 67 </div> 89 68 90 <?php 91 92 93 94 global $wp_query; 95 $total_pages = $wp_query->max_num_pages; 96 if ($total_pages > 1){ 97 $current_page = max(1, get_query_var('paged')); 98 echo '<div class="page_nav">'; 99 echo paginate_links(array( 100 'base' => get_pagenum_link(1) . '%_%', 101 'format' => '/page/%#%', 102 'current' => $current_page, 103 'total' => $total_pages, 104 'prev_text' => 'Prev', 105 'next_text' => 'Next' 106 )); 107 echo '</div>'; 108 } 109 echo "</div>"; 69 110 wp_reset_query(); 70 111 } -
mj-news/trunk/readme.txt
r630794 r632638 24 24 <li> - category news.</li> 25 25 <li> - news tags.</li> 26 <li> - Pagination</li> 26 27 <li> - custom fields.</li> 27 28 <li> - easy to install.</li> … … 31 32 mj_news(); php code</li> 32 33 <li> - easy to understand coding standard</li> 34 33 35 </ul> 34 36
Note: See TracChangeset
for help on using the changeset viewer.