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:

le="color: #000000"><?php $xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));


add after:
le="color: #000000"><?php 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:
le="color: #000000"><?php <{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:

le="color: #000000"><?php header( "Location: ".strtr($url,array("r"=>'',"n"=>'') ) ) ;


Should be:
le="color: #000000"><?php 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

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!