Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 12:15 am EST
Geeklog Forums
static pages, version & quotes
tokyoahead
Anonymous
Hi,
I installed static pages 1.3.2 and I want to use some PHP code. I inserted the ?> tags and some code inbetween with ' ' and " " quotes. I tried to set the setting to PHP and PHP/HTML, but the quotes used are always backslashed.
Also, the plugins-listing does only show the version 1.3, not the subversion .2 - cant that be changed? Even manually?
thanks
I installed static pages 1.3.2 and I want to use some PHP code. I inserted the ?> tags and some code inbetween with ' ' and " " quotes. I tried to set the setting to PHP and PHP/HTML, but the quotes used are always backslashed.
Also, the plugins-listing does only show the version 1.3, not the subversion .2 - cant that be changed? Even manually?
thanks
13
11
Quote
Status: offline
exaurdon
Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
Hello,
Sorry to hear you're having difficulties.
Also, the plugins-listing does only show the version 1.3, not the subversion .2 - cant that be changed? Even manually?
Yes, you can change the version number in the plugins/staticpages/config.php file.
On the issue of quotes. I have been using this plugin myself extensively for quite some time, and I have not been able to reproduce the behavior you describe, however, I have heard from at least one other person who has had that problem.
Try the following:
In your public_html/staticpages/index.php, change line 93 to be as follows.
I have several geeklog installs, and on all of my installs, this results in too many slashes being stripped away, but if you are having the problem of slashes being added, this should fix it.
If anyone else has had this problem, please let me know, particularly, if you can track down why it is happening.
Thanks,
Exaurdon~
Sorry to hear you're having difficulties.
Also, the plugins-listing does only show the version 1.3, not the subversion .2 - cant that be changed? Even manually?
Yes, you can change the version number in the plugins/staticpages/config.php file.
On the issue of quotes. I have been using this plugin myself extensively for quite some time, and I have not been able to reproduce the behavior you describe, however, I have heard from at least one other person who has had that problem.
Try the following:
In your public_html/staticpages/index.php, change line 93 to be as follows.
Text Formatted Code
$retval.=eval_php_and_html(stripslashes($A['sp_content']));I have several geeklog installs, and on all of my installs, this results in too many slashes being stripped away, but if you are having the problem of slashes being added, this should fix it.
If anyone else has had this problem, please let me know, particularly, if you can track down why it is happening.
Thanks,
Exaurdon~
12
12
Quote
tokyoahead
Anonymous
Well actually I am not so sure about the slashes as an error anymore. The problem seems to be ( I did not have the time yet to test this throughout ) that the text of HTML/PHP, once saved will be slashed. If you then edit the text again, it will be double-slashed, which is the actual problem.
so one would have to go and remove all the slashes again before saving again. It might be the best to remove all the slashes before displaying the text in the editor. Wouldnt it be better to work with urldecode/encode?
thanks for the support and the acutally great plugin :-)
so one would have to go and remove all the slashes again before saving again. It might be the best to remove all the slashes before displaying the text in the editor. Wouldnt it be better to work with urldecode/encode?
thanks for the support and the acutally great plugin :-)
15
8
Quote
Status: offline
exaurdon
Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
so one would have to go and remove all the slashes again before saving again. It might be the best to remove all the slashes before displaying the text in the editor.
Ok, I'm sorry, You are correct, I told you to edit hte wrong file. If you look at pulbic_html/admin/plugins/staticpages/index.php on line 301, you will see that I commented out the strip slashes command there, and replaced it with teh line immediately above. The reason for this, was that I was experiencing the opposite problem. If you reverse the commenting, it should work for you.
Out of curiosity, what version of PHP are you using? I'm wondering if the htmlspecialchars or stripslashes functions have changed recently.
Thanks,
Exaurdon~
10
13
Quote
tokyoahead
Anonymous
I will try it. I am using PHP Version 4.3.2
13
13
Quote
Status: offline
xspace
Forum User
Regular Poster
Registered: 03/04/03
Posts: 100
I was facing wat Tokyo was having. Solved with the b/m recommendation
Die young, stay Pretty
Quote by exaurdon:
so one would have to go and remove all the slashes again before saving again. It might be the best to remove all the slashes before displaying the text in the editor.
Ok, I'm sorry, You are correct, I told you to edit hte wrong file. If you look at pulbic_html/admin/plugins/staticpages/index.php on line 301, you will see that I commented out the strip slashes command there, and replaced it with teh line immediately above. The reason for this, was that I was experiencing the opposite problem. If you reverse the commenting, it should work for you.
Out of curiosity, what version of PHP are you using? I'm wondering if the htmlspecialchars or stripslashes functions have changed recently.
Thanks,
Exaurdon~
so one would have to go and remove all the slashes again before saving again. It might be the best to remove all the slashes before displaying the text in the editor.
Ok, I'm sorry, You are correct, I told you to edit hte wrong file. If you look at pulbic_html/admin/plugins/staticpages/index.php on line 301, you will see that I commented out the strip slashes command there, and replaced it with teh line immediately above. The reason for this, was that I was experiencing the opposite problem. If you reverse the commenting, it should work for you.
Out of curiosity, what version of PHP are you using? I'm wondering if the htmlspecialchars or stripslashes functions have changed recently.
Thanks,
Exaurdon~
Die young, stay Pretty
12
11
Quote
tokyoahead
Anonymous
Quote by exaurdon:
Ok, I'm sorry, You are correct, I told you to edit hte wrong file. If you look at pulbic_html/admin/plugins/staticpages/index.php on line 301, you will see that I commented out the strip slashes command there, and replaced it with teh line immediately above.
Well actually when I did this, it did NOT work. It prevented me from seeing the actual page in the end. When saving, it was saved without the slashes, and when calling it, the slashes would be there.
So I figured out my own way. I realized that the creation of the slashes during saving were good, but for editing it and for displaying it, the slashes had to disappear.
Therefure, I editet the following lines:
Line 93 in the public_html/staticpages/index.php:
$retval.=eval_php_and_html(stripslashes($A['sp_content']));
(as you said first)
and also adding after line 339
$A['sp_content'] = stripslashes ($A['sp_content']);
in admin/plugins/staticpages/index.php
Now, for saving the slashes are added, for editing removed, and for displaying also removed.
I am not sure if this will help 100%. But it seems right so far... any comments?
Ok, I'm sorry, You are correct, I told you to edit hte wrong file. If you look at pulbic_html/admin/plugins/staticpages/index.php on line 301, you will see that I commented out the strip slashes command there, and replaced it with teh line immediately above.
Well actually when I did this, it did NOT work. It prevented me from seeing the actual page in the end. When saving, it was saved without the slashes, and when calling it, the slashes would be there.
So I figured out my own way. I realized that the creation of the slashes during saving were good, but for editing it and for displaying it, the slashes had to disappear.
Therefure, I editet the following lines:
Line 93 in the public_html/staticpages/index.php:
$retval.=eval_php_and_html(stripslashes($A['sp_content']));
(as you said first)
and also adding after line 339
$A['sp_content'] = stripslashes ($A['sp_content']);
in admin/plugins/staticpages/index.php
Now, for saving the slashes are added, for editing removed, and for displaying also removed.
I am not sure if this will help 100%. But it seems right so far... any comments?
12
14
Quote
Status: offline
exaurdon
Forum User
Regular Poster
Registered: 08/13/03
Posts: 107
Hey,
Thanks for looking into that. As I mentioned, I hadn't had problems with that, but as some people had, I'm sure this information will be of some use. I will also try incorporating your code into the next release I make on the staticpages plugin.
Thanks again,
Exaurdon~
Thanks for looking into that. As I mentioned, I hadn't had problems with that, but as some people had, I'm sure this information will be of some use. I will also try incorporating your code into the next release I make on the staticpages plugin.
Thanks again,
Exaurdon~
10
12
Quote
All times are EST. The time is now 12:15 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content