Next to the "print this page" on every page in the standard templates, I'd want to have a "mail this page"-option. I've seen it on a lot of pages, but not in CMSMS. Does anyone know how to insert this.
The "Print This Page" is done by calling a standard "TAG", but the similar "MAIL"-tag is missing.
[SOLVED] "Mail this page"
[SOLVED] "Mail this page"
Last edited by RonnyK on Wed Jan 10, 2007 10:37 am, edited 1 time in total.
-
cyberman
Re: "Mail this page"
Have you read thisRonnyK wrote: Does anyone know how to insert this.
http://forum.cmsmadesimple.org/index.ph ... 827.0.html
Re: "Mail this page"
I created the following code in a UDT called "rk-mail":
this lead to the following error.
and called it in a page usingfunction curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
echo '';
Code: Select all
{rk-mail}Someone any ideas??string(123) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized tag: rk-mail (Smarty_Compiler.class.php, line 439)" string(117) "Smarty error: [in content:content_en line 1]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 583)"
Re: "Mail this page"
Rename the tag to rk_mail and it should work...
Regards,
D
Regards,
D
Re: "Mail this page"
Thanks D,
taht did the trick. One question, why does it work using a "underscore" and not work using the "minus" in the name of the UDT. I often use my initials as a prefix before a code, in this case before mail, because if the tag "mail" is introduced in the core, my own UDT isn't in the way.
Ronny
taht did the trick. One question, why does it work using a "underscore" and not work using the "minus" in the name of the UDT. I often use my initials as a prefix before a code, in this case before mail, because if the tag "mail" is introduced in the core, my own UDT isn't in the way.
Ronny
Re: [SOLVED] "Mail this page"
It can only contain letters, numbers and underscores.RonnyK wrote: why does it work using a "underscore" and not work using the "minus" in the name of the UDT
http://smarty.php.net/manual/en/plugins ... ntions.php
http://www.php.net/language.variables
[edit]
Updated wiki.
[/edit]
Last edited by Anonymous on Tue Jan 09, 2007 8:54 pm, edited 1 time in total.


