Adding Facebook's Like buttons

Creating and modifying plugins.
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

Me again. Just tried the like-button with a URL that does not contain a question mark so it HAS to do with it. What can I do about it? Could there be a smarty tag which removes the question mark from the URL?
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

Okay, I just figured out that the configuration option "URL rewriting" should do the trick. Unfortunately that destroys my css. Anything I can do about it?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by garvinhicking »

Hi!

What's your URL? If it kills your CSS, this would mean that URL rewriting doesn't work on the server?!?

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/
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

The URL is www.schimanke.com. The site is currently hosted at 1&1 and as far as I was able to find out, they support rewriting as the describe some statements in their FAQ. I think that css thing is the only problem that occurs due to the rewriting setting. Is there anything I can do manually to get rewriting to work with my css?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by garvinhicking »

Hi!

What happens when you call "www.schimanke.com/serendipity.css" in your browser? Maybe 1&1 uses "mod_speling" which confuses the real URL?!

Regqards,
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/
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

No matter which setting I use (disable, errorhandling or mod_rewrite) I always get a 404 error. That should be normal since there is no "serendipity.css" but a "serendipity.css.php" in my document root. Does it have something to do with that? When I change "serendipity.css.php" to "serendipity.css" I see the same broken design like I see when I enable mod_rewrite... Btw. I use a customized template (andreas08) for my blog.

I don't really know what 1&1 uses. But looking at their FAQ I can use for example this:

Code: Select all

# Beispiel für Rewrite-Rule:
# (macht aus http://domain.de/xyz.html ein http://domain.de/index.php?xyz
#
RewriteEngine on
RewriteBase  /
RewriteRule  ^([a-z]+)\.html$ /index.php?$1 [R,L]
Can you see something in there?

And at this point a big THANK YOU for your support! :-)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by garvinhicking »

Hi!

"serendipity.css" is a URL rewrite option that should take effect when URL rewriting is enabled. When using mod_rewrite, it should rewrite to "serendipity.css.php" and when using Apache Errorhandling, it should also fall back to that one.

When you enable URL rewriting, does the rest work? like http://schimanke.com/archives/321-blah.html ?

If possible, URL rewriting with mod_rewrite is the best way to go; check your .htaccess file that s9y creates for the rewrite rules in there; they should look like your 1&1 FAQ example.

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/
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

Yes when mod_rewrite is enabled, links like http://www.schimanke.com/archives/1762- ... lekom.html do the same like links like http://www.schimanke.com/index.php?/arc ... lekom.html when rewriting is disabled. The only problem that I have experienced up to now is the problem with my css.

When I compare my .htaccess file from disabled mode to the .htaccess file from mod_rewrite I can see the difference and it looks very much like the 1&1 example.

Anyway, http://www.schimanke.com/serendipity.css results in a 404 error in any of the rewriting modes. Anything I can do about it? Do you want to have a look an my .htacces file? Any other ideas? I am really stuck in here...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by garvinhicking »

Hi!

But your .htaccess file does contain the reference to "serendipity.css", right? We might need to ask 1&1 for a server log or so to indicate if any Apache Module is interfering here and not routing it properly.

With the help of the RewriteRule in the .htaccess file, 1&1 should be able to reproduce the issue!

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/
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

Well, there is something about serendipity.css in there but I don't know if this is what mod_rewrite needs. I have sent the .htaccess file to 1&1 and gave them a link to this thread, so maybe they have an idea. I have sent you also my .htaccess, Garvin. Maybe you see something in there that causes the problem or points us in the right direction?!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by garvinhicking »

Hi!

Try to write this into your .htaccess:

Code: Select all

RewriteEngine On
RewriteBase /
RewriteRule ^serendipity\.css$ index.php?url=/serendipity.css [L,QSA]
RewriteRule ^sheet\.css$ index.php?t1&url=/serendipity.css [L,QSA]
RewriteRule csssheet\.css index.php?t2&url=/serendipity.css [L,QSA]
RewriteRule styler\.htm index.php?t3&url=/serendipity.css [L,QSA]
Those are four rules that we could try if they work:

http://schimanke.com/serendipity.css
http://schimanke.com/sheet.css
http://schimanke.com/csssheet.css
http://schimanke.com/styler.htm

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/
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

Thanks! I have tried your suggestion. The last three links work (still with broken style) after adding the lines to my .htaccess file. Anyway, when trying http://schimanke.com/serendipity.css I still get the 404 error.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by garvinhicking »

Hi!

Okay, that's a good sign! This means basically the rewriting works, but the 1&1 Apacheserver configuration somehow screws with "serendipity.css". Most probably because a file called "serendipity.css.php" exist, and possible because a Apache Webserver module is interfering and not routing properly. Now we definitely need a statement from 1&1 which specific configuration option of theirs is causing this.

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/
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

Okay, 1&1 knows about the problem. I will wait for their feedback and let you know when they got back to me.
schimanke
Regular
Posts: 161
Joined: Mon Jan 07, 2008 4:38 pm
Location: Hameln, Germany
Contact:

Re: Adding Facebook's Like buttons

Post by schimanke »

I just received this answer from 1&1:
Das Apache-Modul "mod_rewrite" ist auf all unseren Servern (ausgenommen Pakete der Windows-Edition) standardmäßig vorhanden und kann wie in folgendem Beispiel verwendet werden:

http://hilfe-center.1und1.de/hosting/600357

Wir bieten Ihnen kompetente Beratung und Hilfe rund um Ihr 1&1 WebHosting-Produkt.
Wenn Sie Fragen zu anderen Anwendungen haben, wenden Sie sich bitte direkt an den jeweiligen Hersteller. Für Ihre selbstgeschriebenen Skripte empfehlen wir Ihnen folgendes PHP-Forum:
http://www.php4-forum.de/
Anything we can make of it? Since I am just using a Webhosting- and not a Server-Bundle at 1&1 I guess it is based on Linux.
Post Reply