|
||||||
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.
Custom Islands · WikiWhat Is Covered• Summary • Creating a Custom Island • Editing a Custom Island • Default Code • Examples • Example 1: Using PHP and HTML • Example 2: Site Links Navigation Menu • Example 3: Image with Embedded Link • Example 4: Upcoming Events (MySQL Query) • Example 5: Detect Login • Example 6: Random Image SummaryWithin UBB.threads exists a feature called "Custom Islands" and they're a great method of displaying content that doesn't necessarily relate to the forum software itself. You can: • Create unlimited Islands. • Use them in your portal page as well as your main forum as side islands. • Use them externally on a non ubb page or add them to your header or footer. • Use them as a custom island insert between the first and second post in a forum. • Add php code and or html code on each one. Some people experience difficulties in creating Custom Islands however once you understand the system it is relatively simple. For this article we will deal only with creating a custom island, not using it with the features mentioned above. Creating a Custom IslandTo get started in creating a Custom Island is to open the Control Panel within UBB.threads and navigate to the "Custom Islands" link in the Portal settings section. From here either select the "Edit" link (to the right of an existing Custom Island) or create one with the "Add Additional Custom Island" tab at the bottom of this page. Editing a Custom IslandOn this page you'll see several fields that you can edit: • Name - This appears as the header for the Custom Island's Portal Box. Your entry here will appear as the header for that island. • Cache Time - In Minutes. If zero is specified, the body of this custom box will be static, ie. never updated. This setting would be used for things like links, banner ads, etc. If you enter 1 minute then the island would be rebuilt every minute. • Always Build - With this option checked, this island will always be built even if it's not used in your portal. This would allow you to use the island elsewhere on your site, such as a page that doesn't get built through UBB.threads. You an also use it in your UBB.threads "HTML Includes" or enter the text within a template. • Body - This field contains the PHP code or HTML for the custom box. $body contains the actual content that should be printed in the custom box. Most people experience difficulties with the creation of their Custom Islands with the Body[b] section. Below we list the defaults so you can easily restore the island to what came with the stock UBB.threads install. There are two sections within [b]Body, an area for PHP and a separate area for HTML. You will need to keep these sections separate, and you must enter your HTML between the EOF lines (otherwise you'll be presented with an error versus working code). If you're attempting to insert 3rd party code, it may have to be separated to work with the Custom Island formatting. Note Do not delete any of the default code when editing the Island. Default CodeCode /* PHP CODE HERE, IF NECESSARY */ ExamplesWe have prepared several examples of what you can do with the Custom Islands system within UBB.threads. Example 1: Using PHP and HTMLFor this example it will display "My 2 + 2 math equals 4" in the Island. Even though it is a simple math statement, it shows how to break up your php script to display the results in the html section of the island. Code /* PHP CODE HERE, IF NECESSARY */ Example 2: Site Links Navigation MenuFor this example we will use the Site Links menu at UBBCentral. Code /* PHP CODE HERE, IF NECESSARY */ Example 3: Image with Embedded LinkFor this example we will use Mindraven's static ad. Note aff=015 is the affiliate number so change accordingly to your number. Unless you want to give me credit on all the clicks from your site. Code /* PHP CODE HERE, IF NECESSARY */ Example 4: Upcoming Events (MySQL Query)This example will show how to use a MySQL query extracting data from the calendar and display the results in the Island. Sirdude created this and a special thank you to him for its creation. To view the complete article visit Upcoming events Custom Island. Code /* PHP CODE HERE, IF NECESSARY */ Example 5: Detect LoginThis example will show how to make an island display something different after a person has logged in. In the example below, it tells the person that they have successfully logged in. Prior to that, it contained a link on how to get their Password sent to them. Code /* PHP CODE HERE, IF NECESSARY */ Example 6: Random ImageHere's a quick little "random image" custom island that can be used/modified. Just displays a single random image that links to the the actual gallery post: Created by Rick Baker. Code /* PHP CODE HERE */ Posted on October 4th, 2014 · Updated on October 6th, 2015
▼ Sponsored Links ▼
▲ Sponsored Links ▲ Comments( |
||||||
▼ Sponsored Links ▼
▲ Sponsored Links ▲ |
||||||