Hi Martin!
First off, thanks for your praise. We highly appreciate that!
1: What should I edit to make s9y include a .html or .php page in the maincontent area without the blog-formatting? I'd like to have pages with photo-album, links or other content available from the sidebar, and I'd like to retain the sidebar there while it's showing.
For this, you'd need to create your own plugin. We have a real powerful plugin-API, where you can assign any content you like pretty anywhere.
In your case, you would need to use the 'entry_display' hook in a plugin. This would look like:
Code: Select all
<?php
class serendipity_event_spamblock extends serendipity_event {
function introspect(&$propbag) {
global $serendipity;
$propbag->add('name', 'My Photoalbum');
$propbag->add('description', 'Show my Photoalbum');
$propbag->add('event_hooks', array('entry_display' => true));
}
function generate_content(&$title) {
$title = 'Photoalbum';
// Put your content here. It will be shown instead of an entry list in the
// center of your page!
include 'photoalbum.php';
}
function event_hook($event, &$bag, &$eventData, $addData = null) {
global $serendipity;
$hooks = &$bag->get('event_hooks');
if (isset($hooks[$event])) {
switch($event) {
case 'entry_display':
if (!isset($serendipity['GET']['subpage']) || $serendipity['GET']['subpage'] != 'photoalbum') {
$title = '';
$this->generate_content($title);
$eventData['clean_page'] = true; // This is important to not display an entry list!
}
return true;
break;
default:
return false;
break;
}
} else {
return false;
}
}
}
/* vim: set sts=4 ts=4 expandtab : */
?>
Pay special attention to the $serendipity['GET']['subpage'] and the 'clean_page' variables. Those mean that if you open your blog with:
http://yourdomain/yourblog/index.php?se ... photoalbum
you will see the output of your plugin (which includes photoalbum.php). I hope this is what you're looking for.
2. Would there be any way for me to modify the admin area to contain for example the snippet of code necessary to launch a pop-up url? I found the code by reverse-engineering the "comment-popup code" from my browsers source window, but it's kind of a drag having to do that everytime.
You could use our bundled WYSIWYG-editor for this (htmlarea). It enables the easy addition of buttons with custom code to it. You could also either modify the serendipity_functions.inc.php file, function 'serendipity_printEntryForm', where s9y defines its own buttons. At that point you [or we

] could also place an plugin event hook, so that you can create a plugin which generates additional clickable buttons for any kind of custom code. However we can only insert that hook in a future release of serendipity, since the current 0.7 release is in feature freeze. But you could easily modify the code in that function like this:
Code: Select all
<?php
/* Since the user has WYSIWYG editor disabled, we want to check if we should use the "better" non-WYSIWYG editor */
if (!$serendipity['wysiwyg'] && eregi($serendipity['EditorBrowsers'], $_SERVER['HTTP_USER_AGENT']) ) {
?>
<input type="button" name="insI" value="I" accesskey="i" style="font-style: italic" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[body]'],'<i>','</i>')" />
<input type="button" name="insB" value="B" accesskey="i" style="font-weight: bold" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[body]'],'<b>','</b>')" />
<input type="button" name="insU" value="U" accesskey="u" style="text-decoration: underline;" onclick="wrapSelection(document.forms['serendipityEntry']['serendipity[body]'],'<u>','</u>')" />
<?php
serendipity_event_hook('backend_buttonlist', $serendipity);
?>
And then you could create a plugin which listens for the backend_buttonlist event and emoits simple <input> buttons like the other ones.
I hope you get what I mean, I don't know how much you are able to code.
3. Where do I find the code to modify the comments popup? My background image is making it fairly illegible.
You can easily use CSS to style the popup window seperately, by using:
Code: Select all
#serendipity_comment_page {
background-image: url('non-illegibale-image.png');
}
Good luck and have fun exploring s9y,
Garvin.