TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 488
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 84
  • Total: 84

Custom Page (I know this has been asked but...)

Started by JayT, May 13, 2006, 02:22:34 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JayT

Hey, I searched and didn't really find the answer to my question or maybe I did and didn't know it.

Anyways, I want to add a Website Top Ten List page. I have script up and running on my server but I am not sure how to get it integrated into TP. Below are the links and any help is greatly appreciated.

Site: http://www.legendsforums.com

Top Ten list script: http://www.legendsforums.com/clanwebsites/

eldacar

The easiest way is to put the code in a PHP article.

JayT

Yea, I seen that. I guess the problem is I don't know what code needs to go in there.

bloc

What code is used to display what you have?

Usually its not much you need to convert for use in a php article/block.

JayT

#4
Here is the index.php code:
<?php
/* ---------------------------- */
// basic stuff
/* ---------------------------- */
require './global.php';
$site['title'] = $evoLANG['main'];

/* ---------------------------- */
// topsite class
/* ---------------------------- */
$content $top->init_main();

/* ---------------------------- */
// generate page
/* ---------------------------- */
$page->generate();
?>


But that gives error messages. That it cant find the files to run the script. I changed the path for the global.php but that isn"t enough.

Through TP, it is looking for the files in the root. In the script all the paths are './blah.php'

gerrymo

You'll get errors if you dont take out the php tags. Remove <?php and ?> (1st and last lines) and try again. A php article already know it's php, so doesnt need the tags.

JayT

Yea, I done that. That is just the exact code from the index.php.

gerrymo

I cant see what's wrong. Someone else probably will. In the mean time, there are a couple of things you could try.

php block/php article

include('path/to/file');


iFrame in a html/javascript block or standard article.

<iframe src="pathe/to/file" height="400" width="100%" scrolling="no" frameborder="0"></iframe>

(set the height to suit your needs)

JayT

The iframe worked but it isnt really asthetic.

If the block could be opened in a seperate page it would be fine.

gerrymo

Why not create a custom action to do the job for you? Follow the steps in this thread. You'll need to substitute some psrts for your own page type, but it's not too hard to do. I've done it with a Gallery and FAQ page on the same site. Takes a little bit of fiddling to get it right though.

http://www.simplemachines.org/community/index.php?topic=19518.0;all

This website is proudly hosted on Crocweb Cloud Website Hosting.