PDA

View Full Version : Add To Favourates (CMPS 2.0 RC2)


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

ConqSoft
09-04-2005, 10:21 PM
Why not post it as a .module for easier installation? ;)

Our Sponsors
 

Gary Bolton
09-05-2005, 05:21 PM
I don't know how to create them. :eek:

ConqSoft
09-05-2005, 05:23 PM
AdminCP->CMPS->Download/Upload Module

Download it to a .module.

Done. ;)

You'll still need to include the PHP file, I think, as I don't THINK it includes that part.

Our Sponsors
 

Gary Bolton
09-05-2005, 05:27 PM
Ah, that simple! Cheers.

Can I ask you were you got your CMPS Gallery Module from on your CMPS site. I run vb 3.0.8 and CMPS 2 and I want that same module for my portal big time to finish my galllery off.

ConqSoft
09-07-2005, 01:35 PM
I just found that it appears that the PHP code *is* included when you export the .module, so you should be able to just attach that to your first post and nothing else is needed.

Gary Bolton
09-07-2005, 03:01 PM
I'll export it and take a look later

sly ls1
05-31-2007, 09:41 AM
nice, works perfect

cheers

Kadi
07-12-2007, 09:20 AM
Thanks. It worked but I'd like to include "Add To Favorites" as a link along with other links in another module.

How is that done?

Thank you