Closed (fixed)
Project:
Source Ad
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Jan 2014 at 21:15 UTC
Updated:
12 Feb 2014 at 17:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Konstantin Komelin commentedThanks Kate for the suggestion!
I can only imagine displaying some message through JS console.log() method. But I'm not sure that I totally understand your approach.
Could you please provide more details?
Thanks,
Konstantin
Comment #2
kalabroSure!
It can be done with console.log() and simple wrapper to check if this method is supported by client browser.
Comment #3
Konstantin Komelin commentedNice, thanks! Will do it. or maybe you wanna help? ;)
Comment #4
Konstantin Komelin commentedComment #5
nikita petrov commentedCheck this patch please. I have used Consolelog script to show the ad in all browsers. It has GPL license, so i think it is ok for use it in our project, isn't it?
Comment #6
nikita petrov commentedp.s. is there a way to run dreditor BEFORE uploading a patch on drupal.org? "Code review" doesn't show me warnings on that patch, but dreditor does.
Comment #7
Konstantin Komelin commentedHi Nikita,
Thank you for the patch.
Code Standards
First of all please configure your IDE properly to comply Drupal Coding Standards https://drupal.org/node/147789
Then please install the latest dev snapshot of Coder module and CodeSniffer library. Need assistance? Just ask for help.
Third-party code
When we include third-party code into our project we should keep in mind that we are responsible for the security of this code as well as our own code of this project.
So the right (but not always most convenient way for user) is to place third-party code outside of the project, i.e in sites/all/libraries.
Discuss with others before make meaningful changes
I suggest you discussing any strategic decisions before creating the patch in future.
"When we are unsure, we ask for help" https://drupal.org/dcoc
My suggestion
My opinion is that we shouldn't make installation procedure of such simple module more complex and additionally ask users to install third-party library.
However, I don't prefer third-party code inside the project due to security considerations.
What do you think about using original console.log function without third-party library. We could check for existence of this function instead and do nothing if it doesn't exist? I'm not a big fun of old browsers, especially IE.
Thanks,
Konstantin
Comment #8
Konstantin Komelin commentedComment #9
nikita petrov commentedHere is the new patch.
I checked it by dev version of Coder module, there is one warning i don't know how to solve it:
Bu this file already contains:
at the beginning of the file.
I find no examples for documenting @file docblock of javascript files. Furthermore - the module Coder review itself has a .js file and it isn't @file comment in it! It is very weird.
Please, check this patch again, feel free to post more admonitions if they are.
Comment #10
Konstantin Komelin commentedCommited 2e6da26.
Thanks.
Comment #11
Konstantin Komelin commented