Page 1 of 2
Problem with external php application
Posted: Fri Jun 08, 2007 4:08 pm
by hans_olo
Hi,
I already searched the forum but could not find a solution to my problem.
As i am a new s9y user i hope that im not boring.
I tried to use the "liga manager online" via the external php application plugin, but i always get the error message:
Fatal error: Cannot use string offset as an array in D:\PHP\xampp\htdocs\serendipity\plugins\serendipity_event_nl2br\serendipity_event_nl2br.php on line 137
as you can see its a local installation (i hope thats not the problem) for testing purpose. Serendipity Version 1.12 / plugin Version 1.3
Im not that familiar with php, so any hint would be helpful.
Thanks in advance,
hans_olo
Re: Problem with external php application
Posted: Fri Jun 08, 2007 7:55 pm
by garvinhicking
Hi!
Do you get this error message only on the page where your externalPHP application should be?
It's strange, because the markup plugin there should not be involved.
The 'external php' plugin actually only executes a PHP 'include' command with your target script.That target script must work when being called from a Class construct. Some scripts will not work if they issue their own database connections without caring about existing ones, or if they use global variables that are not really global.
When you create a simple application file called "test.inc.php" with this content:
<?php echo "Here I am!"; ?>
and use that as your external PHP application, do you get the same error??
Regards,
Garvin
Posted: Fri Jun 08, 2007 9:37 pm
by hans_olo
Hi,
and thanks a lot for the quick response.
I tried the "test.inc.php"-file and it works fine. So it seems to be some problem with lmo. Hmmm, according to the lmo help file "include" should be possible, but maybe i am doing something wrong.
Do you have any idea what the problem is, or do you know any alternative league manager that is already working with serendipity ?
Greets,
hans_olo
Posted: Fri Jun 08, 2007 10:43 pm
by garvinhicking
Hi!
Sadly my time is already limited supporting serendipity, so sadly I have little time to inspect other applications to see how they might interact...
Another idea to "embed" it to your site would be using the "wrapurl" plugin that wraps a foreign page into an iframe, have you tried that?
Bestregards,
Garvin
Posted: Sat Jun 09, 2007 8:12 am
by hans_olo
garvinhicking wrote:...
Another idea to "embed" it to your site would be using the "wrapurl" plugin that wraps a foreign page into an iframe, have you tried that?
Not yet, but i´ll try.
Thanks for helping,
hans_olo
Posted: Mon Jun 18, 2007 2:42 pm
by Timbalu
Hi
I experienced the same problem using a own plugin after submit.
I could not find out, why the nl2br plugin was parsing my submit.
So I disabled the line 137 and now everything seems ok.
Could someone tell me, what could break now by doing this?
Code: Select all
foreach ($this->markup_elements as $temp) {
if (serendipity_db_bool($this->get_config($temp['name'], true)) && isset($eventData[$temp['element']]) &&
// !$eventData['properties']['ep_disable_markup_' . $this->instance] &&
!in_array($this->instance, (array)$serendipity['POST']['properties']['disable_markups']) &&
!$eventData['properties']['ep_no_nl2br'] &&
!isset($serendipity['POST']['properties']['ep_no_nl2br'])) {
Ian
Posted: Mon Jun 18, 2007 3:37 pm
by garvinhicking
Hi Timbalu!
Did you maybe check the option to disable nl2br for your posting? This:
Code: Select all
// !$eventData['properties']['ep_disable_markup_' . $this->instance] &&
should only avaluate, when the ep_dislable_markup_ property is sent, which you need to have checked in the advanced options section of the entryproperties plugin when creating an entry.
Regards,
Garvin
Posted: Mon Jun 18, 2007 7:31 pm
by Timbalu
Hi Garvin
Not really, sadly! Its not a matter of creating an entry. It is my old eventvalendar plugin, which suddenly throws this error, without letting me know, why it is nl2br parsed.
So I can just guess that ep_dislable_markup_ property is always set to true, even without writing an entry. Is that the problem?
Regards, Ian
Posted: Tue Jun 19, 2007 9:46 am
by garvinhicking
Hi!
Make a dump of your $eventData['properties'] and see what keys/values are contained in there?
Regards,
Garvin
Posted: Tue Jun 19, 2007 6:51 pm
by Timbalu
Hi Garvin
A dump of your $eventData['properties'] said nothing. I followed debugging and discovered nl2br parsing is on because there is a html_nugget in the sidebar. Now I inserted a hidden input value inside the eventcal form fields and added a nomarkup question in the nl2br plugin; in the moment there is no need to disable line 137 any more. Its just a quick hack. Not real understanding what is going on....
Ian
Posted: Tue Aug 21, 2007 12:43 pm
by jamesmusic
not sure if the answer to this question has been answered on here, but
i installed the phpBB2 external app and intregrated it with Serendipity. Now any articles and comments posted are mirrored in the forum.
everything seems to be working fine, but when someone leaves a comment on the blogs, they are taken to the forum directly and away from the blog. Does anyone know how can i stop this from happening?
Thanks
James
Posted: Tue Aug 21, 2007 12:49 pm
by garvinhicking
Hi James!
But that's the intention of the plugin.
If you don't want people in the forums, you shouldn't take their comments to a forum?
It's like saying "I want a to drink a hot chocolate" and then asking, if they can serve it cold, and without milk, please.
Best regards,
Garvin
Posted: Tue Aug 21, 2007 12:53 pm
by jamesmusic
umm hehe perhaps i worded that the wrong way!
please have a look and try for yourself...
here's an article, try and post a comment and see what happens...
http://www.musflashtv.com/shows/index.p ... l#extended
Posted: Tue Aug 21, 2007 1:30 pm
by garvinhicking
Hi!
Ah, okay, there's an error in the plugin file. Search for "viewtopic.php?t=" inside the serendipty_event_forum.php and replace that with "viewtopic.php?p=" so that you'll get routed to the right entry.
HTH,
Garvin
Posted: Tue Aug 21, 2007 3:03 pm
by jamesmusic
garvin, your a star. thank you thats done the trick.
is there any way to make that page open in a new window?