我正在努力做的是做一个'行话破坏者'.基本上我在数据库中有一些html和一些词汇表术语.当人们点击行话破坏者时,它会用一个漂亮的工具提示(wztooltip)替换文本中的单词,这些工具提示显示了它们的含义.
我一直在努力研究这个问题并且一直在认真研究这个问题 Regex/DOMDocument - 匹配并替换不在链接中的文本
似乎答案在于simple_html_dom库,但是我无法让它工作.显然,任何已经链接的单词都不会被触及.这是我所得到的内容.
$html = str_get_html($article['content']);
$query_glossary = "SELECT word,glossary_term_id,info FROM glossary_terms WHERE status = 1 ORDER BY LENGTH(word) DESC";
$result_glossary = mysql_query_run($query_glossary);
while($glossary = mysql_fetch_array($result_glossary)) {
$glossary_link = SITEURL.'/glossary/term/'.string_to_url($glossary['word']).'-'.$glossary['glossary_term_id'];
if(strlen($glossary['info'])>400) {
$glossary_info = substr(strip_tags($glossary['info']),0,350).' ...<br /> <a href="'.$glossary_link.'">Read More</a>';
}
else {
$glossary_info = $glossary['info'];
}
$glossary_tip = 'href="javascript:;" onmouseout="UnTip();" class="article_jargon_highligher" onmouseover="'.tooltip_javascript('<a href="'.$glossary_link.'">'.$glossary['word'].'</a>',$glossary_info,400,1,0,1).'"';
$glossary_word = $glossary['word'];
$glossary_word = preg_quote($glossary_word,'/');
//once done we can replace the words with a nice tip
foreach ($html->find('text') as $element) {
if …Run Code Online (Sandbox Code Playgroud) 我需要一个css gunu来帮助我解决这个问题.我有一个标签,它是一个固定宽度和高度的块元素.其中是背景图像和图像标题.我正在尝试将文本对齐到底部,我没有在哪里.我试过做显示:table-cell; 垂直对齐:底部; 和各种不同的方式.无处可去.我知道我可以做行高,但在元素周围有奇怪的虚线.只是尝试在一个标签内有一个带有文本的跨度并且垂直对齐但是虽然下划线已经移动到底部但没有快乐.这很奇怪!任何帮助非常感谢.理查德
我在产品页面上有产品对象但是当我尝试使用以下内容获取类别ID时:
$_product->getCategoryIds();
Run Code Online (Sandbox Code Playgroud)
要么:
$_product->getResource()->getAttribute('category_ids')->getFrontend()->getValue($_product);
Run Code Online (Sandbox Code Playgroud)
它为我提供了所有类别ID,我只想要我所在的商店.
这是一个多线圈环境因此我的问题.其他一切似乎都没问题,类别列表工作正常.这是我唯一的问题.有人可以帮忙吗?
基本上我每个都有2个带有'小部件'的列表,其中一些可能非常大.我已将所有代码简化为此.这是javascript
<script type="text/javascript">
$(function() {
$(".homepage-right" ).sortable({
revert: 200,
connectWith:["#homepage-left","#homepage-right"],
placeholder: "homepage-element-placeholder",
cancel: ".homepage-disable-drag",
opacity:0.7,
distance:30,
handle:".box-title",
start: function (event,ui) {
height = $(ui.item).outerHeight();
left_height = $("#homepage-right").height();
$("#homepage-left").attr(\'height\',(height+left_height)+\'px\');
$(".homepage-left" ).css(\'padding-bottom\',height*2);
$(".homepage-element-placeholder").css(\'height\',height);
},
receive: function(event,ui) {
homepage_reload_node(event,ui,2);
},
stop: function(event,ui) {
homepage_save_layout();
$(".homepage-left" ).css(\'padding-bottom\',\'0px\');
$(".homepage-right" ).css(\'padding-bottom\',\'0px\');
}
});
$(".homepage-left" ).sortable({
revert: 200,
connectWith:["#homepage-left","#homepage-right"],
placeholder: "homepage-element-placeholder",
cancel: ".homepage-disable-drag",
opacity:0.7,
handle:".box-title",
start: function (event,ui) {
height = $(ui.item).outerHeight();
left_height = $("#homepage-right").height();
$("#homepage-right").attr(\'height\',(height+left_height)+\'px\');
$(".homepage-right" ).css(\'padding-bottom\',height*2);
$(".homepage-element-placeholder").css(\'height\',height);
},
receive: function(event,ui) {
homepage_reload_node(event,ui,1);
},
stop: function(event,ui) …Run Code Online (Sandbox Code Playgroud) 大家好我的问题是我有一个jquery移动网站,其链接像正常一样
<a href="http://mysite.com/login">Login</a>
Run Code Online (Sandbox Code Playgroud)
现在,当他们在firefox等中访问该页面时,它会转到
http://mysite.com/#login
Run Code Online (Sandbox Code Playgroud)
然后浏览器启动并删除#以便进入
http://mysite.com/login
Run Code Online (Sandbox Code Playgroud)
问题是在Internet Explorer中这不会发生,并且它显示(在这种情况下)登录表单,但帖子不想工作,只是返回到主页所以
http://mysite.com
Run Code Online (Sandbox Code Playgroud)
我听说有人说要删除ajax来解决这个问题,但这不是解决真正的问题吗?
任何帮助都会很棒.
如果我删除#然后魔术它一切正常.你知道吗
谢谢理查德
我正在使用jquery mobile,所以我将这些包含在我的标题中.
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
Run Code Online (Sandbox Code Playgroud) 我刚开始新工作,我们有几个不同版本的磁铁安装!
现在我觉得我们需要首先将它们全部升级,然后在一个磁盘安装下使用一个数据库.
这样做的最佳方式(一般而言)是什么?是否可能或者最好在一次安装下再次制作网站并将产品导入其中.
一位开发人员谈到,在不同的安装下使用它们有助于提高性能.这是真的?
一旦我们将它们全部置于一个安装之下,诸如库存控制和订单之类的东西以及将产品放在多个站点上也应该非常简单 - 对吗?
我们正在谈论相当多的商店说约15年左右和相当多的产品我会说4000或更多.