Hi Mike,
I have noticed in your IIP that you are using the 5.1 version. I would suggest that you port towards the newest one 5.1.1 - unless I am mistaken and the version in the Entrance has not been updated.
The latest version of IIP uses custom boxes (custombox1pal.php, custombox2pal.php, etc). These are three or four of them, but nothing stops you from copying one and naming it to customboxYpal.php - where Y is a number of your choice. Then all you have to do is (assume that you have just copied custombox5pal.php)
- Open custombox5pal.php and edit the contents to show what you want (sponsor)
- Open configpal.php and find:
code:
$index_include[0]['custombox3'] = "0";
$index_include[1]['custombox3'] = "0";
$index_include[2]['custombox3'] = "0";
$index_include[3]['custombox3'] = "0";
and BELOW it add
code:
$index_include[0]['custombox5'] = "0";
$index_include[1]['custombox5'] = "0";
$index_include[2]['custombox5'] = "0";
$index_include[3]['custombox5'] = "0";
- Open index.php
Find
code:
if ($index_include[1]['custombox3'] == $x && !$xused) {
include "{$palspath}/pals/custombox3pal.php";
$xused = 1;
}
and BELOW it add
code:
if ($index_include[1]['custombox5'] == $x && !$xused) {
include "{$palspath}/pals/custombox5pal.php";
$xused = 1;
}
Find
code:
if ($index_include[2]['custombox3'] == $x && !$xused) {
include "{$palspath}/pals/custombox3pal.php";
$xused = 1;
}
and BELOW it add
code:
if ($index_include[2]['custombox5'] == $x && !$xused) {
include "{$palspath}/pals/custombox5pal.php";
$xused = 1;
}
Find
code:
if ($index_include[3]['custombox3'] == $x && !$xused) {
include "{$palspath}/pals/custombox3pal.php";
$xused = 1;
}
and BELOW it add
code:
if ($index_include[3]['custombox5'] == $x && !$xused) {
include "{$palspath}/pals/custombox5pal.php";
$xused = 1;
}
Now open editconfigpal.php
Find
code:
$CustomBox3Checked[$i] = "checked="checked"";
if ((!$index_include[$i]['custombox3']) || ($index_include[$i]['custombox3'] > 19)) {
$CustomBox3Checked[$i] = "";
}
$CustomBox3Selections[$i] = $blankselection;
if (($index_include[$i]['custombox3']) && ($index_include[$i]['custombox3'] < 20)) {
$selectedselection = "";
$psel = "";
for ($p=0; $p<20; $p++) {
if ($p > 0) {
$psel = $p;
}
if ($p == $index_include[$i]['custombox3']) {
$selectedselection .= "<option value="$p" selected="selected">$psel</option>";
}
else {
$selectedselection .= "<option value="$p">$psel</option>";
}
}
$CustomBox3Selections[$backone] = $blankselection;
$CustomBox3Selections[$i] = $selectedselection;
}
and BELOW it add
code:
$CustomBox5Checked[$i] = "checked="checked"";
if ((!$index_include[$i]['custombox5']) || ($index_include[$i]['custombox5'] > 19)) {
$CustomBox5Checked[$i] = "";
}
$CustomBox5Selections[$i] = $blankselection;
if (($index_include[$i]['custombox5']) && ($index_include[$i]['custombox5'] < 20)) {
$selectedselection = "";
$psel = "";
for ($p=0; $p<20; $p++) {
if ($p > 0) {
$psel = $p;
}
if ($p == $index_include[$i]['custombox5']) {
$selectedselection .= "<option value="$p" selected="selected">$psel</option>";
}
else {
$selectedselection .= "<option value="$p">$psel</option>";
}
}
$CustomBox5Selections[$backone] = $blankselection;
$CustomBox5Selections[$i] = $selectedselection;
}
Find
code:
if (!$CustomBox3Checked[1] && !$CustomBox3Checked[2] && !$CustomBox3Checked[3]) {
$CustomBox3Checked[0] = "checked="checked"";
}
and BELOW it add
code:
if (!$CustomBox5Checked[1] && !$CustomBox5Checked[2] && !$CustomBox5Checked[3]) {
$CustomBox5Checked[0] = "checked="checked"";
}
Find
code:
<tr class="lighttable">
<td align="right" nowrap="nowrap">
Custom Box 3
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox3" value="1" {$CustomBox3Checked[1]} />
</td>
<td>
<select name="CustomBox3Select_1">
{$CustomBox3Selections[1]}
</select>
</td>
<td align="center" nowrap="nowrap">
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox3" value="2" {$CustomBox3Checked[2]} />
</td>
<td>
<select name="CustomBox3Select_2">
{$CustomBox3Selections[2]}
</select>
</td>
<td align="center" nowrap="nowrap">
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox3" value="3" {$CustomBox3Checked[3]} />
</td>
<td>
<select name="CustomBox3Select_3">
{$CustomBox3Selections[3]}
</select>
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox3" value="0" {$CustomBox3Checked[0]} />
</td>
</tr>
and BELOW it add
code:
<tr class="lighttable">
<td align="right" nowrap="nowrap">
Custom Box 5
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox5" value="1" {$CustomBox5Checked[1]} />
</td>
<td>
<select name="CustomBox5Select_1">
{$CustomBox5Selections[1]}
</select>
</td>
<td align="center" nowrap="nowrap">
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox5" value="2" {$CustomBox5Checked[2]} />
</td>
<td>
<select name="CustomBox5Select_2">
{$CustomBox5Selections[2]}
</select>
</td>
<td align="center" nowrap="nowrap">
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox5" value="3" {$CustomBox5Checked[3]} />
</td>
<td>
<select name="CustomBox5Select_3">
{$CustomBox5Selections[3]}
</select>
</td>
<td align="center" nowrap="nowrap">
<input type="radio" name="CustomBox5" value="0" {$CustomBox5Checked[0]} />
</td>
</tr>
Now open doeditconfigpal.php
Find
code:
$index_include[$x]['custombox3'] = "0";
and BELOW it add
code:
$index_include[$x]['custombox5'] = "0";
Find
code:
$index_include[$CustomBox3]['custombox3'] = ${"CustomBox3Select_$CustomBox3"};
and BELOW it add
code:
$index_include[$CustomBox5]['custombox5'] = ${"CustomBox5Select_$CustomBox5"};
Find
code:
\$index_include[0]['custombox3'] = "{$index_include[0]['custombox3']}";
\$index_include[1]['custombox3'] = "{$index_include[1]['custombox3']}";
\$index_include[2]['custombox3'] = "{$index_include[2]['custombox3']}";
\$index_include[3]['custombox3'] = "{$index_include[3]['custombox3']}";
and BELOW it add
code:
\$index_include[0]['custombox5'] = "{$index_include[0]['custombox5']}";
\$index_include[1]['custombox5'] = "{$index_include[1]['custombox5']}";
\$index_include[2]['custombox5'] = "{$index_include[2]['custombox5']}";
\$index_include[3]['custombox5'] = "{$index_include[3]['custombox5']}";
Repeat these steps as many times as you want to create new custompal boxes for your needs. Then enter the configuration screen of IIP and make your selections on position and index.
Warm regards
Nikos
PS: Dave, please correct me if I am completely wrong in this.