Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

May 17, 2022, 02:08:58 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 193341
  • Total Topics: 21073
  • Online today: 55
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 1
Guests: 54
Total: 55

Author Topic: Add Wikipedia To Your Site.  (Read 38979 times)

0 Members and 1 Guest are viewing this topic.

Xarcell

  • Guest
Add Wikipedia To Your Site.
« on: April 25, 2006, 05:19:32 PM »
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

Offline stormlrd

  • Friends
  • *
  • Posts: 767
Re: Add Wikipedia To Your Site.
« Reply #1 on: April 25, 2006, 05:41:28 PM »
Ill give it a wack

Offline stormlrd

  • Friends
  • *
  • Posts: 767
Re: Add Wikipedia To Your Site.
« Reply #2 on: April 25, 2006, 05:56:01 PM »
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.

Offline stormlrd

  • Friends
  • *
  • Posts: 767
Re: Add Wikipedia To Your Site.
« Reply #3 on: April 25, 2006, 06:00:23 PM »
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

Code: [Select]
$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

  • Guest
Re: Add Wikipedia To Your Site.
« Reply #4 on: April 25, 2006, 06:06:59 PM »
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?

Offline stormlrd

  • Friends
  • *
  • Posts: 767
Re: Add Wikipedia To Your Site.
« Reply #5 on: April 25, 2006, 06:42:06 PM »
hmm let me see i just noticed the links myself as well

Offline stormlrd

  • Friends
  • *
  • Posts: 767
Re: Add Wikipedia To Your Site.
« Reply #6 on: April 25, 2006, 07:44:48 PM »
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:

Code: [Select]
<!!!! 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:

Code: [Select]
<!///////////////////////// 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

« Last Edit: April 25, 2006, 08:04:41 PM by stormlrd »

biffking

  • Guest
Re: Add Wikipedia To Your Site.
« Reply #7 on: April 25, 2006, 09:12:26 PM »
Quote
Fatal 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

Offline stormlrd

  • Friends
  • *
  • Posts: 767
Re: Add Wikipedia To Your Site.
« Reply #8 on: April 25, 2006, 09:19:22 PM »

Xarcell

  • Guest
Re: Add Wikipedia To Your Site.
« Reply #9 on: April 25, 2006, 09:30:56 PM »
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
« Last Edit: April 25, 2006, 09:32:38 PM by Xarcell »