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

Recent

Welcome to TinyPortal. Please login or sign up.

June 25, 2024, 11:23:02 PM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,280
  • Total Topics: 21,227
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 173
  • Total: 173

Add Wikipedia To Your Site.

Started by Xarcell, April 26, 2006, 12:19:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Xarcell

Here is a script I found, that will allow you to add the whole wikipedia to your website. However, I can get it to work, but not all of it within the theme.

I do not know php enough to intergrade it properly with TP/SMF.

I was hoping someone here would take a look at it to make it work better with the theme.

http://www.serebella.com/cyclo_script/

It updates itself, and does not use your storage/bandwidth.

Thanks,

-Xarcell

stormlrd


stormlrd

lol well i need to get my portal upgrade to 86 working correctly first but I already downloaded it and was wondering why you cant just install the php section in between the <? ?> directly into a php block therefore picking up the current theme settings.

stormlrd

http://stormlrdsreality.co.uk/RC2/index.php

worked like a charm on my rc2 test forum check it out

just insert this code directly into a center block phpbox


$search_string=$_GET['title'];

$sss=array("http://www.serebella.com/cyclo_script/article.php?title=",$search_string);
$ssss=implode('',$sss);
if($search_string=="")$ssss="http://www.serebella.com/cyclo_script/topics.html";
$file = fopen ($ssss, "r");
if (!$file) {
    echo "<p>Unable to open remote file.\n";
    exit;
}

$html_code="";
while (!feof ($file))
   {
    $line = fgets ($file, 1024);
    $array = array($html_code, $line);
    $html_code = implode(' ', $array);
   }

fclose($file);

print $html_code;


nothing else required bro.

Xarcell

As I said, I can get part of it to work properly.

Your links do not work. You can change the url's in the file, but then the pages load without the theme, outside of TP/SMF.

Any other ideas?

stormlrd

hmm let me see i just noticed the links myself as well

stormlrd

#6
ok solved.

Upload the a.php and the topics.html to your root folder

than place the following in a php block:
require("/home/stormlrd/public_html/RC2/SSI.php");
require('[[[url to your root folder]]]]/a.php');

I recommend a center block

than open the a.php file and add the following:

at the top:


<!!!! You may customize until the next horizontal line///////////////////!>
<?php
require("/home/stormlrd/public_html/RC2/SSI.php");
global 
$context$settings$options$txt;
echo 
'
<link rel="stylesheet" type="text/css" href="'
$settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/print.css?rc2" media="print" />';

echo
' <table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder">
       '
;
echo
' <tr class="windowbg2">
<td  valign="middle" align="center" class="catbg" style="border-width: 1px 0 0 0; font-size: smaller;">'
;


ssi_menubar();

    echo 
'</td></tr><tr class="windowbg"><td  valign="middle" align="left" class="windowbg" style="border-width: 1px 0 0 0; font-size: smaller; padding: 10px 10px 10px 10px;">';

?>

<!///////////////////////// leave this alone/////////////////////////////////!>


at the bottom:


<!///////////////////////// begin customizing again /////////////!>
<?

echo '</td></tr></table>';
echo '
<br />';



?>


modify the table to suit

ok sorted just need to play with it a little bit but thats got it
http://stormlrdsreality.co.uk/RC2/index.php  home page of forum

a article:

http://stormlrdsreality.co.uk/RC2/a.php?title=Astronomy


biffking

QuoteFatal error: (null)(): Failed opening required '/public_html/smf/SSI.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/americas/public_html/smf/Sources/Load.php(1608) : eval()'d code(34) : eval()'d code on line 1
I keep getting this error

stormlrd


Xarcell

#9
I tried the paths and got a problem. When I click the links I get the message: No input file specified.

I tried the url's and got this error:

Please don't access SSI.php by URL directly; you may want to use the path ('SSI.php') or add ?ssi_function=something.
Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/.abigaildryer/xarcell/xarchology.com/smf/SSI.php on line 158