<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Wordpress2PunBB Posting]]></title>
		<link>https://punbb.informer.com/forums/topic/23056/wordpress2punbb-posting/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/23056/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Wordpress2PunBB Posting.]]></description>
		<lastBuildDate>Mon, 29 Apr 2013 00:15:21 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/149018/#p149018</link>
			<description><![CDATA[<p>Thank you, Jones, for starting this much needed integration between WordPress posts and punBB auto-posts.</p><p>I&#039;ve made some adjustments to make the code easier to edit over here, since it&#039;s v.1.4 compatible:<br /><a href="http://punbb.informer.com/forums/post/149067/#p149067">http://punbb.informer.com/forums/post/149067/#p149067</a></p>]]></description>
			<author><![CDATA[null@example.com (aaronproctor)]]></author>
			<pubDate>Mon, 29 Apr 2013 00:15:21 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/149018/#p149018</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/136394/#p136394</link>
			<description><![CDATA[<p>Hi guys, just a question; where should i put this code in?<br />Is it a WP extension so it is just to install or is more advanced?</p><p>I really want to get a working crossposting function, but i don&#039;t get it to work.</p><p>//david</p>]]></description>
			<author><![CDATA[null@example.com (freequest)]]></author>
			<pubDate>Sat, 24 Jul 2010 15:24:00 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/136394/#p136394</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134877/#p134877</link>
			<description><![CDATA[<p>Of course, you&#039;re right and you are free to choose the solution. We can just give advice.</p><p>You&#039;ve asked about adding posts to the search index. Seems like the PunBB database layer must be also included for the update_search_index() function to work.</p>]]></description>
			<author><![CDATA[null@example.com (Parpalak)]]></author>
			<pubDate>Wed, 21 Apr 2010 12:30:26 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134877/#p134877</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134876/#p134876</link>
			<description><![CDATA[<p>Your true you can replace everything, but then it&#039;s in my mind an easier way to do without the include thing.<br />I will post the code here so that you can see how did I solved it.<br /></p><div class="codebox"><pre><code>function punbb_publish_post($id)
    {
    global $wpdb;
    $wppost = $wpdb-&gt;get_row(&quot;SELECT ID, post_date, post_title, post_content FROM &quot;.$wpdb-&gt;posts.&quot; WHERE ID = &quot;.$id.&quot; LIMIT 1&quot;);
    /* Check if edited or new */
    $wppost_check = $wpdb-&gt;get_row(&quot;SELECT id, topic_id FROM &quot;.PUNPREFIX.&quot;posts WHERE poster = &#039;Greenday&#039; AND posted = &quot;.strtotime($wppost-&gt;post_date));
    if($wppost_check)
    {
    
    $wpdb-&gt;query(&quot;UPDATE &quot;.PUNPREFIX.&quot;topics SET subject = &#039;&quot;.$wppost-&gt;post_title.&quot;&#039; WHERE id = &quot;.$wppost_check-&gt;topic_id);
    $wpdb-&gt;query(&quot;UPDATE &quot;.PUNPREFIX.&quot;posts SET message = &#039;&quot;.$wppost-&gt;post_content.&quot;&#039; WHERE id = &quot;.$wppost_check-&gt;id);
    
    }
    /*If New */
    else {
    $wpdb-&gt;query(&quot;INSERT INTO &quot;.PUNPREFIX.&quot;topics (poster, subject, posted, last_post, last_poster, forum_id) VALUES(
    &#039;Greenday&#039;,
    &#039;&quot;.$wppost-&gt;post_title.&quot;&#039;,
    &quot;.strtotime($wppost-&gt;post_date).&quot;,
    &quot;.strtotime($wppost-&gt;post_date).&quot;,
    &#039;Greenday&#039;,
    1)&quot;);
    $topic_id = $wpdb-&gt;insert_id;
    
    $wpdb-&gt;query(&quot;INSERT INTO &quot;.PUNPREFIX.&quot;posts (poster, poster_id, message, posted, topic_id, poster_ip) VALUES(
    &#039;Greenday&#039;,
    2,
    &#039;&quot;.$wppost-&gt;post_content.&quot;&#039;,
    &quot;.strtotime($wppost-&gt;post_date).&quot;,
    &quot;.$topic_id.&quot;,
    &#039;192.168.0.1&#039;
    )&quot;);
    $post_id = $wpdb-&gt;insert_id;
    
    $wpdb-&gt;query(&quot;UPDATE &quot;.PUNPREFIX.&quot;topics SET last_post_id = &quot;.$post_id.&quot;, first_post_id = &quot;.$post_id.&quot; WHERE id = &quot;.$topic_id);
    $wpdb-&gt;query(&quot;UPDATE &quot;.PUNPREFIX.&quot;forums SET last_post = &quot;.strtotime($wppost-&gt;post_date).&quot;, last_post_id = &quot;.$post_id.&quot;, last_poster = &#039;Greenday&#039; WHERE id = 1&quot;);
    $punbb_postnumber = $wpdb-&gt;get_row(&quot;SELECT num_posts, username FROM &quot;.PUNPREFIX.&quot;users WHERE username = &#039;Greenday&#039; LIMIT 1&quot;);
    $wpdb-&gt;query(&quot;UPDATE &quot;.PUNPREFIX.&quot;users SET num_posts = &quot;.$punbb_postnumber-&gt;num_posts.&quot;+1 WHERE username = &#039;Greenday&#039;&quot;);
    
    /* Puts a Link to the forum topic in the post */
    $wp_add = &quot;&lt;p&gt;Diskutiere &lt;a href=\&quot;/\&quot; title=\&quot;Link zum Topic im Forum\&quot;&gt;hier. -&gt;&lt;/a&gt;&lt;/p&gt;&quot;;
    $wp_content = $wppost-&gt;post_content.$wp_add;
    }
    }</code></pre></div><p>How I said thats maybe not the best solution, but it&#039;s working very well for now.<br />Should be nearly the same what the function does.</p>]]></description>
			<author><![CDATA[null@example.com (Jones)]]></author>
			<pubDate>Wed, 21 Apr 2010 11:54:00 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134876/#p134876</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134873/#p134873</link>
			<description><![CDATA[<div class="quotebox"><cite>Jones wrote:</cite><blockquote><p>I switched the function etc, but the punbb forum_db-&gt;escape() or query etc. will not be accepted by wordpress because wordpress uses wpdb-&gt;escape() or query etc.</p></blockquote></div><p>As far as I understand you can use both wpdb and forum_db at the same time. I have no Wordpress environment and I have replaced your query<br /></p><div class="codebox"><pre><code>$wppost = $wpdb-&gt;get_row(&quot;SELECT post_date, post_title, post_content FROM &quot;.$wpdb-&gt;posts.&quot; WHERE ID = &quot;.$id.&quot; LIMIT 1&quot;);</code></pre></div><p>to a simple assignment in my example. You still can return to your code and include modified files (my_essentials.php and my_functions.php) to avoid names conflict:<br /></p><div class="codebox"><pre><code>    define(&#039;FORUM_ROOT&#039;, &#039;./&#039;);
    require FORUM_ROOT.&#039;include/my_essentials.php&#039;;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Parpalak)]]></author>
			<pubDate>Wed, 21 Apr 2010 09:47:51 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134873/#p134873</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134863/#p134863</link>
			<description><![CDATA[<p>Well, it isn&#039;t that easy I thought.<br />Your idea is nice but it doesn&#039;t working either.<br />I switched the function etc, but the punbb forum_db-&gt;escape() or query etc. will not be accepted by wordpress because wordpress uses wpdb-&gt;escape() or query etc.<br />Also switching from forum_db to wpdb doesn&#039;t work because wpdb needs more strings or something. I come now to the solution to do it all by myself with the wordpress queries etc.<br />It works well, but still is a very unelegant solution in my mind.<br />There are two things I am looking forward to fix. Help me if I am wrong with my solution.<br />1. Get the post into the index. If I saw it right then<br /></p><div class="codebox"><pre><code>        require FORUM_ROOT.&#039;include/search_idx.php&#039;;

    update_search_index(&#039;post&#039;, $new_pid, $post_info[&#039;message&#039;], $post_info[&#039;subject&#039;]);</code></pre></div><p>is the thingy for indexing the post.<br />2. Increase the number of the poster in this way give me 1 extra post. (This at the moment not very important) Will work hopefully with an easy mysql update.</p><p>Of course I will the post the wordpress plugin here when it is done.</p>]]></description>
			<author><![CDATA[null@example.com (Jones)]]></author>
			<pubDate>Tue, 20 Apr 2010 13:31:06 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134863/#p134863</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134840/#p134840</link>
			<description><![CDATA[<p>There are functions with the same names in Wordpress and PunBB.</p><p>Try to do the next steps.</p><p>1. Copy include/essentials.php to include/my_essentials.php.<br />2. Copy include/functions.php to include/my_functions.php.<br />3. Change the filename in include/my_essentials.php from functions.php to my_functions.php (line 22):<br /></p><div class="codebox"><pre><code>// Load the functions script
require FORUM_ROOT.&#039;include/my_functions.php&#039;;</code></pre></div><p>4. Edit your script like this (I&#039;ve just successfully tested it)<br /></p><div class="codebox"><pre><code>&lt;?php

    error_reporting(E_ALL);
    define(&#039;FORUM_DEBUG&#039;, 1);

    $post_info = array(
        &quot;poster&quot; =&gt; &quot;Jones&quot;,
        &quot;subject&quot; =&gt; &quot;test&quot;,
        &quot;posted&quot; =&gt; time(),
        &quot;forum_id&quot; =&gt; 1,
        &quot;poster_id&quot; =&gt; 2,
        &quot;message&quot; =&gt; &quot;test&quot;,
        &#039;is_guest&#039; =&gt; false,
        &#039;subscribe&#039; =&gt; false,
        &#039;hide_smilies&#039; =&gt; 0,
    );

    define(&#039;FORUM_ROOT&#039;, &#039;./&#039;);
    require FORUM_ROOT.&#039;include/my_essentials.php&#039;;

    add_topic($post_info, $a, $b);</code></pre></div><p>5. Try to run the script. Look through error messages. Remove from my_functions.php all functions with names conflicted.</p>]]></description>
			<author><![CDATA[null@example.com (Parpalak)]]></author>
			<pubDate>Mon, 19 Apr 2010 09:58:15 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134840/#p134840</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134827/#p134827</link>
			<description><![CDATA[<p>Urm stupid me, forgot it either <img src="https://punbb.informer.com/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /><br />To many problems that need to get fixed in a short time <img src="https://punbb.informer.com/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /><br />My community waits for a forum <img src="https://punbb.informer.com/forums/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Getting the following error.</p><div class="codebox"><pre><code>Fatal error: Cannot redeclare validate_username() (previously declared in D:\xampplite\htdocs\punbb\wp-includes\registration.php:49) in D:\xampplite\htdocs\punbb\punbb\include\functions.php on line 864</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Jones)]]></author>
			<pubDate>Fri, 16 Apr 2010 14:07:52 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134827/#p134827</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134826/#p134826</link>
			<description><![CDATA[<p>Oh, sorry. I&#039;ve forgotten to tell you to put error_reporting(E_ALL); at the beginning of the file.</p>]]></description>
			<author><![CDATA[null@example.com (Parpalak)]]></author>
			<pubDate>Fri, 16 Apr 2010 12:44:35 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134826/#p134826</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134825/#p134825</link>
			<description><![CDATA[<p>Added ..</p><p>Code now<br /></p><div class="codebox"><pre><code>    global $wpdb;
    $wppost = $wpdb-&gt;get_row(&quot;SELECT post_date, post_title, post_content FROM &quot;.$wpdb-&gt;posts.&quot; WHERE ID = &quot;.$id.&quot; LIMIT 1&quot;);
    
    $post_info = array(     &quot;poster&quot; =&gt; &quot;Jones&quot;,
                            &quot;subject&quot; =&gt; &quot;&quot;.$wppost-&gt;post_title.&quot;&quot;,
                            &quot;posted&quot; =&gt; &quot;&quot;.strtotime($wppost-&gt;post_date).&quot;&quot;,
                            &quot;forum_id&quot; =&gt; 1,
                            &quot;poster_id&quot; =&gt; 2,
                            &quot;message&quot; =&gt; &quot;&quot;.$wppost-&gt;post_content);
    // Add these lines in the very top of your code
    define(&#039;FORUM_ROOT&#039;, &#039;../punbb/&#039;);
    require FORUM_ROOT.&#039;include/common.php&#039;;

    add_topic($post_info);
    error_reporting(E_ALL);</code></pre></div><p>Still blank page and nothing happen.</p>]]></description>
			<author><![CDATA[null@example.com (Jones)]]></author>
			<pubDate>Fri, 16 Apr 2010 12:29:05 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134825/#p134825</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134823/#p134823</link>
			<description><![CDATA[<p>Any error messages? Try to add </p><div class="codebox"><pre><code>error_reporting(E_ALL);</code></pre></div><p> while debugging.</p>]]></description>
			<author><![CDATA[null@example.com (Parpalak)]]></author>
			<pubDate>Fri, 16 Apr 2010 12:02:58 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134823/#p134823</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134822/#p134822</link>
			<description><![CDATA[<p>Well then I just get a blank page, and no topic created.<br />changed code now to<br /></p><div class="codebox"><pre><code>    global $wpdb;
    $wppost = $wpdb-&gt;get_row(&quot;SELECT post_date, post_title, post_content FROM &quot;.$wpdb-&gt;posts.&quot; WHERE ID = &quot;.$id.&quot; LIMIT 1&quot;);
    
    $post_info = array(     &quot;poster&quot; =&gt; &quot;Jones&quot;,
                            &quot;subject&quot; =&gt; &quot;&quot;.$wppost-&gt;post_title.&quot;&quot;,
                            &quot;posted&quot; =&gt; &quot;&quot;.strtotime($wppost-&gt;post_date).&quot;&quot;,
                            &quot;forum_id&quot; =&gt; 1,
                            &quot;poster_id&quot; =&gt; 2,
                            &quot;message&quot; =&gt; &quot;&quot;.$wppost-&gt;post_content);
// Add these lines in the very top of your code
define(&#039;FORUM_ROOT&#039;, &#039;../punbb/&#039;);
require FORUM_ROOT.&#039;include/common.php&#039;;

    add_topic($post_info);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Jones)]]></author>
			<pubDate>Fri, 16 Apr 2010 11:34:15 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134822/#p134822</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134821/#p134821</link>
			<description><![CDATA[<p>Seems like PunBB functions can&#039;t work with database if one just includes functions.php.</p><p>Try to include PunBB functions this way (as it&#039;s <a href="http://punbb.informer.com/wiki/punbb13/integration">described in Wiki</a>):</p><div class="codebox"><pre><code>define(&#039;FORUM_ROOT&#039;, &#039;../punbb/&#039;);
require FORUM_ROOT.&#039;include/common.php&#039;;</code></pre></div><p>functions.php will be included automatically.</p>]]></description>
			<author><![CDATA[null@example.com (Parpalak)]]></author>
			<pubDate>Fri, 16 Apr 2010 09:39:24 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134821/#p134821</guid>
		</item>
		<item>
			<title><![CDATA[Re: Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134798/#p134798</link>
			<description><![CDATA[<p>i need a extension that work as comments from wordpress.</p>]]></description>
			<author><![CDATA[null@example.com (fantasma)]]></author>
			<pubDate>Thu, 15 Apr 2010 20:11:14 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134798/#p134798</guid>
		</item>
		<item>
			<title><![CDATA[Wordpress2PunBB Posting]]></title>
			<link>https://punbb.informer.com/forums/post/134795/#p134795</link>
			<description><![CDATA[<p>At the moment I am working on making a wordpress plugin to post every post on wordpress to a foren topic..<br />but is doesn&#039;t worked right now, may you can help.</p><div class="codebox"><pre><code>    global $wpdb;
    $wppost = $wpdb-&gt;get_row(&quot;SELECT post_date, post_title, post_content FROM &quot;.$wpdb-&gt;posts.&quot; WHERE ID = &quot;.$id.&quot; LIMIT 1&quot;);
    
    $post_info = array(     &quot;poster&quot; =&gt; &quot;Jones&quot;,
                            &quot;subject&quot; =&gt; &quot;&quot;.$wppost-&gt;post_title.&quot;&quot;,
                            &quot;posted&quot; =&gt; &quot;&quot;.strtotime($wppost-&gt;post_date).&quot;&quot;,
                            &quot;forum_id&quot; =&gt; 1,
                            &quot;poster_id&quot; =&gt; 2,
                            &quot;message&quot; =&gt; &quot;&quot;.$wppost-&gt;post_content);
    require (&quot;../punbb/include/functions.php&quot;);
    add_topic($post_info);</code></pre></div><p>Thats the section I am using to get the topic made but nothing happen.</p>]]></description>
			<author><![CDATA[null@example.com (Jones)]]></author>
			<pubDate>Thu, 15 Apr 2010 15:09:04 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/134795/#p134795</guid>
		</item>
	</channel>
</rss>
