Hello my Friends,
Many users have asked me to help them to add some additional info in vbNews. Here is an example on how to include simple HTML code (even if it can be anything). This tutorial will show you how to incule a YouTUBE block
Step 1:
With a text editor create a file with the following code:
Code:
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" width="100%" class="tborder">
<tr>
<td class="thead" align="left">YouTUBE Demo</td>
</tr>
<tr>
<td class="alt2" align="left" valign="top" width="100%">
........... Here you must place your object code, or anything else HTML code...........
</td>
</tr>
</table>
- Save this file as mytube.inc.php
- Upload the file at vbnews/includes/
Step 2:
Modify vbnews.php file :
Find:
Code:
if ($_REQUEST['do'] == 'main'){
Just below add:
Code:
// Create YouTUBE Block
ob_start();
include('vbnews/includes/mytube.inc.php');
$mytube = ob_get_contents();
ob_end_clean();
- Save and upload the file
Step 3:
Edit the template vbnews_main. In any place you want to show this block add this code:
$mytube is a variable name just for refference here. You can use any name you like. Just dont forget the sign $ before the name and of course to use the same name in the template.
That's all. Now in your vbNews main page will appear the YouTUBE video.
Cheers
Maria