Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jan 2000
Posts: 5,819
Likes: 16
Gizmo Offline OP
UBBDev / UBBWiki Owner
Time Lord
OP Offline
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,819
Likes: 16
Name: UBB.Headerless CustomIslands

Author: Gizmo (James of VNC Web Design)

Requirements: UBB.Threads 7.x (not compatible with UBB.Threads 6.x or below)

Current Version: v0.1

About:
If you've visited any of my client sites you'll see Custom Islands holding data placed around the forums without requiring editing of data outside of the Custom Islands (at least after modifying where you want to have the Custom Islands displayed).

Demo: I don't currently have a demo available.

Install Instructions:
You'll want to first go to "Portal Layout" area of the Control Panel and select the "External Use" link for the island you wish to use; really here all we need is 3 lines that show the "path" to files (here it's the /var/www/mysite.tld lines) for the Custom Island that we're going to be using (all code is displayed below), for this example we're going to be using the Custom Island #8.

PHP Code (For header/footer includes)
Code

<div class="vnc_ads">
<?php
if (!defined('UBB_MAIN_PROGRAM')) define('UBB_MAIN_PROGRAM',1);
$style_side="";$tbopen="";$tbclose="";
echo("<table width=\"100%\">");
include("/var/www/mysite.tld/forum/languages/english/portal_islands.php");
include("/var/www/mysite.tld/forum/languages/english/generic.php");
include("/var/www/mysite.tld/forum/cache/portal_box_8.php");
echo("</table>");
?>
</div>

Smarty Code (for use inside of template files)
Code

<div class="vnc_ads" align="center">
{php}
if (!defined('UBB_MAIN_PROGRAM')) define('UBB_MAIN_PROGRAM',1);
$style_side="";$tbopen="";$tbclose="";
echo("<table>");
include("/var/www/mysite.tld/forum/languages/english/portal_islands.php");
include("/var/www/mysite.tld/forum/languages/english/generic.php");
include("/var/www/mysite.tld/forum/cache/portal_box_8.php");
echo("</table>");
{/php}
</div>

New Style Code (Insert at "Extra Properties")
Code

.vnc_ads .tdheader {
display: none;
}
.vnc_ads .alt-1 {
background-color: #CCCCCC;
}

In the above "Code" sections (PHP or Smarty) you'll see:
Code
$style_side="";$tbopen="";$tbclose="";

These are:
$style_side=""; - Additional Style Data, Left Side of current style definitions.
$tbopen=""; - Just after table open.
$tbclose=""; - Just before table close.

You'll likely never need to change these; they are a part of the default syntax for the external use island in the UBB.

In the Style Code you'll see that we've added "vnc_ads", this is so we can change tdheader and alt-1 without having to modify any base code (it could just as easily be "my_ads" or anything other than what's being used by the base code of the UBB). The modified tdheader just hides the headerbar. The modified alt-1 just sets a background color.

What you'll do now is either edit a template and place the Smarty Code in the file at the approximate location you'd want it (say showflat.tpl above the quickreply box) and then save the template then clear your cache and your newly placed custom island is ready to go.

In our code above we've assumed you want the island centered where you place it, otherwise just remove the ' align="center"' from the "div" tag in the code. You can also add ' width="100%"' to the "table" tag above if you want it to display the full width of the area you're placing it in.

Pricing: Free


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links

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:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,558
Posts293,857
Members13,848
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,819
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 70
Gizmo 16
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2022 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Snapshot build 20220120)
Responsive Width:

PHP: 7.3.29 Page Time: 0.008s Queries: 16 (0.004s) Memory: 0.7903 MB (Peak: 0.8227 MB) Data Comp: Zlib Server Time: 2022-01-23 14:29:04 UTC
Valid HTML 5 and Valid CSS