Hi how
wow long time this mod is not updated ok for the intersted i been workin a little bit in this hack the last time was for the mod for url and this time is for choose the target opcion i meant _self, _blank _top etc.
remenber you need to have the last mod with the link opction
post 57 and then you can do this one.
for this you need to edit two files one is Product-brotator.xml and brotator.php
lets start with product-brotator.xml
you need to find this line
Code:
`link` varchar(255) NOT NULL default '',
and add below
Code:
`target` varchar(20) NOT NULL default '',
find
Code:
$banner = "<a href='".$ban['link']."><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";
}
and remplase with
Code:
$banner = "<a href='".$ban['link']."' target='".$ban['target']."'><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";
}
and save it
you can upload the xml with admincp- >products & plugins-> add / import product-> and allow the overwrite if you already have it
now lets start with brotatos.php
find
Code:
$defaultdir = str_replace(".", "", $vbulletin->options['brotator_default_dir']);
add below
Code:
$target_options = array(
_self => _self,
_blank => _blank,
_parent => _parent,
_top => _top,
);
find
Code:
print_input_row('Link', 'link', $vbulletin->options['brotator_default_link']);
add below
Code:
print_select_row('Target', 'target', $target_options, _self);
find
Code:
$db->query_write("INSERT INTO " . TABLE_PREFIX . "banners (bid, name, width, height, link,, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[link]', '$_POST[target]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add", "1");
and remplace width
Code:
$db->query_write("INSERT INTO " . TABLE_PREFIX . "banners (bid, name, width, height, link, target, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[link]', '$_POST[target]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add", "1");
find this
Code:
link = '$_POST[link]',
add below
Code:
target = '$_POST[target]',
find
Code:
Height: <input type='text' class='bginput' name='height' value='$banner[height]' class='bginput' size='5'><br><br>
add below
Code:
Target :<select name='target' onChange='MM_jumpMenu('parent',this,0)' class='bginput'>
<option>'$banner[target]'</option>
<option>_self</option>
<option>_blank</option>
<option>_parent</option>
<option>_top</option>
</select>
save it and upload to your server, if everithis go rigth you will have someting like this one
Code:
http://img142.imageshack.us/img142/488/addfc6.png
http://img142.imageshack.us/img142/4914/edithj1.png
all credits go to
andrefedalto
i don put the files cuz al are in spanish lol i will try to upload after i translate back.
and i have a new idea i will make to choose the alig give me more ideas do you like <div> or <table>, <center> what do you like more?
i will made the modifficaccion and a complite new product to upload