Android与php服务器交互(Android interact with php server)
我遇到与PHP服务器交互的问题。
I have a problem with interacting with PHP server.
原文:https://stackoverflow.com/questions/38624501
最满意答案
由于您正在运行Drupal 7,因此您可以从自定义模块或主题访问新的hook_page_alter()函数。 通过实现这一点,您可以轻松地将主要内容区域(例如,节点)的部分移动到任意数量的不同块中。 您将需要使用show() , hide()和render()函数来正确隐藏内容。
或者,在node.tpl.php模板中使用show()和hide()应正确隐藏元素,然后使用menu_get_object()函数从块中获取节点对象。
这里通常有一个视频可用于hook_page_alter(),但该网站目前已关闭。
Since you're running Drupal 7, you have access to the new hook_page_alter() function, from either a custom module or theme. By implementing this, you can easily move parts of the main content area (eg, the node), into any number of different blocks. You'll want to use the show(), hide() and render() functions to properly hide content.
Alternatively, using show() and hide() from within your node.tpl.php template should properly hide the elements, and then you could grab the node object from your block using the menu_get_object() function.
There is normally a video available on hook_page_alter() here, but the site is down at the moment.
相关问答
更多-
使用wrburgess的答案,如果您的服务器使用更新版本的PHP,则可能会出现错误。 Strict warning: Only variables should be passed by reference in include()... 这是我所做的不会导致/消除错误的。安装并启用Nodeblock模块 完成后,您需要编辑内容类型并启用nodeblock。 完成后,内容类型的任何实例都将作为块页面上的块提供。 至于CSS问题, 请看这个链接 Install and enable the Nodeblock module Once you've done that you'll need to edit your content type and enable nodeblock. Once that's done, any instances of the content ...
传递一个变量来捕获块(pass a variable to catch block)[2021-03-05]
要修复错误,请将errorMessage初始化为null,string.Empty或其他一些默认值。 这是其中一种情况,其中编译器不够聪明,无法确定在使用之前已经分配了它。 To fix the error initialize errorMessage to null, string.Empty, or some other default value. This is one of them cases where the compiler isn't smart enough to figure ou ...由于您正在运行Drupal 7,因此您可以从自定义模块或主题访问新的hook_page_alter()函数。 通过实现这一点,您可以轻松地将主要内容区域(例如,节点)的部分移动到任意数量的不同块中。 您将需要使用show() , hide()和render()函数来正确隐藏内容。 或者,在node.tpl.php模板中使用show()和hide()应正确隐藏元素,然后使用menu_get_object()函数从块中获取节点对象。 这里通常有一个视频可用于hook_page_alter(),但该网站目前已关闭 ...最终,当鼠标悬停时将显示属性更改为“内联”,然后在mouseout上将其更改为“none”,从而解决了这个问题。 我不知道为什么这在节点中起作用。 (我从另一个示例脚本中复制了代码。) Ultimately this was solved by changing the display property to "inline" when the mouse hovered and then change it to "none" on mouseout. I have no idea why this wo ...滚动块与drupal中的页面(Scroll block with page in drupal)[2022-02-23]
如果您不需要对其进行动画处理,则只需使用“position:fixed”CSS属性即可。 假设您的块从左侧开始是10px,从顶部开始是50px,它看起来像这样: HTMLI can see you!CSS .scrolling-block { position: fixed; left: 10px; top: 50px; } 另外,检查一下。 http://www.cssplay.co.uk/l ...好吧,有hook_nodeapi($ op ='view'),如果你想改变现有的元素,你给你的模块一个很高的权重,以便最后调用它。 要知道何时要自定义某些内容,可以在节点对象上设置自定义标志,例如$node->yourmodule_inside_view_noderef = TRUE然后再将其传递给node_view()。 在Drupal 7中,有一个所谓的$ view_mode概念,而不仅仅是一个布尔标志来显示预告片。 您可以通过hook_entity_info()定义自己的view_modes,这是us ...在drupal 7中, node_load()调用entity_load()来缓存结果,所以如果你调用node_load()两次,它将从缓存中返回。 使用node_load()比在模块之间传递全局变量更好,特别是如果您使用某些第三方缓存模块(APC,memcached或其他)。 如果您关心性能,只需尝试使用其中一个模块(我更喜欢memcached)。 In drupal 7 node_load() calls entity_load(), which caches the results, so if yo ...您拥有许多权限和访问权限的模块: https://www.drupal.org/project/block_access https://www.drupal.org/project/og 你也有自定义方式: https://drupal.stackexchange.com/questions/69861/how-do-i-programmatically-assign-the-access-to-a-block Module Deny Access is what I was looking for.使用“/ node / 2278 / *”,我认为它实际上告诉您星号可以是输入它的文本字段下的通配符。 不要忘记你可以设置url别名,所以路径不必是“node / ...”,但可以是你想要的任何东西(admin / config / search / path / patterns) Use "/node/2278/*" , I think it actually tells you that the star can be a wildcard under the textfield where you ...相关文章
更多- 技术性问题 – 您需要多少个PHP/Python/Ruby 应用服务器工作线程?
- HTML5服务器事件发送(Server-Sent Events)【HTML5教程 - 第十三篇】
- Solr PHP support
- solr安装以及php调用
- PHP简介
- 微信公众平台服务器配置-PHP
- note:应用独立地与solr服务器交互的操作
- 关于PHP爬虫和Android定位的初步设想
- java socket server
- php匹配问题
最新问答
更多- sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
- 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
- AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
- Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
- 湖北京山哪里有修平板计算机的
- SimplePie问题(SimplePie Problem)
- 在不同的任务中,我们可以同时使用多少“上下文”?(How many 'context' we can use at a time simultaneously in different tasks?)
- HTML / Javascript:从子目录启用文件夹访问(HTML/Javascript: Enabling folder access from a subdirectory)
- 为什么我会收到链接错误?(Why do I get a linker error?)
- 如何正确定义析构函数(How to properly define destructor)
- 垂直切换菜单打开第3级父级。(Vertical toggle menu 3rd level parent stay opened. jQuery)
- 类型不匹配 - JavaScript(Type mismatch - JavaScript)
- 为什么当我将模型传递给我的.Net MVC 4控制器操作时,它坚持在部分更新中使用它?(Why is it that when I pass a Model to my .Net MVC 4 Controller Action it insists on using it in the Partial Update?)
- 在使用熊猫和statsmodels时拉取变量名称(Pulling variable names when using pandas and statsmodels)
- 如何开启mysql计划事件
- 检查数组的总和是否大于最大数,反之亦然javascript(checking if sum of array is greater than max number and vice versa javascript)
- 使用OpenGL ES绘制轮廓(Drawing Outline with OpenGL ES)
- java日历格式(java Calendar format)
- Python PANDAS:将pandas / numpy转换为dask数据框/数组(Python PANDAS: Converting from pandas/numpy to dask dataframe/array)
- 如何搜索附加在elasticsearch索引中的文档的内容(How to search a content of a document attached in elasticsearch index)
- LinQ to Entities:做相反的查询(LinQ to Entities: Doing the opposite query)
- 从ExtJs 4.1商店中删除记录时会触发哪些事件(Which events get fired when a record is removed from ExtJs 4.1 store)
- 运行javascript后如何截取网页截图[关闭](How to take screenshot of a webpage after running javascript [closed])
- 如何使用GlassFish打印完整的堆栈跟踪?(How can I print the full stack trace with GlassFish?)
- 如何获取某个exe应用程序的出站HTTP请求?(how to get the outbound HTTP request of a certain exe application?)
- 嗨,Android重叠背景片段和膨胀异常(Hi, Android overlapping background fragment and inflate exception)
- Assimp详细说明typedef(Assimp elaborated type refers to typedef)
- 初始化继承类中不同对象的列表(initialize list of different objects in inherited class)
- 使用jquery ajax在gridview行中保存星级评分(Save star rating in a gridview row using jquery ajax)
- Geoxml3 groundOverlay zIndex(Geoxml3 groundOverlay zIndex)