Previous Thread
Next Thread
Print Thread
Rate Thread
#228569 11/29/2002 1:51 AM
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
The question is two fold...
- Although the IIP allows for 3 custom boxes. I use them for site news and Birthdays, so I would like the ability to add more for sposnors ads/banners

- I would also like to have the banners on the Main Index, too. I was thinking of making a side bar (I think this is done i templates)

Any suggestions?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Yeah,

You can do a sidebar by adding a table open into the header and/or footer.

You can add custom boxes to your regular site by editing the templates.

I've added an amazon banner box to the top of my main index page.
Need to add some smaller links into the sidebar.

http://www.measurection.com/forums/ubbthreads.php

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Wow... you have quite a few sonsor boxes on the IIP Entrance page. I suspect that you hard coded them?

I was actually thinking of adding a banner inbeween catagories on the Main Index, but I like what you did, which is under the navigation bar. I have a banner in my header now, but may redesign the site and need the realestate up there.




Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
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.


Nikos
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
You explained it better than I even understood it.

Sponsored Links
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191


Thanks.

Warm regards

Nikos


Nikos
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Thanks!

That is what I was looking for.

I really appreciate the help given here. I'm a CPA by trade and have been doing my own sites for some time, but tyring to learn Linux/Apache, HTML, DHTML, CGI (no more!), PHP and MySql... I found I'm good enough to get buy, but just can't find enough time in the day to get proficient with the website stuff!

THANKS!

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Installed it and worked PERFECT!

THANKS!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I actually use a little thing on my IIP page with 8 or 10 amazon links. Then I've got a little script which rotates them..... so that they are in different places each page load.. thus the page looks fresh for each visit.

When I update it for the next version... I need to write it up and post it. By the time I got it working... I was too confused to come up with instructions. LOL

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Josh,

[]I actually use a little thing on my IIP page [/]

Don't know about that... but I did set up 3 extra boxes and will rotate banners in them using phpAdsNew. I'm pretty happy with the banner system, especially coming froma cgi script that almost never had banners ready when the page compiled.

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OH yeah.... .phpAdsnew will do the trick.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Josh how did you create that cell table on the main page with the ads inside?

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
dimopoulos,

One bug(?) I noticed... since I did the update, when I go into the IIP Admin page, it sets the new customboxes (4-6) to "Off".

I have to remember to turn the on, before I leave...
Is anyone else having this problem?

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Hi Mike,

I reinstalled the modification according to the instructions and it works fine.

You need to open the editconfigpal.php and have a close look at the sections where the new custom boxes are defined (their values I mean). Perhaps there is a small typo there from cutting and pasting.

Warm regards

Nikos


Nikos
Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
Nikos,

WOW. 6 typos regarding the proper custombox numbers. Finally found them by searching for "custombox"

Found where I added the new box number, but in my haste forgot to remve the original number from the paste.

Thanks. At first I didn't think the script would run if I made typos, but now I understand the editconfig better

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
In my ubbthreads.tmpl file.... above this line:

for($c=0;$c<$catsize;$c++) { //UBBTREMARK


I put this:
code:

$thispath = "/home/measurection/htdocs/forums";
include "{$thispath}/pals/banneradmainindexpal.php";



$thispath is the Path to my threads directory


Then in my pals directory.... I put a file named banneradmainindexpal.php which looked like this:
code:

<?
$palspath = "/home/measurection/htdocs/forums";
include "{$palspath}/pals/languagepal.php";
include "{$palspath}/pals/configpal.php";
include "{$palspath}/pals/tablewrappers.tmpl";
require_once "$palspath/main.inc.php";


echo "{$wrapper[$wrapnum]['table_header']}"; // Table Start

echo "<div align="center"><b>Support Our Site - Visit Our Sponsors this Holiday Season!</b>"; // Table Heading

echo "{$wrapper[$wrapnum]['table_center']}"; // Close Header and Open Content

echo "PUT THE CODE FOR YOUR BANNER HERE";

echo "{$wrapper[$wrapnum]['table_footer']}</div>"; // Close Content and End Table

?>


$palspath is the path to my threads directory.

Hope that helps.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
I basically did the same design but embedded my banner program into a table in my header. It looks the same as yours except above the links bar.

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
No problem Mike. Glad I could help.

Warm regards

Nikos


Nikos

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 3296
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 6
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)