PDA

View Full Version : Problem creating a module from a custom script


msimonds
10-13-2004, 02:03 PM
I have a script that I am trying to import and show as a side block on new site. The actual script is located here:

http://www.uoptoday.com/forum/modules/scores.php

and this is what I did

I uploaded that script to my modules directory

created a new php script called score.php with the following and uploaded it to my modules folder also:

<?php
ob_start();
require("/home2/uop/public_html/forum/modules/scores.php");
$scores = ob_get_contents();
ob_end_clean();
eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_generic_score') . '";');
?> Created a new template called adv_portal_generic_score with these contents

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Scores</strong></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
$scores
</td>
</tr>
</table>
<br />and this is not working, the acutal script does work, I follower the instructions in this post:
http://www.vbadvanced.com/forum/showthread.php?t=1082

and I know that I am doing something wrong

any help would be appreciated

thanks in advance

Mike

msimonds
10-13-2004, 02:15 PM
never mind, I figured it out

This is a great portal