在ExpressionEngine中保留标题的大小写?

Lin*_*son 6 expressionengine

在EE 1下,我能够破解源代码以允许我保留url标题与标题的确切情况.也就是说,我能够阻止所有url标题为小写.

我需要在EE 2上复制相同的行为,但到目前为止我还没有完全管理.

到目前为止我所做的是:

In <system>/expressionengine/modules/channel/mod.channel_standalone.php:

commented out this line: NewText = NewText.toLowerCase();

added “A-Z” to this line: NewText = NewText.replace(/[^a-z0-9-_]/g,’‘);

In <system>/expressionengine/helpers/EE_url_helper.php:

removed strtolower() from this section:

  if ($lowercase === TRUE)
  {
  $str = strtolower($str);
  }

added “A-Z” to this line: [^a-z0-9\-\._]
Run Code Online (Sandbox Code Playgroud)

我不确定所有这些变化是否真的需要,但我想是的.从外观上看,对mod.channel_standalone.php的更改应该通过独立的条目形式处理任何提交,并且对EE_url_helper.php的更改应该处理常规发布.

除了实时URL之外,它几乎可以.我输入标题时生成的URL以小写形式生成.但是,如果我在保存帖子之前将其删除,则会在网址标题中以与标题相同的大小写保存帖子.至少,它大部分时间都这样做.有时,它会使用小写网址保存.

如果有人能够告诉我如何获得实时URL标题以进行合作,我将非常感激.

Jer*_*oys 5

这发生在themes/javascript/compressed/jquery/plugins/ee_url_title.js.

由于Javascript是压缩的,因此可能有点难以找到,但您要编辑的表达式是: a = (k + a).toLowerCase().replace(d, c);