Page 1 of 1
stuck on a few things about embedding
Posted: Mon Aug 16, 2004 1:07 am
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).
Re: stuck on a few things about embedding
Posted: Mon Aug 16, 2004 10:30 am
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!

Posted: Mon Aug 16, 2004 11:16 am
by sokar
what i meant was be able to turn this:

to something maybe like this (example only.. not really how i want it to look):

the border around the entries would be either jpg or gif
Posted: Mon Aug 16, 2004 11:24 am
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.
Posted: Mon Aug 16, 2004 7:40 pm
by sokar
it will probably be fixed widths... any instructions on how to accomplish that with css?
Posted: Wed Aug 18, 2004 9:54 am
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?
Posted: Wed Aug 18, 2004 10:18 am
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
Posted: Wed Aug 18, 2004 6:32 pm
by sokar