• Alright, so I want my registered users to be able to do several things with the posts they see on my site where each post would have trigger buttons: Like and Don’t Like

    1) Mark posts they like
    2) Mark posts they don’t like

    The site would then allow each user to Show/Hide all liked posts and Show/Hide all disliked posts.

    This permits the user to see only what they choose to see: Stuff they like, stuff they don’t like, stuff they haven’t marked, or a mix.

    To see an example of what I mean see: https://www.win-free-stuff.ca/new-contests

    That site does run on wordprees. Looking at page source is a dead giveaway but the admin won’t respond on how he did it.

    Any ideas on how this can be implemented are welcomed. I assume it uses mootools or scriptaculous but I don’t know how the buttons can be made to function.

Viewing 16 replies (of 16 total)
  • Thread Starter mcfmullen

    (@mcfmullen)

    I’ve done it with scriptaculous. jQuery makes absolutely no sense to me:

    In <header>

    <script src="src/prototype.js" type="text/javascript"></script>
    <script src="src/scriptaculous.js" type="text/javascript"></script>

    In <body>

    <?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    
    				<a class="hide" href="#" onclick="Effect.toggle('post-<?php the_ID(); ?>', 'appear'); return false;"></a>

    In CSS:

    .hide {
      	float: right;
    	background: url(images/entered.png) no-repeat top center;
    	height: 30px;
    	width: 28px;
    	}

    Now, this only creates a button that hides the post. What I want is more akin to a pair of radio buttons (like/dislike) for each post which is then controlled by one of two checkbox switches (Hide all liked/Hide all disliked).

    Can that be done? the jQuery documentation is chinese to me…

Viewing 16 replies (of 16 total)
  • The topic ‘Hide Posts?’ is closed to new replies.