Serendipity Classes

Creating and modifying plugins.
Post Reply
jimboy
Regular
Posts: 5
Joined: Wed Oct 25, 2006 1:05 am
Location: London

Serendipity Classes

Post by jimboy »

Hello Developers,

I wonder, is serendipity designed purely using functions or is it OO?

Reason I ask, I would llike to get hold of a technical manual that delves into how the Class construct is designed and see if its open to modification, either to extend it or incorporate other good applications, such as Gallery.

It I had other sources of HTML, it would be nice for dynamically generated HTML to be imported into serendipity through already existing variables, which we can then equate to within serendipity.

That is, we simply write PHP files then import them with serendipity tools.

Is this possible, because the manuals are poor in telling us how to achieve this, and I am frustrated in coming against this limited usage.

I dont want to have to go back and re-invent the wheel. But there must be a means that serendipity programmers encourage developers to extend their code, and thus the functlionality of serendipity. Rather like th e Open Source Code of the Linux community.

then if everything works, we can make it available to developers who can incorporate it in the latest releases.

For instance, I would like to include personal links on my Blog page, allow visitors to go to a Gallery of photos, which another application is hosting. Simply by clicking on a link within the Blog should achieve this, but how? when Serendipity does not give you this option!!!!!

It would be nice if we had the skeleton structure of the Classes, then we can gain control with our dynamic HTML generated content.

For another instance, it would be nice to get users visiting a site using frames, to be able to view a Blog page in one part of a frame while still browsing the rest of the site in another frame.

Can you see what am trying to Engineer? Every user might have different needs and it would be good to allow the user to determine how to view Blogs... am talking about a flexibility that would allow viewing of several Blogs simply by choosing from a list, generated by some DB query, then view any of the pages without leaving the frameset.....

Please advise, and hope to hear from you soonish.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Serendipity Classes

Post by garvinhicking »

Hi!

Serendipity itself uses mixed code. It deploys OO techniques where they are especially usefull (plugin API), but functions in the other parts of the admin area where OO would contain too much overhead.

So our plugin API focusses a lot on OO, and is explained hopefully well here:

http://www.s9y.org/43.html

The plugin API is open to including other files to generate content; I'd suggest you to have a look at existing plugins in our repository at http://spartacus.s9y.org/ (section external tools: http://spartacus.s9y.org/index.php?mode ... ERVICES_en)

Maybe if you get more precise I could give you more detailed instructions, but I'm not yet sure what it is exactly you need.
For instance, I would like to include personal links on my Blog page, allow visitors to go to a Gallery of photos, which another application is hosting. Simply by clicking on a link within the Blog should achieve this, but how? when Serendipity does not give you this option!!!!!
It does, did you even look at our plugins? there is an awesome lot of plugins to add your own HTML output, to add links to gallery, even to include gallery into serendipity!
For another instance, it would be nice to get users visiting a site using frames, to be able to view a Blog page in one part of a frame while still browsing the rest of the site in another frame.
Our themes are based on Smarty, so you can actually just create a frame-version of a theme sine you have control over the HTML of the frontend.

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/
jimboy
Regular
Posts: 5
Joined: Wed Oct 25, 2006 1:05 am
Location: London

How???

Post by jimboy »

How Garvin,

You seem to contradict my outlined problem with many, "Yes you can", but no actual backing of "How". If your manuals actual specified how, I would not be writting this...

It is because I cant find this in the documentations, and no where is it made more specific... that it urges me to write....

So you suggested many " Yes you can, so my request is - How?"

Spartacus is disabled by default, and I cant find a manual on How to set it up with s9y. It seems to me we are talking around the subject....

s9y uses your templates, which look fantastic to all intents and purposes. However, they are useless if all they interact with is just s9y and no other HTML from other sources.

A bit like MS excell data being unable to be used in any other product except Microsoft EXCEL. If the flexibility is not there, you get the urging to move on to another product that gives it to you.

This is why I was asking for details about Classes, to see if modifying the code, or Classes somewhat can achieve this.... Otherwise all the niceness of your templates is in vain.

You open s9y, and the basic page gives no indication of how you can import pictures, format them the way you would like them viewed, or include links for other reading material. What plug-ins, that you forgot to mention, actual achieve this functionality for you.

you are leaving everything vague, yet i feel what am trying to achieve is clear, so How specific would you like me to be???

Incidentally, s9y does not allow a visitor to navigate from one Blog to another, on a multi-user hosted Blogs site. I dont see how! Perhaps you can elaborate....

Hope to hear from you again soon.
James.
jimboy
Regular
Posts: 5
Joined: Wed Oct 25, 2006 1:05 am
Location: London

Examining Code

Post by jimboy »

Hi Garvin,,

It occurs to me, the link you provided as an answer:
http://www.s9y.org/43.html

Its all very well looking at Code, but without a synopsis, you would need to examine the details of each function to understand what it does for you, I dont know anyone that has that much time.

Generally poeple hate going through the details and thought processes of other programmers, unless it is inevitable / necessary, cause it is a pain. Often easier to re-start that to have to do that, so why not have a synopsis of the Classes, then others can add their efforts to the s9y project.

If it is meant to be secretive, then it beats the purpose for it being in the public domain as open source.....

Help me out here, I am not deliberately being arkward....I mean, am close at just saying: Stuff s9y and looking at something else....and am a code developer, so how about those Helpless Nerds that just wanted to load and go out of a box....???

Regards,
James.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How???

Post by garvinhicking »

Hi!
You seem to contradict my outlined problem with many, "Yes you can", but no actual backing of "How". If your manuals actual specified how, I would not be writting this...
I wrote you need to be specific for me to answer specifically :-D

Your only precise questions where how to add links to a gallery, where I pinted you to the spartacus.s9y.org plugin listing. Searching the complete listing of event plugins and sidebar plugins for "gallery" should give you some hits.

To add a link from your s9y blog to anything, you can use the "HTML Nugget" sidebar plugin, which allows any custom HTML to hold.
Spartacus is disabled by default, and I cant find a manual on How to set it up with s9y. It seems to me we are talking around the subject....
Quoting from http://spartacus.s9y.org:
Once installed through the usual plugin configuration manager within your Serendipity Installation, you can fetch and manage plugins via Serendipity. No need to use FTP or manual downloading - just click & fetch!
And the FAQ at http://www.s9y.org/11.html#A27 even explains it much more in depth. I am sure you must have missed that, because the FAQ is the most obvious place to look for answers and quick docs, right? :-)
However, they are useless if all they interact with is just s9y and no other HTML from other sources.
You can use any custom Smarty function to include remote PHP code. Look here:

http://www.s9y.org/78.html#A4

and here:

http://www.s9y.org/123.html

And with event plugins, you can also fetch and use any other applications code you like. Look at the gallery event plugins we provide to see how we embed Gallery.
This is why I was asking for details about Classes, to see if modifying the code, or Classes somewhat can achieve this.... Otherwise all the niceness of your templates is in vain.
Yes, and that's why I pointed you at http://www.s9y.org/43.html. If you read that, all questions regarding classes should be answered.
You open s9y, and the basic page gives no indication of how you can import pictures, format them the way you would like them viewed, or include links for other reading material. What plug-ins, that you forgot to mention, actual achieve this functionality for you.
Most plugins are self-explanatory, and inserting a picture should work easily if you just create an entry and lcick on "Insert media".

I agree though that all this "self-explanatory" stuff is no excuse to not have proper Documentation on that. I fully agree that we need more verbose documentation. Carl Galloway (www.carlgalloway.com) is duing huge work on providing documentation.

Serendipity is Open Source, so please feel free to contribute documentation. Trying out always helps a lot, because Serendipity is meant to be intuitive. And if all else fails, you can ask precise questions here which we can answer and you could use to sum up the full documentation.

Surely you know that Serendipity is provided for free, and the spirit of this means that if something annoys you, it's in your responsibility to take things into action. Like you did already, so all is well. :-)
Incidentally, s9y does not allow a visitor to navigate from one Blog to another, on a multi-user hosted Blogs site. I dont see how! Perhaps you can elaborate....
Serendipity can only have multiple users, but a user cannot have a distinct "another" blog. Serendipity is a single-blog application.

There are way and means to circumvent this, by "abusing" categories as sub-blogs, but the interaction between them is up to you, by providing your own links or plugins or configuring the Category Sidebar plugin to lead to the other sub-blogs.

In general, I find your tone very offensive, so please understand why I react that way. I feel offended by your tone of attacking me for developing a free application that might not have a full documentation. Serendipity should not be a one-man show, so I'm dependant on everyone's positive feedback and help to create things. My strengths are not documenting.

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