【问题标题】:Site URL in editor in Joomla 2.5Joomla 2.5 编辑器中的站点 URL
【发布时间】:2012-10-18 09:51:04
【问题描述】:

是否可以在 joomla 2.5 的 HTML 编辑器中获取网站 URL。我需要为电子邮件正文提供图片 URL。

代码

<img src="<?php JURI::base()?>/templates/dayo/images/sign.png" width="200" />

提前致谢

【问题讨论】:

  • 发布你到目前为止尝试过的代码
  • `/templates/temp1/images/header.png" width="200" />' 我在 html 中写了这个后端编辑器

标签: email joomla joomla2.5


【解决方案1】:

我认为您可以在电子邮件正文中使用字符串替换功能。

您必须在编辑器中放置一个代码 [image] 。在获取 Post 值时,您必须将字符串 [image] 替换为图像 url。

字符串替换示例代码:

$mailbody = "mail body value [image] and description";
$imageurl = '';
$body     = str_replace("[image]", $imageurl, $mailbody);

【讨论】:

    猜你喜欢
    • 2012-10-09
    • 1970-01-01
    • 1970-01-01
    • 2017-02-18
    • 2013-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多