Page 1 of 1

feature request blogpdf

Posted: Sun Feb 19, 2006 12:26 pm
by jorgenb
Hi
Remaking the request
Features I need are:

1. Save blog by user only. By Month, Full blog, By period (selected by user, example September 1 to February 28)

2. Blog entries that are written by other users should not be inluded in the PDF file saved by user logged in (regardless if they are made public or not).

Why I need this? First of all the blog is a MU (multiuser) blog for use as a personal diary with a limited number of categories where each user is able to choose if he/she want to keep his/her entries private or public. Secondly each user must be able to save his "diary" as PDF either by month or period selected by the user.

Sounding like a whole new plugin to me :-)
Anyway, since I am no PHP expert I need help with this but I am def willing to code my self.

Hope this is making sense :-)
/DIO aka jorgenb

Re: feature request blogpdf

Posted: Mon Feb 20, 2006 12:16 pm
by garvinhicking
Sadly that plugin has several issues, especially with not formatting HTML output properly, so I consider it a bit useless myself. It is more a "proof of concept", sadly.

I am quite sure the changes you mention could be facilitated into the plugin, but it would take a few hours, and I personally cannot offer that time right now.

Maybe you can look at the current plugin, play with it a bit and see how to insert new "views" into it? You should get variables like $serendipity['GET']['viewAuthor'] for example when someone is viewing entries by author on the blog frontend, which you can pass on to the plugin to create a PDF by author...

Best regards,
Garvin

Posted: Mon Feb 20, 2006 9:45 pm
by jorgenb
Thanks Garvin for pointing me in right direction
Just what I had in mind as well and basicly all I need to start with.

I'll post a little "how it goes" once I've tried some code here.

/DIO a.k.a Jorgenb

(Updated an hour later, slow I know but Olympic Hockey to watch as well)
Ok "by author" is now working, next function is to actually add verification and that user saving the "by author" entries is only able to save his/her own entries..

Progress....

Posted: Tue Feb 21, 2006 8:05 pm
by jorgenb
Ok so far I've managed to get users to print their own entries only, if a user choose to view "others" posts he/she is not able to save it as a PDF (link not even showing)

Next step is to let users save their entries by user + category (category + entries made by currently logged in user only)

For you who want to know the code, please hold for a few more days I want it fully tested first. It will be posted once done no worries :-)

/DIO a.k.a Jorgenb

Re: Progress....

Posted: Tue Feb 21, 2006 8:51 pm
by garvinhicking
that sounds very promising :) I'd really like to patch it up for the plugin once you're done.

Have fun,
Garvin

Question(s)

Posted: Sun Feb 26, 2006 10:15 pm
by jorgenb
What is the easiest way to retrieve the following information?

1. The entryid (dbprefix_entries id)
2. The author for the entry (dbprefix_entries authorid)

Are there any shortcuts for use instead of using normal $query
I noticed the serendipity_db_query, can it be used for the task?

KR
/DIO a.k.a Jorgenb[/code]

Re: Question(s)

Posted: Mon Feb 27, 2006 2:39 pm
by garvinhicking
Hi!

The entryid should be contained within the $eventData array, as $eventData[0]['id'] or $eventData['id'], dependin on the plugin hook.

The same applies to the authorid, that should be stored as 'authorid' within that array.

Best regards,
Garvin

Slow...

Posted: Wed Mar 01, 2006 8:49 pm
by jorgenb
I know.. but am no wizard.

I will have to put this on ice for awhile.
I def need some help with this

Anyone willing to help? drop me a message

Thanks in advance!

/DIO a.ka. Jorgenb

Re: Slow...

Posted: Thu Mar 02, 2006 12:01 pm
by garvinhicking
I'm sure willing to help, if you have detailed questions, and maybe code snippets where you have problems with?

Best regards,
Garvin

Re: Slow...

Posted: Thu Mar 02, 2006 8:19 pm
by jorgenb
garvinhicking wrote:I'm sure willing to help, if you have detailed questions, and maybe code snippets where you have problems with?

Best regards,
Garvin
Thanks Garvin
I sure will.
It may take a few days before I pick it up again and give it another try though.
Too many things goin on at the moment.

/DIO a.k.a Jorgenb