drupal-7

Drupal 7: Sorting multiple content types in Views, with different date fields

别等时光非礼了梦想. 提交于 2019-12-12 00:58:08
问题 I'm using Drupal 7, with the Views, Feeds and Views PHP modules (among others, but I think those are the only relevant ones). My goal is a single view that combines (a) multiple RSS feeds brought in through the Feeds module, (b) two or three content types of my own, for contant created manually on my site. The result will be a block and a page that has a stream of all my latest work, wherever it is -- my own site or another site (as long as that other site has an RSS feed, of course). The

Why should I use Drupal's Form API & Ajax framework for this rather than just implementing my own solution with calling node_save()?

橙三吉。 提交于 2019-12-11 23:07:40
问题 I want users to be able to submit nodes and comments via AJAX. I also want to do some fairly extensive customization of the node and comment forms. I've spent time looking through documentation and code examples for Drupal 7's Form API and Ajax framework, but I find it very complex. Therefore, I simply want to create my own form in HTML and use my own JavaScript code to submit it via Ajax. I'll also set up a specific URL for processing these Ajax requests, which will ultimately call node_save

Drupal.attachBehaviours with jQuery infinitescroll and jQuery masonry

时间秒杀一切 提交于 2019-12-11 21:14:35
问题 I am a little desperate here. I have been reading everything I was able to find on Drupal.behaviours but obviously its still not enough. I try running a masonry grid with the infinitescroll plugin to attach the new images to the masonry. This works fine so far. The next thing I wanted to implement to my website is a hover effect (which shows information on the images) and later fancybox to show the images in a huger size. (function ($) { Drupal.behaviors.views_fluidgrid = { attach: function

Way to display those nodes in a view that are related to any other node of a different type

不打扰是莪最后的温柔 提交于 2019-12-11 19:28:45
问题 I have two content types - "Blog" and "News". I am using a reference field to relate blog nodes to news nodes. Now, for the news landing page, I need a block view that displays "Related blogs" i.e. it lists blogs that are related to any news node. The news landing page is a panel page with a main view that lists all news nodes. The "Related blogs" block will be placed below the main block. Is there a way to achieve this "Related blogs" block using views? I am using Drupal7 and I am free to

How to disable ckeditor cloudservices

你。 提交于 2019-12-11 17:28:39
问题 I'm working on a Drupal site that just updated its ckeditor library from 4.5.x to 4.9.2. On one of our servers the image button suddenly stopped appearing and I find the error "Error code: cloudservices-no-token-url." in the browser javascript console when I load any page with ckeditor. I'm hoping I can disable cloudservices to resolve the error. I tried using config.removePlugins = 'easyimage'; in config.js. Are there other addons that use cloudservices I need to disable? 回答1: The simplest

Custom page in drupal

冷暖自知 提交于 2019-12-11 17:17:36
问题 hi i m new to drupal i want to know that how could i add my custom page for the display the some information which is come from databases, i have create that page in core php (for example information.php)but i want to add that page in drupal 7 how it is possible looking for the quick and best reply 回答1: The quickest way would be to add a content type "Information" to your drupal site, rename your information.php file to node--information.tpl.php and use the Drupal Database API to get stuff

I want these lines to run FOR ALL of the values of my database [duplicate]

爷,独闯天下 提交于 2019-12-11 16:52:01
问题 This question already has answers here : where is the fault in my sql code? (2 answers) Closed 4 years ago . $sql = 'SELECT * FROM t1 RIGHT OUTER JOIN t2 ON t2.wid = t1.wid LIMIT ' . $number . ' OFFSET 678'; When i change by my hand this offset it runs for different values of my database... How I can do it without change with my hand this offset?? Someone said me that I can do it without offset but he did not tell me how... Could someone help plz?? I have over a month with this issue :'( :'(

D3 module on Drupal doesn't show examples

巧了我就是萌 提交于 2019-12-11 16:22:59
问题 I have installed D3.js module on Drupal 7.x, enabled the module the D3 views and D3 examples, uploaded d3.js into sites/all/libraries/d3 but when I try to access the examples, like /d3/examples/bar, I get the error: Uncaught TypeError: Cannot read property 'linear' of undefined it looks like D3 library is not loaded... I googled a lot but failed to find any hint. What am I missing here? 回答1: If you are using the version 7.x-1.0-alpha3 of D3 module then you need to download https://d3js.org/d3

Drupal 7, trying to use Site.php to redirect localhost requests

我是研究僧i 提交于 2019-12-11 16:14:38
问题 hi I'm trying to get my multisites config working, and am struggeling at the 1st hurdle I want my sites.php to redirect requests to one of my two test sites folders. I can't seem to understand how to use this array? as I'm using an Xampp install my requests look like this. http://localhost/sitename where sitename is my website project and would be locally known as c:\xampp\htdocs\sitename I want to implement a redirector something like c:\xampp\htdocs\sitename\normal... c:\xampp\htdocs

Problems reading JSON file in D3 javascript in some (not all) browsers

烂漫一生 提交于 2019-12-11 16:12:05
问题 I get this error in Chrome immediately after reading a JSON file. It works correctly in Safari and Firefox. console.log ("event -> "+ postcards.nodes[0].node.event); // "tally" in Safari "TypeError: Cannot read property 'node' of undefined" in Chrome.< Is there a limit to the levels in a nested JSON file? I generate the JSON from a Drupal view. Here here is the start: {"nodes":[{"node":{"w1":"","w2":"1","w3":"","w4":"", ...< Here is the Javascript: d3.json( "/sites/default/d3_files/json