Re: wordpress plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Then if you really want a new id, just look for the next highest id in the db and update the current post you are "deleting" with the new id. you then add an iframe to the bottom of your page, similar to this:

 iframe src="http://www.xxxxxx.com/wp-mail.php"; name="mailiframe" width="0" height="0" frameborder="0" scrolling="no" title="" close iframe

which is what you use when you want to check your email account that receives "post by email" blogs ands them to your blog.

wp-mail.php will switch for something wp-update-post.php:

so in pseudo code:

select * where blog > date
$date = new_date
$new_tags = a,b,c
$max_id = select max(id)+ 1 from db

update db (set id=$max_id , post_date=$date) where cur_id = $cur_id

update tags (set tags=$new_tags) where id=$cur_id (then you might need to update this id if the tags table is normalised from the main blog table as I suspect it is).

I'm new to wordpress myself so most of this is speculation. Given most good db design is 'similar' I can't be far off??

cheers

Gordon






________________________________
From: Hari KT <kthari85@xxxxxxxxxxx>
To: php-objects@xxxxxxxxxxxxxxx
Sent: Friday, 7 May, 2010 19:11:54
Subject: Re:  wordpress plugin

  
I have not looked into the wordpress db now . But I assume , there is a create date . You may not want to delete the post if you want to insert it again . Just update the old posts with the new date . I hope it will work :) . And for the tags, you may not want to bother about this too :) I guess .

Hari K T

http://harikt. com/

____________ _________ _________ __
From: Amit Kumar Dube <chicku_dube@ yahoo.com>
To: php-objects@ yahoogroups. com
Sent: Fri, 7 May, 2010 11:19:20 PM
Subject:  wordpress plugin

Dear Friends,
I want to make a plugin 
1) delete posts after x number of days based on a given category

2) re-publish each deleted post so that it creates a new post in the database

3) update the tags and categories of the old post_id to point to the new post_id

some body help me give some idea

[Non-text portions of this message have been removed]


 

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux