slabbi wrote:The only way to fix this for your template is to remove the text manually.
Maybe you can change the uddeJSEFredirect function, so that no text is passed to mosRedirect.
Thanks for the quick reply.
This is what I ended up doing and it wasn't that difficult.
in "components/com_uddeim/includes.php" I altered two functions, uddeJredirect and uddeJSEFredirect as follows
FROM:
[code:1]
function uddeJredirect($url, $msg='') {
global $mainframe;
$redirecturl = $url;
if ( class_exists('JRoute') ) {
$mainframe->redirect( $redirecturl, JText::_($msg) );
}
mosRedirect( $redirecturl, $msg );
}
function uddeJSEFredirect($url, $msg='') {
global $mainframe;
if ( class_exists('JRoute') ) {
$redirecturl = JRoute::_($url, false);
$mainframe->redirect( $redirecturl, JText::_($msg) );
}
$redirecturl = sefRelToAbs($url);
mosRedirect( $redirecturl, $msg);
}
[/code:1]
TO:
[code:1]
function uddeJredirect($url, $msg='') {
global $mainframe;
$redirecturl = $url;
if ( class_exists('JRoute') ) {
$mainframe->redirect( $redirecturl, JText::_($msg) );
}
//added
if (trim( $redirecturl )) {
if (strpos( $url, '?' )) {
$redirecturl .= '&nomosmsg=' . $msg ;
} else {
$redirecturl .= '?nomosmsg=' . $msg ;
}
}
//added end
//mosRedirect( $redirecturl, $msg );//org
mosRedirect( $redirecturl);//changed
}
function uddeJSEFredirect($url, $msg='') {
global $mainframe;
if ( class_exists('JRoute') ) {
$redirecturl = JRoute::_($url, false);
$mainframe->redirect( $redirecturl, JText::_($msg) );
}
$redirecturl = sefRelToAbs($url);
//added
if (trim( $redirecturl )) {
if (strpos( $url, '?' )) {
$redirecturl .= '&nomosmsg=' . $msg ;
} else {
$redirecturl .= '?nomosmsg=' . $msg ;
}
}
//added end
//mosRedirect( $redirecturl, $msg);//org
mosRedirect( $redirecturl);//changed
}
[/code:1]
and then added at the bottom of the function print_uddemenu in the same includes.php file this snippet to display the message within the menu
As you see I added some table formating too for nicely displaying the message on the right side. Top of this table is not shown in the snippet.
>> I tried to post that snippet here for 20 times but joomlaboard is generating error with that snipped and is not letting me to submit this post. It seems that any attempt to use GET var will kill the message, even if I put it in the code tags.<<
The whole difference was not sending $msg from uddeJredirect and uddeJSEFredirect to mosRedirect, and rather append to url our own message in "nomosmsg" and then getting it after submission from GET "nomosmsg".
It wasn't that hard after all. Thanks again.
Post edited by: vilo, at: 2008/08/10 22:09