FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » I want to read Wordpress blog
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
I want to read Wordpress blog [message #175459] Thu, 29 September 2011 11:19 Go to next message
youdol testAcount is currently offline  youdol testAcount
Messages: 1
Registered: September 2011
Karma: 0
Junior Member
Hi,
I am developing an application in PHP similar to wordpress or blogger.
I want to import blog of particular user and embed those post to my
database.
It is similar functionality as wordpress is giving for importing other
blogs.

I have been through many documentation provided by wordpress.org ->
Codex, From my application user gives his/her wordpress blog URL , and
password but I am stuck in reading wordpress blog of a user.

I am new to this kind of development, I am sorry for my limited
knowledge.

Any response is highly encouraged and appreciated

Thanks
Re: I want to read Wordpress blog [message #175466 is a reply to message #175459] Thu, 29 September 2011 20:30 Go to previous messageGo to next message
Michael Vilain is currently offline  Michael Vilain
Messages: 88
Registered: September 2010
Karma: 0
Member
In article
<8835b06d-061d-452e-a1d6-564769ca73fc(at)m15g2000vbk(dot)googlegroups(dot)com>,
youdol testAcount <youdolblogs(at)gmail(dot)com> wrote:

> Hi,
> I am developing an application in PHP similar to wordpress or blogger.
> I want to import blog of particular user and embed those post to my
> database.
> It is similar functionality as wordpress is giving for importing other
> blogs.
>
> I have been through many documentation provided by wordpress.org ->
> Codex, From my application user gives his/her wordpress blog URL , and
> password but I am stuck in reading wordpress blog of a user.
>
> I am new to this kind of development, I am sorry for my limited
> knowledge.
>
> Any response is highly encouraged and appreciated
>
> Thanks

You might find some tools in Perl's CPAN library to read/write Wordpress
databases. Or you could export the Wordpress blog and parse it's XML
file, adding the entries of interest.

--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
Re: I want to read Wordpress blog [message #175467 is a reply to message #175459] Thu, 29 September 2011 22:40 Go to previous message
Mike S is currently offline  Mike S
Messages: 8
Registered: September 2010
Karma: 0
Junior Member
On 9/29/2011 4:19 AM, youdol testAcount wrote:
> Hi,
> I am developing an application in PHP similar to wordpress or blogger.
> I want to import blog of particular user and embed those post to my
> database.
> It is similar functionality as wordpress is giving for importing other
> blogs.
> I have been through many documentation provided by wordpress.org ->
> Codex, From my application user gives his/her wordpress blog URL , and
> password but I am stuck in reading wordpress blog of a user.
> I am new to this kind of development, I am sorry for my limited
> knowledge.
> Any response is highly encouraged and appreciated
> Thanks

I'm not sure if this is exactly what you're looking for but I grab
recent posts from multiple blogs and display them on a "front intro
page". The "intro" page and all of the blogs are are on the same server,
you will need permission to post a file on each blog you want to pull
data from to use this approach.

Save a file with this code in each blog folder (where wp-config.php is
installed), I name it wp-recentposts.php

<?php require_once('wp-blog-header.php');
$posts = get_posts('numberposts=5&order=DESC&orderby=post_date');
foreach ($posts as $post) : start_wp(); ?>
<a href="<?php the_permalink() ?>" target='_blank'><?php the_title();
?></a><br>
<?php endforeach; ?>

Change the number of posts displayed, sorting, etc. to whatever you want.

Then read this file into your external page. If you are displaying
recent posts from multiple blogs on the same page you may need to use a
iframes, that was the only way I could get the code to work for multiple
blogs:

<iframe src=".../wp-recentposts.php"></iframe>

I didn't want to use an iframe (I avoid them unless they're absolutely
necessary) but I couldn't find any other way to get this approach to
work for multiple blogs: the data from the first blog was repeated for
all of the other blogs when I didn't use iframes. I was able to display
recent posts from a single blog without the iframe.

I got the code from these pages:

http://wordpress.org/support/topic/show-latest-posts-with-get_posts-not-wor king

http://codex.wordpress.org/Template_Tags/get_posts

http://wordpress.org/support/topic/posting-recent-posts-with-dates

http://wordpress.org/support/topic/display-latest-10-posts-from-specific-ca tegory

http://css-tricks.com/forums/discussion/2293/wordpress-plugins-that-show-re cent-posts-on-sidebars/p1

Mike
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: problem sending email.
Next Topic: cURL and MultiPowUpload
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 10:38:46 GMT 2024

Total time taken to generate the page: 0.02555 seconds