We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Seesaw 0.4.9

Development and Programming

Marc Miller's avatar
Marc Miller
84 posts
15 years ago
Marc Miller's avatar Marc Miller

Hmm - kind of a pain to start a new thread and have to manually notify the creator rather than continuing a thread from the old system and sending auto-notifications. /end gripe.

Two things. 1) Upgradeing from 0.4.8 to 0.4.9 gives me PHP errors:

Notice: Undefined index: custom_fields in /home/site/public_html/system/extensions/ext.seesaw.php on line 853

Warning: array_key_exists() expects parameter 2 to be array, null given in /home/site/public_html/system/extensions/ext.seesaw.php on line 853

Some google searching makes me think the error is caused by PHP 5.3. Does array_merge not work the same in 5.3? If I comment out line 829

$settings[$channel_id][‘custom_fields’] = array_merge($custom_fields , $gypsy_fields);

and put it the 0.4.8 version:

$settings[$channel_id][‘custom_fields’] = $custom_fields;

I don’t see the errors, but obviously, I’m also not getting the full benefits of .9 either.

2) I made some modifications to get this feature request in and working with an MSM site.

  1. Find around line 748:
// start off with the default edit view
        $settings = array(
            'channel_0' => array(
                'title' => $LANG->line('default_view'),
                'core_fields' => $this->available_core_fields,
                'custom_fields' => array()
            )
Replace:
// start off with the default edit view
        $settings = array(
            'channel_0' => array(
                'site' => $LANG->line('default_view'),
                'title' => $LANG->line('default_view'),
                'core_fields' => $this->available_core_fields,
                'custom_fields' => array()
            )
  1. Find around line 776
// query for channels
        $channels_query = $DB->query('SELECT weblog_id, blog_title, field_group
                             FROM ' . $this->db_prefix . '_weblogs');
Replace:
// query for channels
        $channels_query = $DB->query('SELECT s.site_label AS site_label, w.weblog_id AS weblog_id, w.blog_title AS blog_title, w.field_group AS field_group
                             FROM ' . $this->db_prefix . '_weblogs w INNER JOIN '. $this->db_prefix .'_sites s ON s.site_id = w.site_id');
  1. Find around line 781
foreach($channels_query->result as $channel) {
                $channel_id = 'channel_' . $channel['weblog_id'];
                $settings[$channel_id] = array(
                    'title' => $channel['blog_title'],
                    'core_fields' => $this->available_core_fields,
                    'custom_fields' => array()
                );
Replace
foreach($channels_query->result as $channel) {
                $channel_id = 'channel_' . $channel['weblog_id'];
                $settings[$channel_id] = array(
                    'site' => $channel['site_label'],
                    'title' => $channel['blog_title'],
                    'core_fields' => $this->available_core_fields,
                    'custom_fields' => array()
                );
  1. Find around line 305
$DSP->body .= $DSP->qdiv('defaultBold', $channel_settings['title']);
Replace
$DSP->body .= $DSP->qdiv('defaultBold', $channel_settings['site'] . ' : ' . $channel_settings['title']);

Technically, this will work whether or not you have the MSM installed, but I guess there’s no reason to do this if you don’t have it.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.