PDA

View Full Version : Add a script into a module


SiFor
06-29-2004, 03:11 PM
I have a top-sites php script running at my site here (http://www.certforums.co.uk/topsites/list.php) that I would like to include into a module so I can then add that module to a new page.

Can anyone help me do this?

Brian
06-29-2004, 03:17 PM
I'm assuming that's not integrated with vBulletin, is it? If not it would take quite a bit of work.

Our Sponsors
 

SiFor
06-29-2004, 03:26 PM
No, its a stand alone script that is entirely in that folder and uses a few small tables in the same database.

Maybe I'm trying to do this the wrong way around, would I be better trying to add the vBulletin header and footer to the existing script rather than include it into vbadvanced?

Brian
06-29-2004, 03:32 PM
Probably... Without seeing the script, it's hard to tell exactly what you would need to do. Most likely though you would just need to add this somewhere near the top:

chdir('/path/to/your/forums');
require_once('./global.php');

And then add $header and $footer somewhere in the script. ;)

Our Sponsors
 

mholtum
06-29-2004, 04:10 PM
You could use <iframe></iframe> to pull that entire list.php file into a module or page..

mholtum
06-29-2004, 04:14 PM
This is the code I used to pull my pabox.php file into a module:


<!-- Shoutbox Block -->
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b><font color="#4A2906">$vboptions[blockbullet]</font> <font color="#663C0C"><img src="http://www.ravensrealm.net/forum/images/dot.gif">ShoutBox</font></b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">

<center>
<iframe src="http://yoursitenamehere/pabox/pabox.php" width="155" height="250"></iframe>
</center>

</span>
</td>
</tr>
</table>
<br />
<!-- End Shoutbox Block -->


You will have to adjust the width and hight to fit your needs