Adding to Login page's sidebar
|
Makyar
Joined: 2005-09-16
Posts: 145 |
Posted: Fri, 2006-07-07 16:25
|
|
Hi, quick question: What is the file that I need to modify so that Google Ads are displayed on the sidebar of the login page. Someone told me how to do it for the sidebar of the gallery but I don't know what file to edit to do it for the login page. Thanks! Makar |
|
| Login or register to post comments |

Posts: 145
If anyone has any ideas, please let me know.
Makar
Posts: 60
I have just installed gallery2 and started to adsense optimize it
to add adsense to the sidebar - I use matrix theme -
and copied
themes > matrix > templates > sidebar.tpl
to the folder
themes > matrix > templates > local > sidebar.tpl
I thus have modified that file local/sidebar.tpl
and added my adsense code
<div id="adBar" class="gcBorder1">
{* my adsense stuff below *}
{g->theme include="adsense_160.tpl" class="gbBlock"}
</div>
at the bottom of the existing sidebar code
the file adsense_160.tpl is in the same folder "local" and contains the adsense code
of course you can add adsense link code vertical or another adsense unite of your choice
just keep in mind the max size of the sidebar which i belief is 175px
hans
Kriya Yoga - Teachings of Love | Secrets of Love | Tropical wallpapers | Photo gallery of the Philippine islands
Posts: 145
Does that put the adsense code in the sidebar in the login page?
Makar
Posts: 60
NO
in the login page there is no adsense in the sidepar resulting from above code
for me i have no members to login hence member proplems are excluded by default
but on the login page I see adsense on top of the page and at the bottom of the page
both come from the code I inserted in
local/them.tpl
adsense and member-sites - beware of Google TOS:
keep on mind that Google TOS allow adsense only to be on pages that Google and Google bot - hence the public - can see without login, password etc
I would assume that is a wide topic that might be need for development for a real module "adsense" to verify if a person views any page logged-in or as regular guest
while such surely is possible it may require some new develoipment to be properly done and to keep all gallery users OUT of troubles with Google and all other advertisers such as MSN / YPN etc.
because my published solution would put it into every normal page of all logged in users - that would be a real violation of G TOS and G needs but seconds to find such URLs
hans
Kriya Yoga - Teachings of Love | Secrets of Love | Tropical wallpapers
Posts: 794
There are smarty variables so if you want to wrap the Adsense stuff with an if statement and make it where only people that aren't logged in can see it would keep you within the Google TOS.
As to change the login page you need to edit modules/core/templates/userlogin.tpl. Copy it to modules/core/templates/local folder and edit it from there so you don't lose your changes when you upgrade.
Posts: 60
that's what I thought about smarty
but I am new to gallery2 and to smarty as well ( but since 97 in www publishing )
hence i have first to learn aobut all that
since it is a topic of general interest to a certain % of all gallery users
may be one day it would be better to make an official module to secure gallery against G adsense TOS violaton
if however you KNOW where or how exactly to ask for that variable and could provide a solution HERE
that would be great
the key is that anyone logged in - no matter what - admin or user - should never have adsense or similar ads displaed at all
if ads are displayed - then google-media bot comes within seconds to htat logged in page
and minutes later ( i havge proof of such ) the regular googlebot comes as well to that looged in page
which finally results in lots of pages index ni google and also published in G search
which finally also could facilitate hackers work to find posssible admin URLs ....
hence to disable adsense code on all loggged in pages by all users would be the goal of part one of google adsense module
part 2 would be to modularize the outline like all others
to add or remove adsense to a particular part of the page
to select the format of adsense from a prepared set of
- adsense link-units of different sizes
- ad formats different sizes
hans
Kriya Yoga - Teachings of Love | Secrets of Love | Tropical wallpapers | Photo gallery of the Philippine islands
Posts: 794
The smarty variables for users are
$user.isGuest
$user.isRegisteredUser
$user.isAdmin
So the code would be
{if $user.isGuest == 1} Adsense code goes here {/if}Posts: 60
many thanks lvthunder for your precise reply
hans
Kriya Yoga - Teachings of Love | Secrets of Love | [url=http://www.kriyayoga.com/photography/photo_gallery/index.php]Photo gallery of the Philippine island
Posts: 60
I was traveling the past days ( to Boracay island ) and just now had time to implement the above solution into my gallery
before i inserted into the
local>theme.tpl
and
local>sidebar.tpl
line like:
for each adsense unit i wante - adsense_336.tpl being the file name containing the adsense code of particular size
this above method inserted adsense in all situations - hence also logged in ( = resulting in Google adsense TOS violation )
now I embedded that with your a.m. code to look like
with above it all works perfectly to please Google TOS.
logged in = NO adsense
logged out = adsense
hans
Kriya Yoga - Teachings of Love | Secrets of Love | [url=http://www.kriyayoga.com/photography/photo_gallery/index.php]Photo gallery of the Philippine island