Hi,
we are integrating Serendipity with some other application.
So there is a need that we have to call serendipity_admin.php directly. So we are redirecting index.php to serendipity_admin.php.
But when we redirect it , it is not showing GUI (stylesheet). But all the links and login page is displayed without gui.
sometimes we got the fatal error also.. mentioned below.
Fatal error: Call to undefined function: serendipity_rewriteurl() in
/serendipity_admin.php on line 28
i.e. on this line.
$css_file = serendipity_rewriteURL('serendipity_admin.css');
Can we redirect the index.php to serendipity_admin.php? or will it create any problem?
We are not interested in "View Blogs" link.
Please provide any suggestion...
Thanks,
Manoj
rewrite url issue- fatal error
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: rewrite url issue- fatal error
Hi!
How are you doing the redirect exactly?
Serendipity relies on the 'serendipity_admin.php' URL in some cases, but if you seamlessly redirect to a file IN THE SAME DIRECTORY that should not be a problem.
Best regards,
Garvin
How are you doing the redirect exactly?
Serendipity relies on the 'serendipity_admin.php' URL in some cases, but if you seamlessly redirect to a file IN THE SAME DIRECTORY that should not be a problem.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi,
What exactly is serendipity_rewriteurl function in function_permalinks.inc.php file doing.
It is being called from serendipity_admin.php file for generating the href value in <link rel="stylesheet" type="text/css" href="">.
This is changing the look and feel when the value is href="http://localhost/serendipity-1.0.1/sere ... _admin.css".
But when the value is href="serendipity.css.php?serendipity[css_mode]=serendipity_admin.css" the exact look and feel of serendipity is displayed.
Any solution for this problem?
Thanks,
Manoj
What exactly is serendipity_rewriteurl function in function_permalinks.inc.php file doing.
It is being called from serendipity_admin.php file for generating the href value in <link rel="stylesheet" type="text/css" href="">.
This is changing the look and feel when the value is href="http://localhost/serendipity-1.0.1/sere ... _admin.css".
But when the value is href="serendipity.css.php?serendipity[css_mode]=serendipity_admin.css" the exact look and feel of serendipity is displayed.
Any solution for this problem?
Thanks,
Manoj
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
That functions creates an URL to entries, categories and authors corresponding to the input parameters. Check the file for the PHPdoc function description.
Sadly I don't know what exactly you are doing, but since you are customizing serendipity in a way that is not meant to be, you must know what you'Re doing yourself. *g* So just check the function in the PHP file and you should see what it outputs etc.
HTH,
Garvin
That functions creates an URL to entries, categories and authors corresponding to the input parameters. Check the file for the PHPdoc function description.
Sadly I don't know what exactly you are doing, but since you are customizing serendipity in a way that is not meant to be, you must know what you'Re doing yourself. *g* So just check the function in the PHP file and you should see what it outputs etc.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Hi,
We placed the the serendipity code is placed in "admin/serendipity" folder.
So when we try to access serendipity_admin.php the url looks like
http://IP/admin/serendipity/serendipity_admin.php.
Because of placing the code in admin folder the following if block in index.php is called.
How exactly is the style sheet included in serendipity_admin.php?
Thanks.
manoj
We placed the the serendipity code is placed in "admin/serendipity" folder.
So when we try to access serendipity_admin.php the url looks like
http://IP/admin/serendipity/serendipity_admin.php.
Because of placing the code in admin folder the following if block in index.php is called.
and is getting redirected to serendipity_admin.php file. In serendipity_admin.php file the href value for embedding style sheet iselse if (preg_match(PAT_ADMIN, $uri)) {
$serendipity['view'] = 'admin';
$base = $serendipity['baseURL'];
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
$base = str_replace('http://', 'https://', $base);
}
header("Location: {$base}serendipity_admin.php");
exit;
}
Will the value for href have any effect on including the look and feel...<link rel="stylesheet" type="text/css" href="http://dev-lawyers4.reedref.com/lawyers ... dipity.css" />
How exactly is the style sheet included in serendipity_admin.php?
Thanks.
manoj
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Phew. I don't know if what you do will ever work, so good luck with that.
Regarding the stylesheet: It's no problem to make it use the absolute URL like you have shown. The CSS is fetched via index.php, where a switch/case is performed on the CSS location URL. Then the blog's stylesheet file is loaded and returned.
Best regards,
Garvin
Phew. I don't know if what you do will ever work, so good luck with that.
Regarding the stylesheet: It's no problem to make it use the absolute URL like you have shown. The CSS is fetched via index.php, where a switch/case is performed on the CSS location URL. Then the blog's stylesheet file is loaded and returned.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
As I wrote, the switch/case is in index.php *g*
Just search for 'css'.
Best regards,
Garvin
As I wrote, the switch/case is in index.php *g*
Just search for 'css'.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/