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
Ill give it a wack
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.
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.
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?
hmm let me see i just noticed the links myself as well
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
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
try using the full link
require('http://stormlrdsreality.co.uk/RC2/SSI.php');
require('http://stormlrdsreality.co.uk/RC2/a.php');
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
I figured it out, I had to edit the links within the file. But still, I still have the same problem. Whne i view the information, it is not within TP/SMF.
Any other ideas?
An iframe just doesn't work good.
Maybe I should try a dynamic iframe.
this is weird x because it works fine on mine.
Thats a totally fresh install of rc2 and v86 done yesterday, that burgundy theme was added yesterday. There are no mods on the forum other than tp. I uploaded the html and the a.php directly to the root of that test forum.
I created a php block with this exact info in it:
require("/home/stormlrd/public_html/RC2/SSI.php");
require('/home/stormlrd/public_html/RC2/a.php');
i changed nothing on the topics.html
I changed the top and bottom of the a.php to this exactly:
<!!!! 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;">';
// Show the menu here, according to the menu sub template.
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/////////////////////////////////!>
bottom:
<!///////////////////////// begin customizing again /////////////!>
<?
echo '</td></tr></table>';
echo '
<br />';
?>
so Im not sure why yours is not working at all.
Please note i call the ssi twice once in the phpblock and once on the a.php file it has to be in both places or you get that 2nd error you got.
I don't think we are on the same page here.
Ok, I have mine working just like yours. I've done it 2 different ways. However, when you click astrology, it does not show up within TP, with top blocks, left or right blocks, etc...
got a link bro? let me see what your trying to do because mine shows style sheet on all
problem with using the ssi is that it puts the page in a block like iframe with a second menu bar the only other thing i can think of is doing as some sort of iframe but i think thats more trouble than its worth. I think a return link to the forum would probably be best rather than the menubar that way its runs as a separate entity
Show stylesheet on all and showing within TP is 2 different things.
lol ok so exactly what are you wanting bro? I'll help but need to know what exactly you want.
I don't know how to explain it any better.
Every since link within you click within the pedia should load within TP with blocks and all, without using an iframe.
ok I see what you want now let me think on it
I'm not php savy enough to come up with a solution that doesn't involve an iframe.
However, I did try to put the code from the topics.html into an article, and put the index.template.php code into the a.php. Although, it did create a problem. It would only show that one theme. If a user changed themes, the pedia would only show the code I inserted from the index.template.php file.
yea i was trying similiar by hard coding it but again it would only be that theme
I installed the wiki and modified a.php using stormlrd's code. The script has it calling the menubar from the ssi.php, but as I have a lot of buttons in my header, the center block runs off the page - badly - unless the block is minimized.
Possible solution (haven't tried yet), but what if a menu item was created that called up the topics.html page in the header menubar? Could the requires be called up via the template file instead? I don't know what code would be necessary to include in the template file.
well the other option i was considering was adding a link at bottom and top instead of menubar that returns you to the forum home page.
ok i just added return to forum links at top and bottom, thats about the best i can come up.
OK - after thinking some more (yep, killed more brain cells with this one), what's the feasibility of having this mimick the help function? I briefly scanned the help.php and help.template.php files - seems it could be adapted (renamed, of course) to accommodate the wiki???
the problem is the code it calling at the wiki site, its looking back for the topics and a.php file if we could rename it than alot more would be possible.
Ok. I took the easy way out - ended up setting the wiki as an article withinin a borderless iframe and linking via content box. The article title (header) served as the link back to the Wiki index, negating the use of the ssi sidebar.
Link: http://dkaye.com/ecafe/index.php?page=22
Seems when all else fails, articles are the way to go??
nice care to share the exact setup?
The How-To:
In the top section of the a.php file (cut and paste the following and insert into file, adjusting the path to your ssi.php file, and set background color, if necessary):
<!!!! You may customize until the next horizontal line///////////////////!>
<?php
require("/var/www/html/FORUM/SSI.php"); // set path
global $context, $settings, $options, $txt;
echo '
<link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css" />
<link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css" media="print" />';
echo ' <style type="text/css" media="screen">
body{
background: #FFFFFF; } //set bgcolor to theme, or set to transparent
</style>';
echo' <table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" class="tborder">
';
echo' <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/////////////////////////////////!>
in the bottom section of the a.php (cut and paste into file):
<!///////////////////////// begin customizing again /////////////!>
<?
echo '</td></tr></table>';
?>
Then create an article (cut and paste the following):
<DIV align=center><IFRAME id=wikie align=center marginWidth=0 marginHeight=0 src="a.php" frameBorder=0 width="100%" height=1000 allowTransparency></IFRAME></DIV>
For the article options, check (select) the following:
Display:
Use just the title
Viewing options:
Show title
Show linktree
Show top
Show centerblocks
Show rightblocks
Show leftblocks
Finally, go into the MenuManager through Admin: Blocks, and activate the article you just created.
Edit menu item:
Title: Wikipedia
(open): Same window
Type: Article
Item: Wikipedia, the Free Encyclopedia
I guess using stylesheet with dynamic iframe is the best way to go? This way, you have the colors and everything matching, while it stays within TP without scrollbar.
Are the logins bridged too?
I have a wiki and smf_tp on one site, but as a few have said, never thought of integrating them.
It's displays text & links only...
No login, no images.
I think you are over-complicating it. You can use the code in the a.php file..but you don't need to have the a.php file itself.
- start a php article and insert:
$search_string=$_REQUEST['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;
This is the "work" page, which you send the request too. Get the page=xx number for it.
- create another page, php or html, and simply add something that will link as follows: index.php?page=xx;title=yoursubject.
Then the "work" page will show the result from wiki in full, no iframe and no ssi. You can add something on top or bottom to get back to your "search page"..or add another link. The "search page" could be like the "topics.html" or even better: a simple form, which goes to index.php?page=xx. Call the input field "title". The page will then pick up the $_REQUEST['title'].
example: http://www.tinyportal.net/smf/index.php?page=31 - try searching for "Astronomy". ;)
Quote from: Bloc on April 30, 2006, 09:09:50 PM
I think you are over-complicating it.
Yep, that's me.
I'm trying to follow you, but I'd have to do it to understand it exactly. I will start on it soon.
However, I noticed something. In your example, after searching for "Astronomy", it comes up. However, when I click a link within that article, it comes up blank.
Yes, I see it. That might need some redirecting...hm, one moment.
A simple redirect is done..but its not optimal.
That seems good enough. Your slick...
What would we ever do without you?
:)
Ok, I'm trying to get this working so I can understand it better and try to offer support for it.
I cannot seem to get it to work. This is the part where I get confused:
Quote- create another page, php or html, and simply add something that will link as follows: index.php?page=xx;title=yoursubject
To link to the "work" article? ex: index.php?page=4;title=Astronomy
When I do that, it comes up with a message saying: Unable to open remote file.
Here are my code for the 2 pages, plus the redirect code:
"search page" (page=31) PHP-type:
echo '<br><br><h3>
type your serch word here, and the result from wiki will appear in another article</h3>
<form name="wikisearch" action="index.php?page=30" method="post">
<input name="title" type="text" value=""><input type="submit" value="Search wiki"></form>';
"result page" (page=30) PHP type:
$search_string=$_REQUEST['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);
echo '<div style="background: white; border: solid 3px #d0d0d0; padding: 30px;">'.$html_code.'</div>';
a.php, uploaded into the forum folder:
<?php
$title=$_GET['title'];
echo '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Bloc Zone</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location=\'"+args[i+1]+"\'");
}
//-->
</script>
</head>
<body onLoad="MM_goToURL(\'parent\',\'http://www.tinyportal.net/smf/index.php?page=30;title='.$title.'\');return document.MM_returnValue">
</body>
</html>';
?>
You start with "search" page, type what you need, and get sent to "result page". Any link in "result page" points to a.php, so a redirect file must send you back to "result apge" - with the new search string, just as Wiki works.
In this result page, another link to the first "search page" could be added, like "search for another" etc.
Hrmmmm... I dunno what I'm doing wrong. I get: Unable to open remote file.n
I did edit the urls from: index.php?page=30; to index.php?page=4; in teh search & a.php
I deleted my articles and started over. I'm still doing it wrong I guess. I copied and pasted what you had into php articles. One named "Search Wiki" and "Result Wiki". I changed the url's accordlying in "search wiki" and "a.php". The a.php I uploaded to my smf root directory.
Does the a.php need to be named "a.php" or can we call it "redirect_wiki.php"?
No, it needs to be named a.php, because the wiki site puts that in the links. Your site will then append your site url in front of it.
I hate to be a pain, but this just doesn't work for me.
Hm, how does your "search" page look? and your "result" page + the a.php file?
Quote from: Xarcell on April 30, 2006, 11:21:35 PM
I deleted my articles and started over. I'm still doing it wrong I guess. I copied and pasted what you had into 2 php articles. One named "Search Wiki" and the other "Result Wiki". I changed the url's accordlying in "search wiki" and "a.php". The a.php I uploaded to my smf root directory.
Search page = great.
Result page = Unable to open remote file.n
a.php file:
<?php
$title=$_GET['title'];
echo '
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Bloc Zone</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location=\'"+args[i+1]+"\'");
}
//-->
</script>
</head>
<body onLoad="MM_goToURL(\'parent\',\'http://xarchology.com/smf/index.php?page=6;title='.$title.'\');return document.MM_returnValue">
</body>
</html>';
hm, seems the problem is the server not being able to open the remote file then?
I thought that at first, but it seems it only happens when I try to do as you suggested. It makes no sense to me. Maybe it has something to do with "my" server settings, is that possiable?
It works on yours, but not mine.
Can you copy and paste your result script for me again. I just wanna make sure it's the same as what I had.
PHP Article "Result Wiki":
$search_string=$_REQUEST['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);
echo '<div style="background: white; border: solid 3px #d0d0d0; padding: 30px;">'.$html_code.'</div>';
Can we put our own adsense number in???
No, that's how the author of the script gets compensation for writing the script.
Cool, thanks it works 8)
I tried a search using two words such as 'United States' and get this back:
Unable to open remote file.n
Any ideas? :o
Edit - same thing happens here - http://www.tinyportal.net/smf/index.php?page=31
You need to replace any spaces with %20. So search for "united%20states", not "united states".
Quote from: Bloc on August 22, 2006, 11:06:23 PM
You need to replace any spaces with %20. So search for "united%20states", not "united states".
Wow, I wouldn't have known that in a million years, thanks Bloc! :up:
i don't understand, is this adding the WHOLE wikipedia to your website? is there a demo of it? i saw a link on the front page but its only 1 article? wikipedia is pretty Effin big, what / how does it work? can somebody show me it in action? i would love to have a whole wikipediao n the site
No, its not the whole thing lol..rather a script that search, collect and presents the results from Wikipedia - within your site.
ohhhh lol! i thought it was too good to be true i was going to say "Oh my god, how the heck can somebody steal the whole wikipedia, lmao.
did you ever get past that error xarcell? it seems to be happening to me.
having said that, http://www.serebella.com/ doesnt seem to exist.
this script no longer seems to be working.
Not working on my site either. I'm getting the same error as before:
Unable to open remote file.n
the script ran on files located on thier server. Now there server is down.
I really liked this script and was wondering if anyone else wanna try and duplicate the effect? or rewrite the script...
This would have been a great script if someone could figure it out.
Quote from: twister on March 14, 2007, 05:08:45 AM
This would have been a great script if someone could figure it out.
I used this scriptbox on a right block
<form action="http://www.wikipedia.org/search-redirect.php" method="get">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<br>
<br>
<input type="submit" name="go" value=" Go! " />
</form>You can change the length of the input field, just change 20 to a bigger number.
Quote from: RoarinRow on March 14, 2007, 06:03:18 AM
I used this scriptbox on a right block
<form action="http://www.wikipedia.org/search-redirect.php" method="get">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<br>
<br>
<input type="submit" name="go" value=" Go! " />
</form>
You can change the length of the input field, just change 20 to a bigger number.
this code works fine !
what about if i wanna Wiki open in new window ?
Wow, ask and you shall receive. Thank you Xarcell, it works great.
This should do the trick if you want it in its own window. ;D
<form action="http://www.wikipedia.org/search-redirect.php" method="get" target="_blank">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<br>
<br>
<input type="submit" name="go" value=" Go! " />
</form>
Peace,
TPnewbie
Quote from: TPnewbie on March 25, 2007, 09:34:00 AM
This should do the trick if you want it in its own window. ;D
<form action="http://www.wikipedia.org/search-redirect.php" method="get" target="_blank">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<br>
<br>
<input type="submit" name="go" value=" Go! " />
</form>
Peace,
TPnewbie
Cool, thanks that worked! ;)
Yes Cool, I place this in a scriptbox and works great, thanks!
regards,
Max
A search box for your own wiki :)
http://www.ipbwiki.com/Media_Wiki[...] (http://www.ipbwiki.com/Media_Wiki:Add_a_wikipedia_search_box_from_your_main_website_or_blog)
hello i tried your this code, but its not working at all, i am getting this error
QuoteParse error: syntax error, unexpected '<' in /home/asklife/public_html/mysitefolder/Sources/Load.php(1860) : eval()'d code(35) : eval()'d code on line 1
make sure you put in in a 'scriptbox' , and that you have all the code in there, including the </form> at the end ....
Quote<form action="http://www.wikipedia.org/search-redirect.php" method="get" target="_blank">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<input type="submit" name="go" value=" Go! " />
</form>
... hope this helps
Quote from: Maya on June 12, 2007, 05:31:28 PM
make sure you put in in a 'scriptbox' , and that you have all the code in there, including the </form> at the end ....
Quote<form action="http://www.wikipedia.org/search-redirect.php" method="get" target="_blank">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<input type="submit" name="go" value=" Go! " />
</form>
... hope this helps
nope i tried this also, still its not working, i have put this in scriptbox only
hmmm. can you please post the exact code you have in your script box...
I just tried this code to see if I got the same error, and it works fine ;)
this was the code i had put in my site
Quote<form action="http://www.wikipedia.org/search-redirect.php" method="get" target="_blank">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<input type="submit" name="go" value=" Go! " />
</form>
I take it then that because the serebella.com site is no longer active, that it is now not possible to have wikipedia articles appear on your own tp_smf site? anybody know what the "cyclo_script" contained?
This would be so good if it could work again. Anybody interested in getting it working again?
Peregrinus~
That code just worked for me, all it did was launch a new page, go to wiki and do the search but thats kinda cool on its own
Works fine for me too...here's a slightly extended version using two search buttons, one to get a direct hit and the other to search all of WIKI for the phrase...just like WIKI's own search boxes...I center it just for looks...
<center>
<form action="http://www.wikipedia.org/search-redirect.php" method="get" target="_blank">
<input type="hidden" name="language" value="en" />
<input type="text" name="search" size="20" />
<br>
<br>
<input type="submit" name="go" value=" Go! " title="Go to a page with this exact name if exists." />
<input type="submit" name="fulltext" value="Search" title="Search the pages for this text"/>
</form>
</center>
What I mean is so that the pages/results could somehow be incorporated into an article or something, with your own theme etc...That is what the original script did I believe, the cyclo script.
Originally, the wiki article, appeared within your own article. That was the script's intentions. To make it look like wikipedia was inside your own site.
Hello all,
Can anyone upload the tutorial and required files to integrate the Mediawiki or docuwiki in tinyportal?
Thanks in advance,
electrojit
Doubtful. This topic was last posted in over 2 and a half years ago. At this point, you would be better off posting a new [request] in our requests board. The link to that board is here--> http://www.tinyportal.net/index.php?board=133.0
ZarPrime