[Phpwm] Moving attachments from one node to another in Drupal 5

pete graham petegraham1 at gmail.com
Mon Apr 21 10:25:05 BST 2008


On 20/04/2008, Simon <simon at needanother.co.uk> wrote:
>
>
> Hi
>
> Slightly off topic but still PHP related.
>
> I'm using Drupal 5, and one of my nodes
> (http://www.needanother.co.uk/tye/node/2) has several
> attachments which are basically one PDF file per month.
>
> To stop this node getting too long, every month I want to move the older
> attachments into another node.
>
> Now, I suppose I could manage this by altering the database directly to
> update the node number for the attachment, but I'd rather do so within
> Drupal itself (using a module, perhaps).
>
> I've been looking for a solution to this for some time, without success, and
> I'm amazed that it appears nobody else has this need.  I can see you could
> probably upload the PDF files again in the new node, but that seems like too
> much hard work.
>
> Has anyone seen the functionality I require in a module they've installed,
> or does anyone have an idea how I can achieve this?
>
> Many thanks
>
> Simon
> _______________________________________________
>  Phpwm mailing list
>  Phpwm at mailman.lug.org.uk
>  https://mailman.lug.org.uk/mailman/listinfo/phpwm
>
>

Hi Simon,

If you can't find a module to do this for you I would suggest witting
a custom module. If the files need to be moved monthly then your going
to need to set the module up to work with Drupals cron system
(http://drupal.org/cron).

Its very likely that you'll need to modify the DB, it would be best to
do this using the native drupal DB interaction functions. Think you'll
need to modify the info in the files table, but you'll need to check
this.

Regards, Pete



More information about the Phpwm mailing list