When I insert links into a post via the web interface "www" button, the external link target specified in the .ini is ignored in preview and guestbook. Is this a bug (ugly word, I know *g*) or have I misunderstood something here??
Btw: Very, very nice work, I like flatPHPbook! =)
Tzeentch
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hm, just tested this, for me it works well on my own website. What did you enter? The name of a frame in yur frameset or _top or _blank? This is what I tested, and the worked. Could you provide me with a link?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Umh, should've mentioned that i figured it out myself in meantime, sry. :]
It does? Well, the problem was in function recreateUserInput($input) u reference $configFromINI['Behaviour']['externalLinksTargetCode'] - this value key pair isn't in the .ini that comes with the package, there's only 'externalLinksTarget'.
Still, when you simply added it to the .ini or changed the reference, it didn't work correctly either, because with e.g.:
$input = preg_replace("/(\[url\])(.+?)(\[\/url\])/i", "<a href=\"http://\\2\"".$configFromINI['Behaviour']['externalLinksTarget'].">\\2</a>", $input);
u would get something like
<a href="http://www.bla.com"_blank>
So I inserted a string like:
$externalLinkTarget = " target='".$configFromINI['Behaviour']['externalLinksTarget']."'";
instead of the .ini value.
Maybe I've really misunderstood something here, but that fixed it for me, nonetheless! =)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can see your point, what you mention is excatly the problem with the code I have lying around here on this machines HD. But it works perfectly on my test guestbook where I tried it out. Maybe I accidently broke it. Gonna check that out later when I have access to the other site via FTP (don't know the password by heart).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there!
When I insert links into a post via the web interface "www" button, the external link target specified in the .ini is ignored in preview and guestbook. Is this a bug (ugly word, I know *g*) or have I misunderstood something here??
Btw: Very, very nice work, I like flatPHPbook! =)
Tzeentch
Hm, just tested this, for me it works well on my own website. What did you enter? The name of a frame in yur frameset or _top or _blank? This is what I tested, and the worked. Could you provide me with a link?
Umh, should've mentioned that i figured it out myself in meantime, sry. :]
It does? Well, the problem was in function recreateUserInput($input) u reference $configFromINI['Behaviour']['externalLinksTargetCode'] - this value key pair isn't in the .ini that comes with the package, there's only 'externalLinksTarget'.
Still, when you simply added it to the .ini or changed the reference, it didn't work correctly either, because with e.g.:
$input = preg_replace("/(\[url\])(.+?)(\[\/url\])/i", "<a href=\"http://\\2\"".$configFromINI['Behaviour']['externalLinksTarget'].">\\2</a>", $input);
u would get something like
<a href="http://www.bla.com"_blank>
So I inserted a string like:
$externalLinkTarget = " target='".$configFromINI['Behaviour']['externalLinksTarget']."'";
instead of the .ini value.
Maybe I've really misunderstood something here, but that fixed it for me, nonetheless! =)
I can see your point, what you mention is excatly the problem with the code I have lying around here on this machines HD. But it works perfectly on my test guestbook where I tried it out. Maybe I accidently broke it. Gonna check that out later when I have access to the other site via FTP (don't know the password by heart).