The extension adds a nice touch, but I ran into an odd issue. See this thread: http://ellislab.com/forums/viewthread/106076/
It is probably the same isolated bug I got with sequential gallery related entries.
I changed the regex slightly and that did the trick. If the author doesn’t mind I’ll post the edit for that.
How I managed to bring it down to that is the returned html is via preg_replace, when that function fails it returns NULL (iirc). In my own code I forgot to check if the preg replace fails but changing the regex somehow did the trick (makes no sense since the html it is searching is exactly the same).
Publish Tweeks 0.7.2
$new = 'div class="submitBox">
<input class="submit" type="submit" value="' . $value . '" name="submit" /></div>
<div class="uploadBox"';
$find = "#div class='submitBox'.+div class='uploadBox'#is";
return preg_replace($find, $new, $html);
My ‘fix’ (now updated to work around preg_replace errors)
$new = 'div class="submitBox">
<input class="submit" type="submit" value="' . $value . '" name="submit" /></div>';
$find = "#div class='submitBox'.+?</div>#is";
$temp_html = preg_replace($find, $new, $html);
$html = ($temp_html === NULL ) ? $html : $temp_html;
return $html;
If you want to add a setting to remove the Upload File box:
Replace in ext.publish_tweeks.php (in the fix above)
return $html;
with
// Remove upload box?
if( isset( $this->settings['other_settings_remove_upload_box'] ) AND ( $this->settings['other_settings_remove_upload_box'] === 'y' ) )
{
$new = '';
$find = "#<div class='uploadBox'.+?</div>#is";
$temp_html = preg_replace($find, $new, $html);
$html = ($temp_html === NULL ) ? $html : $temp_html;
}
return $html;
and
// Close Form
With
// Other Settings
$DSP->body .= $DSP->table_open(
array(
'class' => 'tableBorder',
'border' => '0',
'style' => 'margin-top:18px; width:100%'
)
);
$DSP->body .= $DSP->tr()
. $DSP->td('tableHeading', '', '2')
. $LANG->line("other_settings_title")
. $DSP->td_c()
. $DSP->tr_c();
$DSP->body .= $DSP->tr()
. $DSP->td('tableCellOne', '60%')
. $DSP->qdiv('defaultBold', $LANG->line("other_settings_remove_upload_box_label"))
. $DSP->td_c();
$DSP->body .= $DSP->td('tableCellOne')
. '<select name="other_settings_remove_upload_box">'
. $DSP->input_select_option('y', $LANG->line('yes'), ($current['other_settings_remove_upload_box'] == 'y' ? 'y' : ''))
. $DSP->input_select_option('n', $LANG->line('no'), ($current['other_settings_remove_upload_box'] != 'y' ? 'y' : ''))
. $DSP->input_select_footer()
. $DSP->td_c()
. $DSP->tr_c();
$DSP->body .= $DSP->table_c();
// Close Form
in language/english/lang.publish_tweeks.php:
replace
/* END */
with
// -- Other settings
'other_settings_title' =>
'Other Settings',
'other_settings_remove_upload_box_label' =>
'Remove "Upload File" box?',
/* END */
I think I found an issue with this extension and the Playa extension. While this was enabled, any weblogs that have more than 1 playa field just output a blank cp screen. tried updating to 0.7.2, same result. Just FYI
try the above modification? http://ellislab.com/forums/viewreply/534348/
No, I just read through it, isn’t that just so you can have the ability to remove the upload file functionality?
I was saying that this extension afaik is conflicting with the Playa extension when you have more than 1 playa field in your field group. Would the above mod fix this?
No, I just read through it, isn’t that just so you can have the ability to remove the upload file functionality? I was saying that this extension afaik is conflicting with the Playa extension when you have more than 1 playa field in your field group. Would the above mod fix this?
Check post #33. I had a similar problem with sequential related gallery dropdowns, the mod in #33 fixed it for me. the post after that is if you want to add the option to remove upload file via a setting.
I’ve found a pretty serious bug with 0.7.2 (not sure about other versions). By default, the system will truncate textareas in the CP so you can’t get more text in there than MySQL will allow. With this extension enabled, it appears this doesn’t happen - it will allow you to enter more characters than MySQL will allow. If you go back and try to edit your entry again all you get in the CP is a blank white page - no PHP errors, no nothing. The front end of the website will show the content so it isn’t quite as bad, but you can’t get back in to edit at all (you have to go into MySQL and modify the field manually).
I’ve just turned off the extension for now and everything is back to normal, but would love to know when it’s fixed.
Thanks!
I get this error when I get to the Edit page: Notice: A session had already been started - ignoring session_start() in /home/xxxxxx/public_html/xxxxx/extensions/ext.publish_tweeks.php on line 151
FYI– I fixed this by doing the following to both session_start() lines:
if (session_id() == "") {
session_start();
}
New Release 0.8!
http://www.ngenworks.com/software/ee/publish-tweeks/
CHANGELOG
• Redesigned the message area when an entry is updated to be more noticeable • Bug fix: suppress session_start notice message • Bug fix: moved button text to language file • Bug fix: moved update/saved message to language file
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.