PDA

View Full Version : WordPress Plugin, Display Blog Articles - Any Interest?


mustbme
04-24-2006, 02:43 AM
Any interest in a plugin to display articles from a WordPress database in Subdreamer? Latest articles on any page, or text match WordPress category/Subdreamer category and place respective articles on that category/subcategory page. R/O, via. mySQL, not via. RSS, etc., not cached. Just something I tossed together, I'll add some error checking and post if there is any interest.

<div align="center">http://www.mustbme.com/images/sd_wp1.jpg


http://www.mustbme.com/images/sd_wp2.jpg</div>

mBm

rjchaney
04-24-2006, 04:04 AM
Yes&#33; I am very interested. We have been looking for a better way to incorporate the articles from Worpress into our main website.

thomas
04-24-2006, 04:07 AM
yes, would love to see a beta version of the plugin

abcohen
04-24-2006, 01:50 PM
wow thats sweet&#33;&#33;&#33;

Robert_J_Ellis
04-24-2006, 04:56 PM
Neat :)

IGGY
04-25-2006, 01:11 AM
That&#39;s pretty neat&#33;

Being able to incorperate the userbase would be outstanding, although from what I have read is not that easy with WP.

mustbme
04-25-2006, 04:20 AM
143 - WordPress Blog Display [attachmentid=328] Attached zip archive containing 4 text files.

This plugin number was not officially assigned, though it was &#39;applied for&#39; in the correct forum category.

----
This plugin grabs published WP blog entries from the current version of WP and displays them in SD.

Install, configure, and add to a SD category or subcategory. If cat/sub-cat matches (text) a WP category, the most recent N (settings) published blog entries will be displayed from that category.

If there is no matching WP category, the most recent N (settings) published blog entries in any/all categories of the blog will be displayed.

It talks directly to the WP mySQL database, which is does not modify or change in any manner.

This was a quickie for someone trying to sell an idea to his employer (dump their POS CMS).
It was a 20-30 min ordeal. I am not a programmer, and this was my first bite of PHP.
I have not read the WP, SD (except for the plugin tutorial), or PHP manuals, so consider this a hack.

I make no claims with respect to this plugin whatsoever, do anything you want with/to it.

Positive:
It works. Hopefully someone with PHP and SD background will spend a few minutes with it, clean it up, add to it, etc.

Negatives:

Funky characters (GIGO) in WP posts, the &#39;rendering&#39; is probably specific to what I happened across in a limited set of posts for the demo.
Minimal error checking.
No caching.
It exploits SD &#036;categoryid, which doesn&#39;t appear to distinguish between category and subcategory.
Depends on WP post_status enum=1 to define a published blog entry.

I&#39;m not at all impressed with WP, except for the ability to post via. XML-RPC.
My primary web site grabs 100% of its content from a WP database via a single Perl script for HTML and XML (RSS) pages, caching as it goes along until a refresh, and is many, many times faster than WP, just not as pretty.

SD is, by far, the fastest and cleanest CMS I&#39;ve seen to date. The framework for plugin&#39;s is the &#39;friendliest&#39; framework I&#39;ve seen in any package to date.

mustbme
04-25-2006, 11:37 PM
A couple of quick fixes. Not an upgrade. Uninstall, copy to folder, reinstall.

Category name can appear in optional text/title displayed prior to blog entries.
Slight change to minimize impact on server. (see newer post)

mustbme
04-28-2006, 12:13 AM
A couple more quick fixes, less memory usage. Not an upgrade. Uninstall, copy to folder, reinstall.

mustbme
05-02-2006, 02:17 AM
[attachmentid=341] Version 1e, 2006.05.01 - New Install, or uninstall plugin, copy zip contents to its folder, reinstall plugin.

This is a &#39;work in progress&#39;, any suggestions in terms of features would be greatly appreciated. The code is ugly, there&#39;s duplication, but it works. Once it&#39;s displaying WP comments and the email function is working, I&#39;ll clean it up. This is only my second effort in a higher-level language, I&#39;d never even seen PHP until someone asked me about a WP to SD utility a couple of days ago, so bear with me.

WordPress Blog Display now uses some of the p2_news code and structure, as well as its icons for printing and emailing. Output is now virtually identical to p2_news output, it will pass for it in a SD category. The Print function is working, the email is not (yet), and I haven&#39;t put the code in place to use the mySQL port entered in the settings. Before grabbing code and icons, I checked with a moderator, who got an okay from someone higher up. My intent is that the difference between this plugin&#39;s output and that of p2_news be minimal.

Remember, unless you assign the plugin to a SD category with a (text) matching WordPress category, you&#39;ll get the latest published posts from all WP blog categories. I dropped the default category option without thinking, and will add it back (clone plugin is your friend).

The Email function will probably email the entire article instead of a link, as the page may not be static at the source WordPress blog. Comments on this are welcome.

I&#39;m thinking, if an admin is viewing the plugin&#39;s display, there should be a button or link to add the post to a local SD category... Comments on this are welcome.

Let me know if you need something added to this plugin before it&#39;s finished and I move on to something else or get busy.

I&#39;ll upload a WordPress to SD import plugin soon.

mBm


<div align="center">http://www.mustbme.com/images/wordpress_plugin1.jpg</div>


.

abcohen
05-02-2006, 02:19 AM
just outstanding work&#33;&#33;&#33;&#33;

bopheim
05-02-2006, 09:52 AM
I am really impressed mustbme. You have got some skills&#33; Just what we need here in our lovely community&#33;

Robert_J_Ellis
05-02-2006, 07:14 PM
I like what you&#39;ve done. Top notch :)

jriemerm
05-23-2006, 01:39 PM
The Email function will probably email the entire article instead of a link, as the page may not be static at the source WordPress blog. Comments on this are welcome.[/b]

My comment: Good choice. I wish SD e-mailed the text of the article rather than the URL. Much more convenient.

mustbme
05-23-2006, 02:49 PM
<div class='quotetop'>QUOTE(jriemerm &#064; May 23 2006, 09&#58;39 AM) 6144</div>
My comment: Good choice. I wish SD e-mailed the text of the article rather than the URL. Much more convenient.
[/b]
Added that to SD News when I was adding it to the WP plugin.

plugins/p2_news/news.php

Change&#58;
****&#036;headers .= &#34;Content-type&#58; text/plain; charset=iso-8859-1&#092;r &#092;n&#34;;
**TO&#58;
****&#036;headers .= &#34;Content-type&#58; text/html; charset=iso-8859-1&#092;r &#092;n&#34;;

Change&#58;
****&#036;message = &#036;sdurl . &#34;index.php?categoryid=&#34; . &#036;categoryid . &#34;&p2_articleid=&#036;articleid &#092;r &#092;n &#092;r &#092;n &#036;emailcomment&#34;;
**TO&#58;
****&#036;message = &#036;article&#91;&#39;article&#39;&#93; . &#39;&#60;br /&#62;&#39;;
****&#036;message .= &#036;sdurl . &#34;index.php?categoryid=&#34; . &#036;categoryid . &#34;&p2_articleid=&#036;articleid &#092;r &#092;n &#092;r &#092;n&#60;br /&#62;&#60;br /&#62; &#036;emailcomment&#34;;



Outline/Impact:

Changes message content type from text/plain to: text/html.

Changes message from link, comment to: article body, line break, link, line break, line break, comment.

It does not appear that these changes will effect the plugin&#39;s overall operation, or SD itself.


This was enough to &#39;work&#39;, if I end up making the move to SD, I&#39;ll prefix with date, author, wrap the link in tag, etc.

mBm

jriemerm
05-23-2006, 03:16 PM
Nice. Thanks.

abcohen
10-23-2006, 05:59 AM
bump bump lots of talk of wordpress on .com :)

abcohen
11-05-2006, 12:01 AM
bumped again...

Community
11-11-2006, 12:19 AM
can it be user for all the members at your site? so they can set up there own blog??

mustbme
11-11-2006, 08:03 AM
The plugin makes a direct connection to a local or remote Wordpress database (not the blog itself), and grabs some posts.

When displayed, they appear as though coming from SD p2_news plugin, but they do not exist anywhere in the SD database.

Because they are in a remote database, existing only in the plugin's output, they don't show up in SD latest news/articles or search plugins. (Not to say it wouldn't be possible to do this).

Watch for a plugin in the next few days that will allow easy bulk importation of most blog posts (WordPress, Blogger, b2evolution, MovableType, TypePad, etc.) and categories (and underlying users) directly into Subdreamer as news/articles.

I haven't tried it, but you should be able to clone the plugin, once for each user, and assign to a category for them.

mBm

Pixelrage
11-19-2006, 04:09 AM
Is it dynamic (as in, auto updating every time you create a new Wordpress post?)

Secondly, is that true about a duck's quack not echoing? I love useless info :)

mustbme
11-20-2006, 04:38 AM
Is it dynamic (as in, auto updating every time you create a new Wordpress post?)Yes, real-time, no caching.

Awhile back I wrote a utility to sync (import into) ArticleLive to a Wordpress blog with cron (command line), and, if time allows, I'll port it to Subdreamer at some point.

Secondly, is that true about a duck's quack not echoing? I love useless info :)No.

It can't possibly be true, but it sounds quite reasonable.

Pixelrage
11-28-2006, 01:45 PM
Just a couple more questions, since I'm considering using Wordpress instead of doing things the hard way, and creating new articles in Subdreamer -- can this display images from a wordpress article? Also, can you set a limit as to how many words will appear, with a "more" link under it?

Edit: let me clarify - does this grab the "Post" or the "Page" section of a Wordpress blog? I'm just looking to mimic subdreamer's "Description" and "Article" structure, so that it pulls and displays some introductory text from my Wordpress account with a "read more" link.

Pixelrage
11-30-2006, 02:45 AM
This will sound dumb, but how are we supposed to know the Wordpress database name, database user and database password?

abcohen
11-30-2006, 12:06 PM
When you install Wordpress it askes... similar there is some sort of config.php file laying around its core somewhere...

Pixelrage
11-30-2006, 01:43 PM
I'm a little confused, we're talking about http://wordpress.com/ , right? It's just a free blog run on their server, I didn't see any questions for database info when I signed up for my free account? :confused:

abcohen
11-30-2006, 03:54 PM
nope not the .com its the .org
http://wordpress.org/download/

Pixelrage
11-30-2006, 04:50 PM
Interesting - I never seemed to notice that downloadable one before. Thanks abcohen, that sorts it all out now :D

My next question is - can you synch the "software" version with the wordpress.com account?

mustbme
12-09-2006, 10:49 AM
My next question is - can you synch the "software" version with the wordpress.com account?

The script mentioned grabs posts from Wordpress and imports them into their respective categories in an ArticleLive (Another CMS) database, keeping the content of AL sync'd with the WP content. Nothing to do with software versions. Was a short-lived project for someone who thought she could replace a large WP blog with AL, which didn't work out.

Edit: let me clarify - does this grab the "Post" or the "Page" section of a Wordpress blog? I'm just looking to mimic subdreamer's "Description" and "Article" structure, so that it pulls and displays some introductory text from my Wordpress account with a "read more" link.

Anything I've done with WP grabs the entire post. I can't recall, but may have removed the <!--more--> comment WP uses for page breaks, probably left it, since it would have no effect in SD. Without the 'more' break, I think WP displays the entire post, unless there is a plugin modifying output (Post Teaser, etc.).

fabianv
12-29-2006, 06:08 PM
Is this plugin functioning properly? Where can I see a running demo? :)

Brent
12-30-2006, 03:15 AM
Is this plugin functioning properly? Where can I see a running demo? :)

Most of mustbme's cms/blog/import/sync plugins are all very advanced and complicated pre-beta plugins... I don't believe you will see a working demo of this anywhere as most of is is backend anyway.

You may want to see this thread (http://www.subdreamer.org/forum/showthread.php?t=1635), please read warnings.

Cheers