FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » drupal php google analytics
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: drupal php google analytics [message #171017 is a reply to message #171015] Wed, 15 December 2010 02:51 Go to previous messageGo to previous message
Magno is currently offline  Magno
Messages: 49
Registered: October 2010
Karma:
Member
On 12/14/2010 11:31 PM, The Natural Philosopher wrote:
> Magno wrote:
>> On 12/14/2010 10:05 PM, Jerry Stuckle wrote:
>>> On 12/14/2010 5:39 PM, Magno wrote:
>>>> On 12/14/2010 07:05 PM, The Natural Philosopher wrote:
>>>> > Magno wrote:
>>>> >> On 12/14/2010 06:08 PM, Jerry Stuckle wrote:
>>>> >>> On 12/14/2010 2:25 PM, canajien wrote:
>>>> >>>> It has been a very long time since I have had to do any php
>>>> >>>> programming, so please bear with me as I haven't been able to
>>>> >>>> find an
>>>> >>>> answer to this problem after several searches.
>>>> >>>>
>>>> >>>> There is a line of code in a drupal template that generates a
>>>> >>>> link to
>>>> >>>> download a file:
>>>> >>>>
>>>> >>>> <?php print $node->field_report_file[0]['view'] ?>
>>>> >>>>
>>>> >>>> this will generate something like this
>>>> >>>>
>>>> >>>> <a href="filename.pdf">filename</a>
>>>> >>>>
>>>> >>>>
>>>> >>>> We are using google analytics with the website and we would like to
>>>> >>>> track how many times people download a file as well, normally to
>>>> >>>> track
>>>> >>>> a link you would write the code to look like this:
>>>> >>>>
>>>> >>>> <a href="filename.pdf"
>>>> >>>> onclick="pageTracker._trackPageview('filename.pdf");">filename</a>
>>>> >>>>
>>>> >>>> my problem is modifyng the drupal code to include the onclick, I
>>>> >>>> have
>>>> >>>> tried
>>>> >>>>
>>>> >>>> <?php print $node->field_report_file[0]['view'] print onclick=
>>>> >>>> \"pageTracker._trackPageview('$node->field_report_file[0]['view']\");?
>>>> >>>>
>>>> >>>>
>>>> >>>>>
>>>> >>>>
>>>> >>>>
>>>> >>>> and several variations, but I know there is something wrong with my
>>>> >>>> syntax and I can't simply insert print onclick=
>>>> >>>> \"pageTracker._trackPageview('$node->field_report_file[0]['view']\");
>>>> >>>>
>>>> >>>> into the original command
>>>> >>>>
>>>> >>>> can someone point me in the write direction?
>>>> >>>>
>>>> >>>> thanks
>>>> >>>
>>>> >>> Try the Drupal site - they have a lot of people who are quite
>>>> >>> knowledgeable about drupal and can help you.
>>>> >>>
>>>> >>> TNP's suggestion is mediocre, at best. It fails if, for instance,
>>>> >>> people
>>>> >>> have javascript turned off - which includes robots which spider your
>>>> >>> site.
>>>> >>>
>>>> >>
>>>> >> I have always wondered why the troll keeps this much hatred against
>>>> >> TNP. And everytime he can, he calls him mediocre, clueless, and such
>>>> >> things.
>>>> >>
>>>> >> Anyone here knows?
>>>> >
>>>> >
>>>> > I showed him up on at least three occasions to not have a clue about
>>>> > that which he spouts. Quoting his beloved manuals that he studies at
>>>> > night back to him.
>>>> >
>>>> > Jerry doesn't like to be shown to be an ignorant pompous asshole.
>>>> > If you
>>>> > grovel at his feet, he will graciously feed him tidbits of wisdom.
>>>> >
>>>> > If you dare contest his ownership of the group, you are the spawn
>>>> > of the
>>>> > devil.
>>>> >
>>>> > It's a psychological condition he has. Right Man syndrome.
>>>> >
>>>> > He wants desperately to be a Guru, but he's not good enough so he
>>>> > *acts*
>>>> > like he is one, and hopes no one will come along who can see through
>>>> > him.
>>>> >
>>>> > Sadly I did.
>>>> >
>>>> > What pains him worse, is that I don't even want to be a guru. Its
>>>> > somehow makes his puny ambitions seem like..puny ambitions.
>>>> >
>>>> > I mean. look at the response above. The guy wants to know how to frame
>>>> > an onclick statement to call up some javascript in a drupal framwork.
>>>> >
>>>> > Jerry says 'no one would ever use javascript, and that's typical of
>>>> > TNP'
>>>> > But sadly the OP wanted to know how to use javascript.
>>>> >
>>>> > He has to change the subject and set up a straw man to recover his
>>>> > godlike status. In his own eyes.
>>>> >
>>>> > to anyone else, he just makes himself look like what he is. From
>>>> > time to
>>>> > time I goad him a little so everyone with any intelligence can see the
>>>> > asshole for what he is: the rest still think he wonderful, but then
>>>> > they
>>>> > deserve him.
>>>> >
>>>> > I killfiled him years ago.I never even as a PHP beginner found
>>>> > anything
>>>> > he said was not said better, more helpfully and more politely by
>>>> > someone
>>>> > else. In my lurking here, he has criticised everybodies code. I never
>>>> > saw him post a line of his own. He is I believe a one man IT training
>>>> > consultant. You can look up his company records and see how much he
>>>> > has
>>>> > earnt in the last few years. Its very sad.
>>>>
>>>> I would have killfiled him too, but I don’t like beginners being
>>>> misguided by him or PointedEars.
>>>> Well, anyone can be a Guru if they want, but part of the learning
>>>> process is learning to be a respectful and clear person to communicate
>>>> with.
>>>> Reading the answer he just put to this post, I clearly see your point
>>>> now.
>>>>
>>>> Greetings.
>>>
>>> Lol, you and TNP are one of a kind. No surprise you get along so well.
>>
>> Ya, people with brain use to be nice to each other.
>>
>>> And you haven't showed me better. As for posting code - just look back
>>> through the history of this newsgroup.
>>
>
> I did nce. No jerry code.
>
> Maybe you think you did once or twice. Never found any. Its all in your
> ego jerry.
>
>> Remember, Jerry just wants to help and never do anything for ego or
>> for competing against others.
>>
> No! How I have misjudged the man! There was me thinking he was nothing
> but a hasbeen - or even a neverwozza windbag of epic proportions. This
> sort of overweight figure with almost an islamic beard and piggy little
> eyes behind pebble specs, peering out at a world that he senses somehow
> he will never ever make it in but cannot cease from trying because his
> dear momma wantede him ever so much to Be A Sucess At Something.
>
> And so he is. The most successful arsehole in three NGS.
>
> There you are Jerry. Acclaim from TNP Ra Ra three cheers for the
> Jerraloid. Pimple of the year on the arsehole of Usenet.
>
>
>>> Of course, you wouldn't know good code if you saw it, either.
>>
>> Then perhaps that is the reason why all your code seems shitty to me.
>>
>>> Come to think of it, I now suspect you are just another 'nym for TNP.
>>
>
> hey jerry, you would say that. Its inconceivable to your monstrous ego
> that two independent people could come to the same conclusion, that you
> are a monstrous FART of self importance without a single redeeming
> feature..
>
>
>> Now shows how you don’t even understand the usenet headers.
>>
>
> What jerry doesn't understand is WAY bigger than even his own head.
>
>>> Neither one of you is brave enough to use your real name!
>>
>
> WE aren't trying to drum up trade for our little training business.
>
>
>> No, I am so afraid of mentally ill people to see my real name. what
>> could happen? one never knows. ;)
>
>
> Stuckle stalked me into a UK local group once. I think that was when I
> decided to find out who he was, and discovered his pathetic little
> company with almost no turnover.
>
> Maybe no one wants him, maybe he's ill in a mental hospital It is hard
> to tell the difference, with Jerry.
>
>
> It was hilarious.

LMAO.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: anyone?
Next Topic: require*/include*: compile-time or runtime?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 14:34:24 GMT 2024

Total time taken to generate the page: 0.04255 seconds