SmartFAQ is developed by The SmartFactory (https://www.smartfactory.ca), a division of InBox Solutions (https://www.inboxsolutions.net)

How do I change the look and feel of the pages that show system redirect messages (e.g. "Thank you for logging in...")?
Open:
root/modules/system/templates: system_redirect.html
and simply start modifying this template to your desires.


The comments are owned by the author. We aren't responsible for their content.
user

 Wrapping the system_redirect template ... How do you do that?


Quote:


Open:
root/modules/system/templates: system_redirect.html
and simply start modifying this template to your desires.


Looks like an easy thing to do. However, I would it to appear like a 'block' and an example here would be greatly appreciated

Many thanks ... J.

 
user

 Re: Wrapping the system_redirect template ... How do you ...


You mean you want to see it as a block within your website? if yes, do this:

open /include/functions.php and find line:

$xoopsTpl->assign('lang_ifnotreload'sprintf(_IFNOTRELOAD$url));


add after:
if( ! headers_sent() ) {
            
$_SESSION['redirect_message'] = $message ;
            
header"Location: ".strtr($url,array("r"=>'',"n"=>'') ) ) ;
            exit ;
        }


then:
open /themes/yourthem/theme.html and place the following code where you want your redirect message to show:
<{if $smarty.session.redirect_message != ""}>
    <
div class="message"><{$smarty.session.redirect_message}></div>
    <{
php}>
        if( ! empty( 
$_SESSION['redirect_message'] ) ) 
        {
            unset( 
$_SESSION['redirect_message'] ) ;
        }
    <{/
php}>
    <{/if}>


notice that the div has the class message, make sure you either include it in your style.css or by styling it within theme.html (remove class).

 
user

 Re: Wrapping the system_redirect template ... How do you ...


Cheers! ladon ... I'll try to implement this once I've finalised my theme.

Best regards, Jason

 
user

 Re: Wrapping the system_redirect template ... How do you ...


@ ladon ...

Could you kindly share with me your class "message", please? ... Many thanks!

Anyway, I've followed preciously what you've taught me (with a crude "message" class. However, the messages are not appearing as a block somehow. I would appreciate it if these messages can appear as a block at the center-center column of my webpages. Any idea what is amissed?

By the way, I'm operating my web portal on XOOPS 2.0.15 ...


Cheers ... Jason

 
user

 Re: Wrapping the system_redirect template ... How do you ...


I don't know if anyone will ever read this... but I just had to add my addition to this otherwise excellent guide. The line:

header"Location: ".strtr($url,array("r"=>'',"n"=>'') ) ) ;


Should be:
header"Location: ".strtr($url,array("r"=>'',"n"=>''"& amp;"=>'&') ) ) ;

(remove the space between the '&' and the 'amp;')

So it will properly output GET signs in the URL.

 


Login

Who's Online

114 user(s) are online (2 user(s) are browsing XOOPS FAQ)


Members: 0


Guests: 114


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

you can speed up ADSL firefox browsing by a change in configurations.

Random question

What is an 'Absolute Path'?