Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

magic quote issue

Asked Modified Viewed 1,965 times
S
subodh
S
subodh 10
I am learner keen to learn more.
---------------------------------------------------------

Gamers Worlds : The Worlds Of Gamers
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions
asked
Junior Member

I have seen there are many people facing problem with magic quotes on. The '/' inserted in custom pages, articles and news. I was also facing same problem. Now I have found a function to eliminate the problem.
1. Insert this function at the bottom of maincore.php
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]function no_magic_quotes($query) {
$data = explode("\\",$query);
$cleaned = implode("",$data);
return $cleaned;
}[/syntaxhighlighter]

Source :http://php.net/manual/en/function.stripslashes.php

2. Now open /themes/yourthemename/theme.php
Find
function render_news($subject, $news, $info) {

After the line insert:
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]$news=no_magic_quotes($news);[/syntaxhighlighter]

Find
function render_article($subject, $article, $info) {

After it add:
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]$article = no_magic_quotes($article);[/syntaxhighlighter]

This has solved my problem.
0 replies
There are no post found.

Category Forum

Installation Issues - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 0 posts
  • Votes 0 votes
  • Topic users 1 member

1 participant

S
S
subodh 10
I am learner keen to learn more.
---------------------------------------------------------

Gamers Worlds : The Worlds Of Gamers
  • Junior Member, joined since
  • Contributed 46 posts on the community forums.
  • Started 25 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet