Lang Missing After Having Modified A Block »  Show posts from    to     

Icy Phoenix


Old Support Topics - Lang Missing After Having Modified A Block



Vortex [ Thu 24 May, 2007 14:22 ]
Post subject: Lang Missing After Having Modified A Block
That's the confirmation. The message is missing:


snapper1180009165984


Mighty Gorgon [ Sat 26 May, 2007 01:23 ]
Post subject: Re: Lang Missing After Having Modified A Block
We should need some extra informations to understand what the problem is.

Which files did you modify?

What are you missing?

When did you get that message?


Vortex [ Sat 26 May, 2007 10:13 ]
Post subject: Re: Lang Missing After Having Modified A Block
Oh, sorry MG.


I got that message missing every time I update or modify a block in cms configuration. If I create a new block I got "New block added" if I modify a block I got nothing, as shown in the screenshot.


jz [ Sat 26 May, 2007 10:20 ]
Post subject: Re: Lang Missing After Having Modified A Block
I think that's all you need to see after editing/adding a new block.

If I am not wrong you get that after cliking submit, which finalises the action.

What do you thing is missing?


Vortex [ Sat 26 May, 2007 10:59 ]
Post subject: Re: Lang Missing After Having Modified A Block
jz wrote: [View Post]

What do you thing is missing?




According to lang_cms.php, when I add a block I have:

Quote:
$lang['Block_added'] = 'Block added';



So, when I modify it, I thought I would read


Quote:
$lang['Block_updated'] = 'Block updated';


jz [ Sat 26 May, 2007 11:19 ]
Post subject: Re: Lang Missing After Having Modified A Block
I see what you mean

I think a lang_var is set wrong in one of the .tpl files


Vortex [ Sat 26 May, 2007 12:01 ]
Post subject: Re: Lang Missing After Having Modified A Block
I think I fixed it:



in cms.php



Code: [Hide] [Select]
FIND

fix_weight_blocks($l_id);
$db->clear_cache('cms_');
$message .= '<br /><br />' . sprintf($lang['Click_return_blocksadmin'], '<a href="' . append_sid('cms.' . $phpEx . '?mode=blocks&amp;l_id=' . $redirect_l_id) . '">', '</a>') . '<br />';
message_die(GENERAL_MESSAGE, $message);
}
elseif( $action == 'delete' )




Replace with:


Code: [Hide] [Select]
fix_weight_blocks($l_id);
$db->clear_cache('cms_');
$message = $lang['Block_updated'] . '<br /><br />' . sprintf($lang['Click_return_blocksadmin'], '<a href="' . append_sid('cms.' . $phpEx . '?mode=blocks&amp;l_id=' . $redirect_l_id) . '">', '</a>') . '<br />';
message_die(GENERAL_MESSAGE, $message);
}
elseif( $action == 'delete' )




I applied this on my site and it seems to work, can someone better than me in PHP please check this code?


jz [ Sat 26 May, 2007 15:34 ]
Post subject: Re: Lang Missing After Having Modified A Block
I think you've done a good job mate..

snap1_1180186441_480862


Vortex [ Fri 14 Sep, 2007 17:12 ]
Post subject: Re: Lang Missing After Having Modified A Block
Vortex wrote: [View Post]
I think I fixed it:



in cms.php



Code: [Hide] [Select]
FIND

fix_weight_blocks($l_id);
$db->clear_cache('cms_');
$message .= '<br /><br />' . sprintf($lang['Click_return_blocksadmin'], '<a href="' . append_sid('cms.' . $phpEx . '?mode=blocks&amp;l_id=' . $redirect_l_id) . '">', '</a>') . '<br />';
message_die(GENERAL_MESSAGE, $message);
}
elseif( $action == 'delete' )




Replace with:


Code: [Hide] [Select]
fix_weight_blocks($l_id);
$db->clear_cache('cms_');
$message = $lang['Block_updated'] . '<br /><br />' . sprintf($lang['Click_return_blocksadmin'], '<a href="' . append_sid('cms.' . $phpEx . '?mode=blocks&amp;l_id=' . $redirect_l_id) . '">', '</a>') . '<br />';
message_die(GENERAL_MESSAGE, $message);
}
elseif( $action == 'delete' )




I applied this on my site and it seems to work, can someone better than me in PHP please check this code?





Sorry for bumping, but I upgraded my site just this morning with the latest IP release and I saw that this has not been corrected yet, so I thought it was a good idea ^^


Mighty Gorgon [ Mon 17 Sep, 2007 01:49 ]
Post subject: Re: Lang Missing After Having Modified A Block
I'll check and eventually add this.

Thanks.




Powered by Icy Phoenix