1
karomaz
Adsense revenue sharing module
  • 2011/10/8 9:41

  • karomaz

  • Just popping in

  • Posts: 21

  • Since: 2011/10/8


hi ^^
i want to know if it exist an adsense revenue sharing module for xoops ??

I want each member can display his adsense block in his articles

And it's me (the administratorà) who will choose where it can be displaying in the pages, and members simply add their adsense reference in their setting page...

2
karomaz
Re: Adsense revenue sharing module
  • 2011/10/14 23:01

  • karomaz

  • Just popping in

  • Posts: 21

  • Since: 2011/10/8


any help please ??? :(

3
deka87
Re: Adsense revenue sharing module
  • 2011/10/15 14:54

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


I dont think there is a module that will do it for you. But I think you can set it up yourself. What if to create an html field in the Profile module and call it like Your Adsense Code where users would have to submit their Adsense Ad block code. Then you will need to go to your articles module (say it's News), find a script that handles your article page (it's article.php for a News module) and add there a couple of lines which will call the article author uid and fetch the adsense code field value and assign the result to your template like this:
if(isset($adsense_code) && $adsense_code!= ''){ 
$xoopsTpl->assign('ad_block'$adsense_code);
}


I think it will work
Mind anchors

4
karomaz
Re: Adsense revenue sharing module
  • 2011/10/22 11:26

  • karomaz

  • Just popping in

  • Posts: 21

  • Since: 2011/10/8


could you be more spessifique??
i created a field in my database in users table, and i named it "adsense_id", and i created a field in profile mode so the users can edit theyr adsense id, and firstly, i want to know how to affect the field in the database to the field in the profile mode :)

5
deka87
Re: Adsense revenue sharing module
  • 2011/10/22 14:50

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


no you don't need to create any tables in your database. all you need to do is to create a custom field in your profile module (text area).
Mind anchors

6
karomaz
Re: Adsense revenue sharing module
  • 2011/10/29 22:41

  • karomaz

  • Just popping in

  • Posts: 21

  • Since: 2011/10/8


i did it :) i created a custom field in my profile module,

now what should i do ??

7
deka87
Re: Adsense revenue sharing module
  • 2011/10/30 7:01

  • deka87

  • Friend of XOOPS

  • Posts: 1125

  • Since: 2007/10/5


now you need to ask xoops gurus how to fetch this adsense_id field value in your article module thats nothing complicated but im not a programmer and i can't help you with that
Mind anchors

8
trabis
Re: Adsense revenue sharing module
  • 2011/11/18 21:34

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Hi karomaz,

I did a smarty function to help you out.
Download it from here:
http://code.google.com/p/xuups/downloads/detail?name=smarty_function_profile_1.0_trabis.zip

You need to place it in class/smarty/xoops_plugins folder

I assume you already have a custom field in profile named "adsense_id"

Now all you need to do is edit news_item.html and use this code:
<{profile uid=$story.posterid field='adsense_id'}>


This code will output the adsense id, you need to use it inside your adsense code.

Good luck!

9
karomaz
Re: Adsense revenue sharing module
  • 2011/11/18 23:33

  • karomaz

  • Just popping in

  • Posts: 21

  • Since: 2011/10/8


where can i find news_item.html ???

10
trabis
Re: Adsense revenue sharing module
  • 2011/11/18 23:36

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


If you are using news module (as I expected), you can find it in news/templates.

Login

Who's Online

405 user(s) are online (297 user(s) are browsing Support Forums)


Members: 0


Guests: 405


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits