stuck on a few things about embedding

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
sokar
Regular
Posts: 5
Joined: Mon Aug 16, 2004 12:33 am
Contact:

stuck on a few things about embedding

Post by sokar »

The main problem i'm having with embedding is the sidebar items. I want to be able to put those items anywhere on the page 1 item at a time. Is there a way to do that? or is the only way embeding the items is to do it in 1 single chain?

Another thing is that I want to be able to output the blog entry on seperate tables for every day. Right now, it's only outputting every entry into 1 table. This would be useful when I skin the entries with graphical borders or other stuff.

And the last small thing is how to change the time format the entry displays? It's currently showing 24hr format and I've tried many ways to change it but it never worked. Screwed my whole blog up once (it only displayed blank page).
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: stuck on a few things about embedding

Post by garvinhicking »

Hi!
sokar wrote:The main problem i'm having with embedding is the sidebar items. I want to be able to put those items anywhere on the page 1 item at a time. Is there a way to do that? or is the only way embeding the items is to do it in 1 single chain?
You can independently display a sidebar item anywher in your embedded file after the plugin api is included via:

Code: Select all

<?php
$title = '';
$plugin =& serendipity_plugin_api::load_plugin('@serendipity_calendar_plugin:e686a8c47dc95e6b24490d5a3a05e4df');
$plugin->generate_content($title);
?>
The name used for the load_plugin command is taken from your DB table serendipity_plugins. Just copy+paste that code for your specific plugin.
Another thing is that I want to be able to output the blog entry on seperate tables for every day. Right now, it's only outputting every entry into 1 table. This would be useful when I skin the entries with graphical borders or other stuff.
I'm sorry, I don't really understand what you want? You can skin all the Divs via CSS already?!? And do you mean entries now, or plugins?
And the last small thing is how to change the time format the entry displays? It's currently showing 24hr format and I've tried many ways to change it but it never worked. Screwed my whole blog up once (it only displayed blank page).
Edit your lang/serendipity_lang_de.inc.php (or en.php or whatever) file and adjust the DATE_FORMAT_ENTRY / DATE_FORMAT_SHORT variables. You can use placeholders like described in www.php.net/strftime

Have fun! :-)
# 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/
sokar
Regular
Posts: 5
Joined: Mon Aug 16, 2004 12:33 am
Contact:

Post by sokar »

what i meant was be able to turn this:
Image
to something maybe like this (example only.. not really how i want it to look):
Image
the border around the entries would be either jpg or gif
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Okay, that looks like something which can't be done easily with CSS only. It would work with fixed widths, but not dynamic, there you'd need at least 2 more elements in the header.

You can add your own CSS/HTML code if you look at the serendipity_printEntries() function. But I sadly have to tell you, you'd need to modify code itself to add those elements, it can't be done template-only.

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/
sokar
Regular
Posts: 5
Joined: Mon Aug 16, 2004 12:33 am
Contact:

Post by sokar »

it will probably be fixed widths... any instructions on how to accomplish that with css?
sokar
Regular
Posts: 5
Joined: Mon Aug 16, 2004 12:33 am
Contact:

Post by sokar »

also, i embedded most plugins successfully, but the calendar does not have links on the dates of posts.. it's just a plain calendar. and i could not embed the recent entries plugin using the same way. i'm guessing it's because the plugin is not an api plugin?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

About the CSS, I'm sorry and can't help you really. Maybe you look at csszengard.com and some other tutorials about that?

Regarding your embedded plugins - can you give a .phps example of how your code looks like?

The calendar needs access to all those nifty $serendipity variables, so you need to have those fetched before executing the plugin. Those variables are assigned in serendipity_config.inc.php...

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/
sokar
Regular
Posts: 5
Joined: Mon Aug 16, 2004 12:33 am
Contact:

Post by sokar »

Post Reply