Forum Replies Created

Viewing 15 replies - 1 through 15 (of 18 total)
  • @jhayghost13: that works as a charm. Thanks so much.

    Same here, fatal error. The plugin crashed my site.
    I had to remove the plugin by ftp, because it just completly crashed WP.
    Then I reinstalled it right away, and this is the result.

    Fatal error: Cannot redeclare stats_init() in /customers/e/4/b/deteuge2.nl/httpd.www/wordpress/wp-content/plugins/google-analyticator/google-analyticator.php on line 116

    Please fix this asap!

    WP 3.8, Theme Panorama

    Never had a problem before with your plugin?!

    Just had the same problem today. I turned back to the simple reader again instead of the advanced version.

    Then the problem is not their… hmmm, wonder what is going on here. Could reproduce the problem in Chrome (logged on) and IE9 (not logged on).

    So switching back to simple mode works for me.

    Is this plugin dead then? Should I just uninstall it?

    I am having the same problems… any idea what is going on?

    Yeah, I deleted time from my settings for this plugin. But I do see the same problem. I have looked into this, but I have not been able to pinpoint the problem.

    Anyone any ideas on how to solve this?

    Thread Starter number3nl

    (@number3nl)

    Please someone, help me to create a diff / patch file for Nick.
    What tools to use?
    Thanks,
    #3

    Hi Nick,
    I will look into making a diff. Suggestions for which tool to use would be great… I am not into development lately, missed out on most SVN/Git like tools.
    So what to use to make a diff?
    Gr.
    #3

    Thread Starter number3nl

    (@number3nl)

    Found some small bugs and forgot to fix some of display.php, so here we go again.

    display.php

    <?php
    
    # Get the Options from the Database
    
    $PHPBBDB = stripslashes(get_option('prt_phpbb_db'));
    $TOPIC_TABLE = stripslashes(get_option('prt_phpbb_tt'));
    $POSTS_TABLE = stripslashes(get_option('prt_phpbb_pt'));
    $SITEURL = stripslashes(get_option('prt_phpbb_url'));
    $PHPBBDATE = stripslashes(get_option('prt_phpbb_date'));
    $PHPBBEXCLUDED = get_option('prt_phpbb_exclued');
    $OPENINNEWWIN = stripslashes(get_option('prt_phpbb_newwin'));
    # TODO change above variables to match "admin-display" style, cause it makes more sense!
    $prt_phpbb_dbinsecureon = stripslashes(get_option('prt_phpbb_dbinsecureon'));
    $prt_phpbb_latest_topic = stripslashes(get_option('prt_phpbb_latest_topic'));
    
    # Setup our WordPress DB Connection
    	global $wpdb;
    
    # Are we a function call or Page call ? Set up our list length...
    
    	if (is_null($LIMIT)) { 
    
    		$LIMIT = stripslashes(get_option('prt_phpbb_LIMIT'));
    
    		if (is_null($LIMIT)) {
                    $LIMIT = 5;
    	        }
    	}
    
    # Check the $TOPIC_TABLE variable
    
    	if (is_null($TOPIC_TABLE)) {
    
    		$TOPIC_TABLE = "phpbb_topics";
    
    	}
    
    	# if $TOPIC_TABLE is set up empty :)
    	if ($TOPIC_TABLE == "") {
    
                    $TOPIC_TABLE = "phpbb_topics";
    
            }
    
    # Check the $POSTS_TABLE variable
    
    	if (is_null($POSTS_TABLE)) {
    
    		$TOPIC_TABLE = "phpbb_posts";
    
    	}
    
    	# if $POSTS_TABLE is set up empty :)
    	if ($POSTS_TABLE == "") {
    
                    $POSTS_TABLE = "phpbb_topics";
    
            }
    
    # Connect to php BB
    #
    # Insecure Method
    if ($prt_phpbb_dbinsecureon == "1") { 
    
    	$prt_phpbb_dbinsecureuid = stripslashes(get_option('prt_phpbb_dbinsecureuid'));
    	$prt_phpbb_dbinsecurepw = stripslashes(get_option('prt_phpbb_dbinsecurepw'));
    	$prt_phpbb_dbinsecurehost = stripslashes(get_option('prt_phpbb_dbinsecurehost'));
    
    	$phpbbdb = new wpdb($prt_phpbb_dbinsecureuid, $prt_phpbb_dbinsecurepw, $PHPBBDB, $prt_phpbb_dbinsecurehos);
    
    } else {
    # Secure Method
    
    	$wpdb->select($PHPBBDB);
    
    }
    
    # Run The query
    // Build a query based on some paramters Changed by Number3NL (12 may 2010)
    
    if (is_array($PHPBBEXCLUDED)) {
    	$counter = 0;
    	$countermax = count($PHPBBEXCLUDED) -1;
    	# Construct Excluded Query
    	$EXCLUDED_FORUM = "AND ";
    	foreach ($PHPBBEXCLUDED as $EXCLUDED) {
    		$EXCLUDED_FORUM .= "forum_id !=$EXCLUDED";
    			if ($counter < $countermax  ) {
    				$EXCLUDED_FORUM .= " AND ";
    			}
    	 $counter++;
    	}
    } else {
            $EXCLUDED_FORUM = "";
    }
    
    // Added WHERE TOPIC_APPROVED = 1 to the following, creditz Ashish https://www.microstrategy101.com/
    $sql_query = "SELECT * FROM $TOPIC_TABLE WHERE TOPIC_APPROVED = 1 $EXCLUDED_FORUM $EXCLUDED_FORUM ORDER BY";
    
    if ($prt_phpbb_latest_topic == "1") {
         $sql_query .= " topic_last_post_time";
    } else {
         $sql_query .= " topic_time";
    } 
    
    $sql_query .= " DESC LIMIT $LIMIT";
    
    //finally fetch it from the database
    if ($prt_phpbb_dbinsecureon == "1") {
           $results = $phpbbdb->get_results($sql_query);
    } else {
           $results = $wpdb->get_results($sql_query);
    }
    
    //Next build the recent (active) topics now
    if ($results){
    
    		echo "<ul>";	
    
    	# Loop away baby !
    	foreach ($results as $topic)
    		{
    
    		echo "<li>";
    		//echo "$topic->post_text";
    		echo "<a ";
    			if ($OPENINNEWWIN == "1") { echo "target=\"_blank\""; }
                    if ($prt_phpbb_latest_topic == "1") {
    	                echo " href='" . $SITEURL . "/viewtopic.php?p=$topic->topic_last_post_id#p$topic->topic_last_post_id'";
                    } else {
                            echo " href='" . $SITEURL . "/viewtopic.php?t=$topic->topic_id'";
                    }
                    //** fetch post body
                    //build query
                    $sql_query = "SELECT * FROM $POSTS_TABLE WHERE ";
                    if ($prt_phpbb_latest_topic == "1") {
                            $sql_query .= "post_id=" . $topic->topic_last_post_id;
                    } else {
    
                            $sql_query .= "topic_id=" . $topic->topic_id;
                    }
                    $sql_query .= " LIMIT 1";
                    //run query
                    if ($prt_phpbb_dbinsecureon == "1") {
               		$post= $phpbbdb->get_row($sql_query);
            	} else {
    	         	$post = $wpdb->get_row($sql_query);
    	        }
    
                    //strip BBcodes from post
    		$post->post_text = preg_replace("(\[.+?\])is",'',$post->post_text);
                    //limit the quote from the body to xxx chars
    		$post->post_text = substr($post->post_text,0,512)."...";
    		echo " title='" . $post->post_text . "' ";
                    //** and that's all folks
    		echo ">";
    
                    if ($prt_phpbb_latest_topic == "1") {
                         echo "$topic->topic_last_post_subject";
                    } else {
                         echo "$topic->topic_title";
                    }
    		echo "</a>";
    
    		if ($PHPBBDATE != "") {
    			echo "<br />\n";
                            if ($prt_phpbb_latest_topic == "1") {
                                  echo "<small><i>" . date("$PHPBBDATE", $topic->topic_last_post_time) . "</i></small>\n";
                            } else {
                                  echo "<small><i>" . date("$PHPBBDATE", $topic->topic_time) . "</i></small>\n";
                            }
    		}
    
    		echo "</li>";
    		}
    
    		echo "</ul>";
    } else {
    		echo "<h2> phpBB Error  -$TOPIC_TABLE </h2>";
    }
    
     if ($prt_phpbb_dbinsecureon != "1") {
    	# Connect back to wordpress :-)
    	$wpdb->select(DB_NAME);
     }
    
    ?>

    Great modification. After reviewing the idea (and implementing it). I thought it would be nice to reflect the real post date (and time).

    So after changing some lines of code, I ended up with this:

    <?php
    
    # Get the Options from the Database
    
    $PHPBBDB = stripslashes(get_option('prt_phpbb_db'));
    $TOPIC_TABLE = stripslashes(get_option('prt_phpbb_tt'));
    $SITEURL = stripslashes(get_option('prt_phpbb_url'));
    $PHPBBDATE = stripslashes(get_option('prt_phpbb_date'));
    $PHPBBEXCLUDED = get_option('prt_phpbb_exclued');
    $OPENINNEWWIN = stripslashes(get_option('prt_phpbb_newwin'));
    # TODO change above variables to match "admin-display" style, cause it makes more sense!
    $prt_phpbb_dbinsecureon = stripslashes(get_option('prt_phpbb_dbinsecureon'));
    
    # Setup our WordPress DB Connection
    	global $wpdb;
    
    # Are we a function call or Page call ? Set up our list length...
    
    	if (is_null($LIMIT)) { 
    
    		$LIMIT = stripslashes(get_option('prt_phpbb_LIMIT'));
    
    		if (is_null($LIMIT)) {
                    $LIMIT = 5;
    	        }
    	}
    
    # Check the $TOPIC_TABLE variable
    
    	if (is_null($TOPIC_TABLE)) {
    
    		$TOPIC_TABLE = "phpbb_topics";
    
    	}
    
    	# if $TOPIC_TABLE is set up empty :)
    	if ($TOPIC_TABLE == "") {
    
                    $TOPIC_TABLE = "phpbb_topics";
    
            }
    
    # Connect to php BB
    #
    # Insecure Method
    if ($prt_phpbb_dbinsecureon == "1") { 
    
    	$prt_phpbb_dbinsecureuid = stripslashes(get_option('prt_phpbb_dbinsecureuid'));
    	$prt_phpbb_dbinsecurepw = stripslashes(get_option('prt_phpbb_dbinsecurepw'));
    	$prt_phpbb_dbinsecurehost = stripslashes(get_option('prt_phpbb_dbinsecurehost'));
    
    	$phpbbdb = new wpdb($prt_phpbb_dbinsecureuid, $prt_phpbb_dbinsecurepw, $PHPBBDB, $prt_phpbb_dbinsecurehos);
    
    } else {
    # Secure Method
    
    	$wpdb->select($PHPBBDB);
    
    }
    
    # Run The query
    
    if (is_array($PHPBBEXCLUDED)) {
    	$counter = 0;
    	$countermax = count($PHPBBEXCLUDED) -1;
    	# Construct Excluded Query
    	$EXCLUDED_FORUM = "AND ";
    	foreach ($PHPBBEXCLUDED as $EXCLUDED) {
    		$EXCLUDED_FORUM .= "forum_id !=$EXCLUDED";
    			if ($counter < $countermax  ) {
    				$EXCLUDED_FORUM .= " AND ";
    			}
    	 $counter++;
    	}
    
    	// Added WHERE TOPIC_APPROVED = 1 to the following, creditz Ashish https://www.microstrategy101.com/
    
    	if ($prt_phpbb_dbinsecureon == "1") {
    
    //		$results = $phpbbdb->get_results("SELECT * FROM $TOPIC_TABLE WHERE TOPIC_APPROVED = 1 $EXCLUDED_FORUM ORDER BY topic_time DESC LIMIT $LIMIT");
    
    		$results = $phpbbdb->get_results("SELECT * FROM $TOPIC_TABLE WHERE TOPIC_APPROVED = 1 $EXCLUDED_FORUM ORDER BY topic_last_post_time DESC LIMIT $LIMIT");
    
    	} else {
    
    //		$results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE WHERE TOPIC_APPROVED = 1 $EXCLUDED_FORUM ORDER BY topic_time DESC LIMIT $LIMIT");
    
    		$results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE WHERE TOPIC_APPROVED = 1 $EXCLUDED_FORUM ORDER BY topic_last_post_time DESC LIMIT $LIMIT");
    
    	}
    } else {
    	# No excluded Query
    
    	if ($prt_phpbb_dbinsecureon == "1") {
    
    		$results = $phpbbdb->get_results("SELECT * FROM $TOPIC_TABLE WHERE TOPIC_APPROVED = 1 ORDER BY topic_time DESC LIMIT $LIMIT");
    	} else {
    		$results = $wpdb->get_results("SELECT * FROM $TOPIC_TABLE  WHERE TOPIC_APPROVED = 1 ORDER BY topic_time DESC LIMIT $LIMIT");
    	}
    }
    
    if ($results){
    
    		echo "<ul>";	
    
    	# Loop away baby !
    	foreach ($results as $topic)
    		{
    
    		echo "<li>";
    		//echo "$topic->post_text";
    		echo "<a ";
    			if ($OPENINNEWWIN == "1") { echo "target=\"_blank\""; }
    	//	echo " href='" . $SITEURL . "/viewtopic.php?t=$topic->topic_id'";
    	        echo " href='" . $SITEURL . "/viewtopic.php?p=$topic->topic_last_post_id#p$topic->topic_last_post_id'";	
    
    		echo ">";
                    echo "$topic->topic_last_post_subject";
    	//      echo "$topic->topic_title";
    		echo "</a>";
    
    		if ($PHPBBDATE != "") {
    			echo "<br />\n";
    			//echo "<small><i>" . date("$PHPBBDATE", $topic->topic_time) . "</i></small>\n";
                            echo "<small><i>" . date("$PHPBBDATE", $topic->topic_last_post_time) . "</i></small>\n";
    		}
    
    		echo "</li>";
    		}
    
    		echo "</ul>";
    } else {
    		echo "<h2> phpBB Error  -$TOPIC_TABLE </h2>";
    }
    
     if ($prt_phpbb_dbinsecureon != "1") {
    	# Connect back to wordpress :-)
    	$wpdb->select(DB_NAME);
     }
    
    ?>

    Now the only thing I want to add is a little code to fetch the post content and show it as a tooltip. But I have not gotten this to work yet, since I need to read the content of the post from another table.

    Paul,
    1.8.1 is not working for me.
    L8r,
    #3

    Paul,
    Tested 1.8.0 still no change.
    I tested the dropbox uploader stuff (with the sync.php from the website of dropbox wiki) and that works ok.
    So it must be that files never get created in the first place.

    Can you please add a way to verify that the files get created, maybe as simple as a logfile. So we can help debug this.
    Keep hunting the problem,
    #3

    Still the same result. I have no luck, just like Steve.
    Tried FTP, no luck.
    Please add a debug feature or some logfile we can check for you.
    Thanks,
    #3

    I do not see the any files being made… what might be the problem?

    Hi Paul,
    I noticed that the plugin was moved to 1.7.7 so I tried to get it working again. No luck. Is there a way to see if the files get generated at all? The files do not get moved over to dropbox.

    Also when clicking on backup it only takes about 2 secs before it tells me that its done. Not very believable IMHO, I mean dumping my database normally takes about 10 secs (and up to a minute) depending on the traffic on my hosting provider.

    So I am not sure if the backup files get generated at all… they are not showing up at the dropbox account.

    Also is it possible to have a “test” button. To validate that the remote copy (using FTP, Dropbox or S3) works at all… This would enable the user to pinpoint the “issue” before getting back to you.

    Thanks for your work on this.

Viewing 15 replies - 1 through 15 (of 18 total)