I posted this in the wrong thread, sorry I'm moving it right now
I work for an SEO company, and I'm trying to make a logic hook that will check a checkbox when a value is less than 11. So I made an integer field, made the area 1-100, which is to be the website's ranking on Google(gpos_c), and I made a Checkbox for first page, so we can search for accounts on and off of the first page(lstpage_c)(I used an L in place of a 1). This is what my code is so far, but I'm getting no results at all.
This is my first time doing this without being walked through it, so don't be surprised at simple mistakes
PHP Code:<?php
$hook_version = 1;
$hook_array = Array();
$hook_array['before_save'][] = Array(1, '1stpagehook', 'custom/modules/Account/1stpagehook.php', '1stpagehook', 'convertToProper');
?>PHP Code:<?php
/*************************************
Project: Hook to sort by 1st page in numerical values
Developer: Lane Miller
Desc: Hook that will modify the field 1st page according to the numerical value in
the Google position field.
The contents of this file are governed by the GNU General Public License (GPL).
A copy of said license is available here: http://www.gnu.org/copyleft/gpl.html
This code is provided AS IS and WITHOUT WARRANTY OF ANY KIND.
*************************************/
class 1stpagehook{
function convertToProper(&$bean, $event, $arguments){
if ($bean->$gpos_c , '11'){
$bean->$lstpage_c = "1";
}
}
}
?>


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks