feature request blogpdf

Creating and modifying plugins.
Post Reply
jorgenb
Regular
Posts: 6
Joined: Sun Feb 19, 2006 12:15 pm
Location: Sweden

feature request blogpdf

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: feature request blogpdf

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jorgenb
Regular
Posts: 6
Joined: Sun Feb 19, 2006 12:15 pm
Location: Sweden

Post 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..
jorgenb
Regular
Posts: 6
Joined: Sun Feb 19, 2006 12:15 pm
Location: Sweden

Progress....

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Progress....

Post by garvinhicking »

that sounds very promising :) I'd really like to patch it up for the plugin once you're done.

Have fun,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jorgenb
Regular
Posts: 6
Joined: Sun Feb 19, 2006 12:15 pm
Location: Sweden

Question(s)

Post 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]
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Question(s)

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jorgenb
Regular
Posts: 6
Joined: Sun Feb 19, 2006 12:15 pm
Location: Sweden

Slow...

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Slow...

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
jorgenb
Regular
Posts: 6
Joined: Sun Feb 19, 2006 12:15 pm
Location: Sweden

Re: Slow...

Post 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
Post Reply