PEAK XOOPS - Speed up your XOOPS site :-) updated number 2!!! in englishin japanese

Speed up your XOOPS site :-) updated number 2!!!

  • As this forum is only for commentation, you cannot open a new topic
  • Guests cannot post into this forum
Target News
Subject お手軽高速化!:-) updated
Summary リダイレクトメッセージは、時間がかかって邪魔だと思いませんか?実際、あのリダイレクトメッセージは、無駄なサーバ負荷にもなっています。とうわけで、okuhikiさんの書込をヒントに、メッセージをじっくり読みたい人にも、さくさく作業したい人にも最善と思われるHack...
Previous post - Next post | Parent - Children.1 | Posted on 2006/12/9 8:41
slyss79  三等軍曹   Posts: 143
in your theme.html delete this:

[code]
<{php}>
if( ! empty( $_SESSION['redirect_message'] ) ) {
if( empty( $this->_tpl_vars['xoops_lblocks'] ) ) $this->_tpl_vars['xoops_lblocks'] = array() ;
array_unshift( $this->_tpl_vars['xoops_lblocks'] , array( 'title' => 'Message' , 'content' => $_SESSION['redirect_message'] , 'weight' => 0 ) ) ;
$this->_tpl_vars['xoops_showlblock'] = 1 ;
unset( $_SESSION['redirect_message'] ) ;
}
<{/php}>
[/code]

and insert this:

[code]
<{php}>
if( ! empty( $_SESSION['redirect_message'] ) ) {
$this->_tpl_vars['xoops_msg'] = $_SESSION['redirect_message'];
unset( $_SESSION['redirect_message'] ) ;
}
<{/php}>
[/code]

Now you can use the smarty's variable [b]<{$xoops_msg}>[/b] and you can put the redirect messagge where you want in the theme.html

i hope this feature is appreciated....

thanks to dead from xoopsitalia.

sly

[url=http://www.xoopsitalia.org/modules/newbb/viewtopic.php?post_id=38114#forumpost38114]originale message[/url]
Votes:2 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2007/9/7 4:32
marco  上等兵   Posts: 27
hello,

is this nice improvement already integrated in XC/XCL?
how manages XC/XCL the redirect page, or dos it user another nicest way?
thx for your explanation
marco
Votes:4 Average:7.50
Previous post - Next post | Parent - No child | Posted on 2007/9/9 6:24
GIJOE  先任軍曹   Posts: 4110
With XCL 2.1, you need not hack include/functions.php.

Just edit the template "legacy_redirect.html".

Insert it into the top of the template.
<{php}>
  if( ! headers_sent() ) {
    $_SESSION["redirect_message"] = $this->_tpl_vars["message"];
    header("Location: ".html_entity_decode($this->_tpl_vars["url"],ENT_QUOTES));
    exit;
  }
<{/php}>

You also have to edit theme.html like the hack for X2.
Votes:2 Average:5.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!