drupal

How to log error message in drupal

China☆狼群 提交于 2019-12-18 11:01:05
问题 How to log our own error messages (for ex: error due to invalid user date entry) which is generated in php program to drupal error log . 回答1: You can use the watchdog function : watchdog($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = NULL) Quoting the manual, the parameters are : $type The category to which this message belongs. $message The message to store in the log. $variables Array of variables to replace in the message on display or NULL if message is

jQuery issue - #<an Object> has no method

二次信任 提交于 2019-12-18 04:28:09
问题 I've tried a veriety of jQuery plugins recently and I keep getting this error … (source: shaunbellis.co.uk) … regardless of what plugin I try to use. I've checked the links to the JS files which are all there and working fine. I'm using Drupal if that makes any difference. I've run the plugins away from the main site to demonstrate that they are working and that I am doing things right with 100% success. Any ideas? Update: My jQuery file called in the footer: $(document).ready(function() { $(

What is Drupal's default password encryption method?

北城余情 提交于 2019-12-17 23:05:14
问题 I am trying to figure out what is the security that Drupal 6/7 uses by default to store passwords. Is it MD5, AES, SHA? I have been unable to find anything. 回答1: Drupal 8 and Drupal 7 use SHA512 by default with a salt. They run the hash through PHP's hash function numerous times to increase the computation cost of generating a password's final hash (a security technique called stretching). With Drupal 8, the implementation is object oriented. There is a PasswordInterface which defines a hash

Creating list of similar nodes in Drupal 7/Views 3

[亡魂溺海] 提交于 2019-12-17 21:26:58
问题 Copy from drupal.stackexchange.com hoping to get more answers here: I face a rather common problem of displaying a list of nodes similar to current one. Similar node is defined as one having at least one taxonomy term that current node has. There are few solutions available as modules, however the modules I've found (specifically Similar By Terms) are in beta stage (as in "not working properly") for Drupal 7. I've also found a couple of solutions based on Views and contextual filters (such as

How can I tell whether a web app was built using Angular (or other technologies)?

泄露秘密 提交于 2019-12-17 18:25:51
问题 How can I tell whether a (Drupal 7) web app was built using Angular by looking at the page source, and not having to ask the developers? 回答1: The best way to check is to write "angular" on browser console. If you get any object [With child objects as "bind","bootstrap","callbacks","module" etc.] then its an angular web app. 回答2: You can install a chrome or firefox extension called Wappalyzer. It tells you which site you are navigated on in your browser and the stack they use. 回答3: You could

Using PHP to Access a User's Webcam

最后都变了- 提交于 2019-12-17 18:11:25
问题 I'd like to allow users to record videos directly from their webcam. I haven't done much work with PHP but am stuck with it for this project. We currently have a system in place for video uploading and encoding, but nothing to actually access a user's webcam. How would you recommend I proceed? 回答1: Webcams aren't available to HTML or JavaScript/DOM in any browsers that I know of, so you're going to end up dependent on some sort of plugin. I'd recommend you start your search with Adobe Flash

Drupal DATABASE deployment strategies?

六眼飞鱼酱① 提交于 2019-12-17 15:39:17
问题 From this item: What's best Drupal deployment strategy? .... I quote: Databases are trickier; cleaning up the dev/staging DB and pushing it to live is easiest for the initial rollout but there are a few wrinkles when doing incremental DB updates if users on the live site are also generating content. I want some ideas on how to do this? Currently I get a complete copy of the existing db on my local machine, commit that subversion, and then deploy the whole database. Currently the file is

FPDF error: Some data has already been output, can't send PDF

隐身守侯 提交于 2019-12-17 02:23:53
问题 I am using the fpdf library for my project, and I'm using this to extend one of the drupal module. These lines $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World!'); $pdf->Output(); give me an error: FPDF error: Some data has already been output, can't send PDF I tried creating this in a separate file outside the drupal area name test.php and when viewed it worked. Anyone here know why this don't work? Or anyone here can point me a right pdf

Internal server error - Drupal 6

我们两清 提交于 2019-12-16 18:02:56
问题 I have Drupal 6 Site. I have enabled compression of CSS & JS files. Last night I uploaded couple of css files. I cleared the Cache from Drupal site. It was working fine.. But this morning when I opened the site, it is throwing error 500 Internal Server Error. Contact your system administration. I logged into as admin anyhow & disabled the compression so all the css & js files issue got fixed but the images that are under sites/default/files/ are not loading & getting 500 Error for these files

Figuring out the parent link in html.tpl.php [closed]

瘦欲@ 提交于 2019-12-14 04:22:01
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 7 years ago . Is there a way to figure out what the title of the parent page is in html.tpl.php? I'm asking because I change my background image depending on what