Page 1 of 1
Bundled help entries
Posted: Fri Jan 27, 2006 5:33 am
by judebert
Garvin,
I originally discarded Serendipity because the preview at opensourcecms.com didn't have anything even remotely interesting. They use only the default install, of course, so the only thing I saw was a big, blank, blog. With sidebars.
I'd like to propose making the default install of 1.0 come with help entries. I've put a sample on
http://s9y.judebert.com/0_9_1 for your perusal.
I think adding a checkbox to the install page (so advanced users wouldn't need to install these entries or the welcome category) is recommended.
Let me know what you think.
Posted: Fri Jan 27, 2006 7:09 am
by mgroeninger
I actually really like that idea... I mean... I
really like that idea...
The only thing I would add would be a community entry which points to the blog, the wiki, and the forums...
While hopefully anyone who has downloaded and installed it has found those things, it might be a nice reminder (plug the blog is under advertised anyway), and an invitiation to participate might make new users feel "warm and fuzzy"....

Posted: Fri Jan 27, 2006 12:01 pm
by garvinhicking
I must admit that I actually hate CMSes/blogs that put dummy content into my blog. That means deleting entries (or an entry). So I wouldn't really feel good with having that option as a default option.
Having it as an option without setting it the default somewhat defies the original intention; servers like opensourcecms wouldn't install it then, I guess.
Instead, how would it be to put up a "Serendipity Demo Paackage"? This can be downloaded especially for people running demos, and it'll have some more plugins bundled plus some dummy content? We'd need a script that bundles that, plus modifying the installer so that it inserts the additional entries...?
Regards,
Garvin
Posted: Fri Jan 27, 2006 3:46 pm
by judebert
That could work. I don't like calling it "Demo", since that sounds like we're selling a version with crippled features. Maybe "Default" or "for Dummies?" No, that's offensive and probably infringes on copyright.
How about "Preloaded"? "Serendipity Preloaded" and "Serendipity Blog", where Preloaded has the help text built in.
We could even avoid the installer modification if we make it detect the existence of a "preload.sql" file. If it exists, we use it to preload the database after it's created. Can we do the same thing for plugins with a "preload.php" script?
Posted: Fri Jan 27, 2006 3:59 pm
by garvinhicking
That's a cool idea. Could you try this patch:
Code: Select all
Index: include/functions_installer.inc.php
===================================================================
--- include/functions_installer.inc.php (revision 878)
+++ include/functions_installer.inc.php (working copy)
@@ -127,13 +127,22 @@
* @return null
*/
function serendipity_installDatabase() {
- global $serendipity;
- $queries = serendipity_parse_sql_tables(S9Y_INCLUDE_PATH . 'sql/db.sql');
- $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);
+ global $serendipity;
- foreach ($queries as $query) {
- serendipity_db_schema_import($query);
- }
+ $queries = serendipity_parse_sql_tables(S9Y_INCLUDE_PATH . 'sql/db.sql');
+ $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);
+
+ foreach ($queries as $query) {
+ serendipity_db_schema_import($query);
+ }
+
+ if (file_exists(S9Y_INCLUDE_PATH . 'sql/preload.sql')) {
+ $queries = serendipity_parse_sql_tables(S9Y_INCLUDE_PATH . 'sql/preload.sql');
+ $queries = str_replace('{PREFIX}', $serendipity['dbPrefix'], $queries);
+ foreach ($queries as $query) {
+ serendipity_db_schema_import($query);
+ }
+ }
}
/**
Index: include/plugin_api.inc.php
===================================================================
--- include/plugin_api.inc.php (revision 878)
+++ include/plugin_api.inc.php (working copy)
@@ -52,6 +52,23 @@
serendipity_plugin_api::create_plugin_instance('serendipity_event_nl2br', null, 'event');
serendipity_plugin_api::create_plugin_instance('serendipity_event_browsercompatibility', null, 'event');
serendipity_plugin_api::create_plugin_instance('serendipity_event_spamblock', null, 'event');
+
+ /* Register additional plugins? */
+ if (file_exists(S9Y_INCLUDE_PATH . 'plugins/preload.txt')) {
+ // Expects this format, one plugin per line:
+ // serendipity_event_xxx:event
+ // serendipity_plugin_xxx:left
+ $plugins = file(S9Y_INCLUDE_PATH . 'plugins/preload.txt');
+ foreach($plugins AS $plugin) {
+ $plugin = trim($plugin);
+ if (empty($plugin)) {
+ continue;
+ }
+
+ $plugin_info = explode(':', $plugin);
+ serendipity_plugin_api::create_plugin_instance($plugin_info[0], null, $plugin_info[1]);
+ }
+ }
}
/**
I think you get the places where to look at by looking at the patch
Regards,
Garvin
Posted: Fri Jan 27, 2006 4:42 pm
by judebert
Sure thing. I'll make a database dump for the preload.sql and a simple preload.txt (including SPARTACUS and maybe extended entry properties) when I get some free time. Could be late tonight.
Posted: Fri Jan 27, 2006 4:47 pm
by garvinhicking
Take your time. Would be awesome if this works that easily.
Best regards,
Garvin