Backend Adsense
-
fourd5dswb
- Regular
- Posts: 24
- Joined: Mon Aug 25, 2008 5:41 pm
Backend Adsense
Hello. Is there a way to put Google Adsense code so that it will show up in the backend features?
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
You could create an admin/index.tpl template file (or edit the existing one from /templates/default/admin/index.tpl - or if you use bulletproof, from /templates/bulletproof/admin/index.tpl) and there insert your google adsense widget at the place you'd like it.
Just remember to replace { with {ldelim} and } with {rdelim} when you insert javascript, or it won't be valid Smarty syntax.
The other option would be to use a PHP event plugin that listens on the backend_frontpage_display event hook and puts his output into the $eventData['more'] variable.
Regards,
Garvin
You could create an admin/index.tpl template file (or edit the existing one from /templates/default/admin/index.tpl - or if you use bulletproof, from /templates/bulletproof/admin/index.tpl) and there insert your google adsense widget at the place you'd like it.
Just remember to replace { with {ldelim} and } with {rdelim} when you insert javascript, or it won't be valid Smarty syntax.
The other option would be to use a PHP event plugin that listens on the backend_frontpage_display event hook and puts his output into the $eventData['more'] variable.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
fourd5dswb
- Regular
- Posts: 24
- Joined: Mon Aug 25, 2008 5:41 pm
reply
What I am trying to do is show Adsense in the backend so that when users of my site log in, they see adsense. It would just give another way to maybe get some clicks.
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
That's exactly what Garvin explained how to do... the admin template has a left sidebar, but the only way to add anything to it is by hard coding it at the point you want it to appear.... there is no backend equivalent of a sidebar html nugget.
Is it really worth it? I'd be shocked if you could raise more than a few pennies originating on the backend ... to me, if would be more of an annoyance... but that is my PERSONAL opinion.
Is it really worth it? I'd be shocked if you could raise more than a few pennies originating on the backend ... to me, if would be more of an annoyance... but that is my PERSONAL opinion.
=Don=
-
fourd5dswb
- Regular
- Posts: 24
- Joined: Mon Aug 25, 2008 5:41 pm
Reply
You're probably right Don.
I appreciate the help.
I appreciate the help.