1
SabineC
Re: php script in block
  • 2004/3/3 8:36

  • SabineC

  • Just popping in

  • Posts: 6

  • Since: 2003/11/30


Dave, ehm, sorry, if I understand right, you are joking? Otherwise, what do you mean by print stuff out?

I am just getting mad with this, as normal additional blocks with html code work fine - this one just won't ... maybe I am somewhat unsymphathic to the script ....



2
SabineC
Re: php script in block
  • 2004/2/28 12:34

  • SabineC

  • Just popping in

  • Posts: 6

  • Since: 2003/11/30


Thank you!!!

But I could not resolve - I tried also to modify some options like cache time, but it just doesn't work (below php Script is choosen).



Ciao, Sabine



3
SabineC
php script in block
  • 2004/2/26 1:47

  • SabineC

  • Just popping in

  • Posts: 6

  • Since: 2003/11/30


Hi, I would like to insert the news from www.golem.de on my site. Golem provides a php script for this - now I am not a programmer and I am not sure if I am doing what I should do.

I created a block - inserted the php-script, choose php-script in the options below the text window when creating the block.

The code I inserted is this:

*************************
<?
/*
// golemxml.php
//
// Version: 1.0.0
// Author: Soeren Fuhrmann - sf@golem.de
// Homepage:http://www.golem.de
//
// Based on: freshmeat.php3
// Version: 2.0.4
// Author: Kalle Kiviaho - kivi@chl.chalmers.se
// Lastmod: 2000-09-24
// Homepage:http://swamp.chl.chalmers.se/backends/
*/
// Customize as you like it

$link_prefix = "·&nbsp;";
$link_postfix = "<BR>\n";

$show_abstract = true;
$ab_link_prefix = "";
$ab_link_postfix = "<BR>\n";
$ab_prefix = "";
$ab_postfix = "<BR><BR>\n";
$ab_more = "[mehr...]";
$ab_more_prefix = "&nbsp;\n";

$cache_file = "/www/tmp/golem.de.cache";
$cache_time = 0;
$max_items = 10;
$max_readsize = 10000;
$target = "_top";

// End of customizations

$backend = "http://www.golem.de/golem_backend.xml";

$items = 0;
$time = split(" ", microtime());

srand((double)microtime()*1000000);
$cache_time_rnd = 300 - rand(0, 600);

if ( (!(file_exists($cache_file))) || ((filectime($cache_file) + $cache_time - $time[1]) + $cache_time_rnd < 0) || (!(filesize($cache_file))) ) {

$fpread = fopen($backend, 'r');
if(!$fpread) {
// echo "$errstr ($errno)<br>\n";
// exit;
} else {

$fpwrite = fopen($cache_file, 'w');
if(!$fpwrite) {
// echo "$errstr ($errno)<br>\n";
// exit;
} else {
$string = fread($fpread, $max_readsize);

$pattern = "/<ARTIKEL>(.*?)<\/ARTIKEL>/is";
if (preg_match_all($pattern, $string, $match, PREG_SET_ORDER))
for($i= 0; $i< min(count($match), $max_items); $i++){
$artikel= $match[$i][1];

$pattern = "/<HEADLINE>(.*?)<\/HEADLINE>/i";
preg_match($pattern, $artikel, $lmatch);
$title= $lmatch[1];

$pattern = "/<URL>(.*?)<\/URL>/i";
preg_match($pattern, $artikel, $lmatch);
$link= $lmatch[1];


if($items== 0 && $show_abstract){
$pattern = "/<ABSTRACT>(.*?)<\/ABSTRACT>/i";
preg_match($pattern, $artikel, $lmatch);
$abstract= $lmatch[1];

fputs($fpwrite, $ab_link_prefix."<A HREF=\"".$link."\" TARGET=\"".$target."\">".$title."</A>".$ab_link_postfix);
fputs($fpwrite, $ab_prefix.$abstract.$ab_more_prefix."<A HREF=\"".$link."\" TARGET=\"".$target."\">".$ab_more."</A>".$ab_postfix);
}else
fputs($fpwrite, $link_prefix."<A HREF=\"".$link."\" TARGET=\"".$target."\">".$title."</A>".$link_postfix);

$items++;
}
}
fclose($fpread);
}
fclose($fpwrite);
}
if (file_exists($cache_file)) {
include($cache_file);
}
?>
***************************

now: is there something I am doing wrong? I don't understand, as when I test the script (http://www3.golem.de/golemxml.php) it works - when I insert it in the block it doesnt ... or should I just insert the above link in an i-frame window?

Thank you for any hint.

Best, Sabine



4
SabineC
Re: maybe a stupid question ...
  • 2003/12/14 8:45

  • SabineC

  • Just popping in

  • Posts: 6

  • Since: 2003/11/30


Thank you!

I tried to download the module, but it was not possible - so I'll create a separate database installing wakkawiki in a separate directory.

But now the next thing is: how can I show the link on the main page? I suppose I need to create a Block inserting html-code? I had a look at the XOOPS wakkawiki pages - there are no descriptions on how to do this - so if someone helps me to implement my wakkawiki on my homepage I'd then write down the whole procedure and insert it in the wakkawiki of XOOPS for other users. Probably this question was already answered before, but I cannot find the links by searching e.g. "Block".

Ciao, Sabine



5
SabineC
maybe a stupid question ...
  • 2003/12/13 13:03

  • SabineC

  • Just popping in

  • Posts: 6

  • Since: 2003/11/30


I am not a programmer, but I'd like to add wakkawiki as a module to my XOOPS intallation (www.wesolveitnet.com). I'd like to use it as documentation source for the different sofware we translators use.

I just downloaded wakkawiki from their site.

Now: do I need a separate MySQL-database (did not find this)

And: how to install it as a module under xoops? Or do I need to use a subdomain with separate database? If yes: how to insert it on my main page in order to have people find it (like on ths page XOOPS wiki).

Thank you!!!

Best, Sabine



6
SabineC
More than one language ...
  • 2003/12/6 13:03

  • SabineC

  • Just popping in

  • Posts: 6

  • Since: 2003/11/30


Hi, I installed XOOPS some days ago (www.wesolveitnet.com). Since this place is going to be a meeting place for translators we would like to have different language pages (titles etc) that all show the same content. The reason is:

A translator speaks more than one language, but not necessarily English, but e.g. contents in German and Italian is interesting. A potential customer that would like to offer a job or ask for offers for a potential translation does not necessarily know English - the forums of the different languages should be visible in all language versions - I mean the data (links etc.) should remain the same - so the German version should also show the contents in English and Italian language ... not easy I'd say. Is there a way to do this simply using different themes like I am used to work with LinksSQL (commercial package I translated into other languages).

I hope I was able to explain what I mean ...

Best, Sabine




TopTop



Login

Who's Online

201 user(s) are online (126 user(s) are browsing Support Forums)


Members: 0


Guests: 201


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits