Gary Bolton
09-04-2005, 10:11 PM
Add To Favourates Module (CMPS 2.0 RC2)
create a php file called "bookmark" and add this content below and upload the file to your modules folder:
<?php
$collapseobj_bookmark = $vbcollapse['collapseobj_bookmark'];
$collapseimg_bookmark = $vbcollapse['collapseimg_bookmark'];
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_bookmark') . '";');
?>
Create a new template called "adv_portal_bookmark" and add this content below (no changes should be needed in the template).
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('bookmark')"><img id="collapseimg_bookmark"
src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_bookmark.gif" alt="" border="0" /></a>
<span class="smallfont"><strong>$vba_style[portal_blockbullet] Bookmark Site</strong></span></td>
</tr>
</thead>
<tbody id="collapseobj_bookmark" style="$collapseobj_bookmark">
<tr>
<td class="$getbgrow">
<div class="smallfont" align="center">
<a href="#" onclick="if (window.sidebar) { window.sidebar.addPanel('$vboptions[hometitle]', '$vboptions[homeurl]',''); } else if( document.all ) { window.external.AddFavorite( '$vboptions[homeurl]', '$vboptions[hometitle]'); } else if( window.opera && window.print ) { return true; }">Add To Favourites</a></div>
</td>
</tr>
</tbody>
</table>
<br />
--------------------------------
Now add a new "Module" and choose "PHP File" and use these settings below:
Module Title: Bookmark
File to Include: bookmark.php
Identifier: bookmark
Templates Used: adv_portal_bookmark
Use Module Shell Template: No
create a php file called "bookmark" and add this content below and upload the file to your modules folder:
<?php
$collapseobj_bookmark = $vbcollapse['collapseobj_bookmark'];
$collapseimg_bookmark = $vbcollapse['collapseimg_bookmark'];
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_bookmark') . '";');
?>
Create a new template called "adv_portal_bookmark" and add this content below (no changes should be needed in the template).
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('bookmark')"><img id="collapseimg_bookmark"
src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_bookmark.gif" alt="" border="0" /></a>
<span class="smallfont"><strong>$vba_style[portal_blockbullet] Bookmark Site</strong></span></td>
</tr>
</thead>
<tbody id="collapseobj_bookmark" style="$collapseobj_bookmark">
<tr>
<td class="$getbgrow">
<div class="smallfont" align="center">
<a href="#" onclick="if (window.sidebar) { window.sidebar.addPanel('$vboptions[hometitle]', '$vboptions[homeurl]',''); } else if( document.all ) { window.external.AddFavorite( '$vboptions[homeurl]', '$vboptions[hometitle]'); } else if( window.opera && window.print ) { return true; }">Add To Favourites</a></div>
</td>
</tr>
</tbody>
</table>
<br />
--------------------------------
Now add a new "Module" and choose "PHP File" and use these settings below:
Module Title: Bookmark
File to Include: bookmark.php
Identifier: bookmark
Templates Used: adv_portal_bookmark
Use Module Shell Template: No