1
martyboy
adding google ads to wfdownloads visit.php
  • 2006/10/21 19:08

  • martyboy

  • Quite a regular

  • Posts: 256

  • Since: 2004/5/25


Hi, I want to add a google ad on wfdownloads visit.php the page that says "Your download should start in 3 seconds...please wait. If your download does not start, Click here!. " I have found the code that produces the above text:

echo "
  

XOOPS_URL "/modules/wfdownloads/images/icon/downloads.gif' align='middle' alt='' /> " _MD_WFD_DOWNINPROGRESS "

n
  
_MD_WFD_DOWNSTARTINSEC "
n
  
_MD_WFD_DOWNNOTSTART "n
  $url' target='_blank'>" _MD_WFD_CLICKHERE ".n
  
n"
;


Can i simply paste the google ad code underneath this code or do i have to do anything special because its a php file?

Thanks for your help
Michael Jackson = King Of Pop

Xoops = King Of CMS

2
irmtfan
Re: addming google ads to wfdownloads visit.php
  • 2006/10/21 19:13

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


google ads is a script and you can add it anywhere.

also in visit.php call it with echo

for example at the bottom of echo:

echo "
  

XOOPS_URL "/modules/wfdownloads/images/icon/downloads.gif' align='middle' alt='' /> " _MD_WFD_DOWNINPROGRESS "

n
  
_MD_WFD_DOWNSTARTINSEC "
n
  
_MD_WFD_DOWNNOTSTART "n
  $url' target='_blank'>" _MD_WFD_CLICKHERE ".n
  
n
  
google_ad_client = 'pub-xxxxxxxxxxxxx';
google_alternate_color = '000000';
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = '468x60_as';
google_ad_type = 'text';
google_ad_channel ='';
google_color_border = 'D0BC8A';
google_color_bg = '000000';
google_color_link = 'FF6600';
google_color_text = '000000';
google_color_url = '993300';

"
;

3
m0nty
Re: adding google ads to wfdownloads visit.php
  • 2006/10/21 19:21

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


yep you should be able to.. use the echo command in php tho as irmtfan mentioned.

but note. you only ever see that screen when your downloads are using a remote url..

if you upload the files to your server using the browse function on the submit form, you will never see that screen when you click to download it..

4
martyboy
Re: adding google ads to wfdownloads visit.php
  • 2006/10/21 19:59

  • martyboy

  • Quite a regular

  • Posts: 256

  • Since: 2004/5/25


Thanks for your help guys

Quote:

m0nty wrote:
but note. you only ever see that screen when your downloads are using a remote url..

if you upload the files to your server using the browse function on the submit form, you will never see that screen when you click to download it..


Thanks for that monty, I didnt know that was the case, i only have a few donwloads uploaded, the most popular ones i FTP then type the url in.

Cheers.
Michael Jackson = King Of Pop

Xoops = King Of CMS

5
martyboy
Re: adding google ads to wfdownloads visit.php *solved*
  • 2006/10/21 21:44

  • martyboy

  • Quite a regular

  • Posts: 256

  • Since: 2004/5/25


I have encountered a problem, I added the code like irmtfan said but I get:
Quote:
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in ****\html\modules\wfdownloads\visit.php on line 121


Line 121 is:Quote: