mrlive
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Forum: Fixing WordPress
In reply to: [Plugin: Comment Reply Notification] Not sending any emailsMee to T_T
it doesn’t workForum: Fixing WordPress
In reply to: Display archive data in a sortable table formatAfter one day…. I’ve made it completely. You can see the demo here. I’ll write an entry for this work later to give more detail on the code.
Forum: Fixing WordPress
In reply to: Display archive data in a sortable table formatah, add these code after tag </ table > and you will make it “sortable” ^^
<script type="text/javascript"> var myTable = {}; window.addEvent('domready', function(){ myTable = new sortableTable('myTable', {overCls: 'over', onClick: function(){alert(this.id)}}); }); </script>
Forum: Fixing WordPress
In reply to: Display archive data in a sortable table formatI’ve just figured it out.
You can see the demo here: Demo
There are some problem left, the number of pageview & comment are not correctly, the javascript doesn’t run.
Here is the code I used…
<?php if (have_posts()) :$post = $posts[0]; while (have_posts()) : the_post(); ?> <center><h2><?php the_title(); ?></h2></center> <center><?php the_content();?></center> <div id="example"> <table id="myTable" cellpadding="0" cellpadding="0"> <thead> <th axis="number">ID</th> <th axis="string">Title</th> <th axis="string">Pageview</th> <th axis="string">Comment</th> <th axis="category">Category</th> <th axis="date">Date</th> </thead> <tbody> <?php $myposts = get_posts('numberposts=-1;offset=0');foreach($myposts as $post) :?> <? $stt = $stt + 1; ?> <tr id="<?php $stt ?>"> <td align="center"><?php echo $stt ?></td> <td><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></td> <td align="center"><a href="<?php the_permalink(); ?>"><?php the_views(); ?></a></td> <td align="center"><a href="<?php the_permalink(); ?>#comments"><?php comments_number('0','1','%');?></a></td> <td><?php the_category(', ') ?></td> <td align="center"><?php the_time('d/m/Y') ?></td> </tr> <?php endforeach; ?> </tbody> <tfoot> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </tfoot> </table> </div> <?php endwhile; endif; ?>
Viewing 4 replies - 1 through 4 (of 4 total)