RSS iconTwitter iconFacebook icon

The Trek BBS title image

The Trek BBS statistics

Threads: 140,052
Posts: 5,431,213
Members: 24,926
Currently online: 625
Newest member: In_Correct

TrekToday headlines

Retro Review: Chrysalis
By: Michelle on Oct 18

The Next Generation Season Seven Blu-ray Details
By: T'Bonz on Oct 17

CBS Launches Streaming Service
By: T'Bonz on Oct 17

Yelchin In New Indie Thriller
By: T'Bonz on Oct 17

Saldana In The Book of Life
By: T'Bonz on Oct 17

Cracked’s New Sci-Fi Satire
By: T'Bonz on Oct 16

Beltran Introduces Shakespeare To Theater Group
By: T'Bonz on Oct 16

Burton To Be Honored at Facets Boo! Bash
By: T'Bonz on Oct 16

New Trek Puzzles
By: T'Bonz on Oct 15

Star Trek Online: Delta Rising
By: T'Bonz on Oct 15


Welcome! The Trek BBS is the number one place to chat about Star Trek with like-minded fans. Please login to see our full range of forums as well as the ability to send and receive private messages, track your favourite topics and of course join in the discussions.

If you are a new visitor, join us for free. If you are an existing member please login below. Note: for members who joined under our old messageboard system, please login with your display name not your login name.


Go Back   The Trek BBS > Entertainment & Interests > Web Sites/Design

Web Sites/Design Talk about your websites here!

Reply
 
Thread Tools
Old May 1 2010, 12:29 AM   #1
subatoi
Lieutenant
 
Facebook's sharer on php?

I have a Trek-php site. I want to add the FB sharer:
http://www.facebook.com/facebook-widgets/share.php

but I get an HTML-tags error message. Can this be solved? I want to try this thing on my site.

Thanks!
subatoi is offline   Reply With Quote
Old May 1 2010, 01:31 AM   #2
THE Robert Maxwell
Reports of my death...
 
THE Robert Maxwell's Avatar
 
Location: Robert Maxwell
View THE Robert Maxwell's Twitter Profile Send a message via ICQ to THE Robert Maxwell Send a message via AIM to THE Robert Maxwell Send a message via Windows Live Messenger to THE Robert Maxwell Send a message via Yahoo to THE Robert Maxwell
Re: Facebook's sharer on php?

What's the error message? Those are produced for a reason!
__________________
Publishing all the news that's not fit to print, FROM BEYOND THE GRAVE!!!!
I has a blag.
THE Robert Maxwell is offline   Reply With Quote
Old May 1 2010, 12:12 PM   #3
subatoi
Lieutenant
 
Re: Facebook's sharer on php?

It simply says:
"The html tags you attempted to use are not allowed"

That's all.
subatoi is offline   Reply With Quote
Old May 1 2010, 05:03 PM   #4
THE Robert Maxwell
Reports of my death...
 
THE Robert Maxwell's Avatar
 
Location: Robert Maxwell
View THE Robert Maxwell's Twitter Profile Send a message via ICQ to THE Robert Maxwell Send a message via AIM to THE Robert Maxwell Send a message via Windows Live Messenger to THE Robert Maxwell Send a message via Yahoo to THE Robert Maxwell
Re: Facebook's sharer on php?

That's going to be an issue with the site you're trying to deploy it on. Where are you trying to use this Facebook Share button?
__________________
Publishing all the news that's not fit to print, FROM BEYOND THE GRAVE!!!!
I has a blag.
THE Robert Maxwell is offline   Reply With Quote
Old May 1 2010, 06:23 PM   #5
subatoi
Lieutenant
 
Re: Facebook's sharer on php?

Next to a text I upload.
I don't understand much in PHP, so keep it simple
subatoi is offline   Reply With Quote
Old May 1 2010, 09:15 PM   #6
THE Robert Maxwell
Reports of my death...
 
THE Robert Maxwell's Avatar
 
Location: Robert Maxwell
View THE Robert Maxwell's Twitter Profile Send a message via ICQ to THE Robert Maxwell Send a message via AIM to THE Robert Maxwell Send a message via Windows Live Messenger to THE Robert Maxwell Send a message via Yahoo to THE Robert Maxwell
Re: Facebook's sharer on php?

Do you have a link or something? There are not many tags in this:

Code:
<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
I suspect it's the "script" tag that is forbidden. Whatever PHP software you are using is filtering out certain HTML tags. That's why I'm asking what you're deploying this on. There may or may not be an easy way to get the "script" tag allowed, but I cannot determine that without knowing what PHP program you're using.
__________________
Publishing all the news that's not fit to print, FROM BEYOND THE GRAVE!!!!
I has a blag.
THE Robert Maxwell is offline   Reply With Quote
Old May 2 2010, 01:20 PM   #7
subatoi
Lieutenant
 
Re: Facebook's sharer on php?

Oh, now I understand what you mean. That's the site:
www.Starbase972.com
subatoi is offline   Reply With Quote
Old May 2 2010, 02:00 PM   #8
THE Robert Maxwell
Reports of my death...
 
THE Robert Maxwell's Avatar
 
Location: Robert Maxwell
View THE Robert Maxwell's Twitter Profile Send a message via ICQ to THE Robert Maxwell Send a message via AIM to THE Robert Maxwell Send a message via Windows Live Messenger to THE Robert Maxwell Send a message via Yahoo to THE Robert Maxwell
Re: Facebook's sharer on php?

Bingo! You're using PHP-Nuke.

Open your config.php file and look for "$AllowableHTML". You should see something like this:

Code:
$AllowableHTML = array("b"=>1,
         "i"=>1,
         "a"=>2,
         "em"=>1,
         "br"=>1,
         "strong"=>1,
         "blockquote"=>1,
         "tt"=>1,
         "li"=>1,
         "ol"=>1,
         "H1"=>1,
         "H2"=>1,
         "H3"=>1,
         "H4"=>1,
         "center"=>1,
         "img"=>2,
         "alt"=>1,
         "table"=>2,
         "tr"=>2,
         "td"=>2,
         "p"=>2,
         "div"=>2,
         "font"=>2,
         "p"=>1,
         "p"=>1,
         "ul"=>1);
In the middle of that block, add this line:

Code:
         "script"=>2,
Save your config.php file and try to add the Facebook Share button again.

Let me know if that works for you!
__________________
Publishing all the news that's not fit to print, FROM BEYOND THE GRAVE!!!!
I has a blag.
THE Robert Maxwell is offline   Reply With Quote
Old May 3 2010, 06:40 PM   #9
subatoi
Lieutenant
 
Re: Facebook's sharer on php?

OK... now all I need to know is where to find that config.php file. Supposed to be on the site files somewhere?
(I got this site, I didn't build it myself... )
subatoi is offline   Reply With Quote
Old May 3 2010, 07:27 PM   #10
THE Robert Maxwell
Reports of my death...
 
THE Robert Maxwell's Avatar
 
Location: Robert Maxwell
View THE Robert Maxwell's Twitter Profile Send a message via ICQ to THE Robert Maxwell Send a message via AIM to THE Robert Maxwell Send a message via Windows Live Messenger to THE Robert Maxwell Send a message via Yahoo to THE Robert Maxwell
Re: Facebook's sharer on php?

Yeah, just do a scan down your files for "config.php". There should be only one! If in doubt, use the one with the most recent timestamp on it.
__________________
Publishing all the news that's not fit to print, FROM BEYOND THE GRAVE!!!!
I has a blag.
THE Robert Maxwell is offline   Reply With Quote
Old May 4 2010, 12:42 AM   #11
subatoi
Lieutenant
 
Re: Facebook's sharer on php?

In the latest of about 10-15 files, I've added that somwhere in the middle, and it still gives me the same message
Unless it changes where exactly I add it...?
subatoi is offline   Reply With Quote
Old May 4 2010, 03:52 AM   #12
THE Robert Maxwell
Reports of my death...
 
THE Robert Maxwell's Avatar
 
Location: Robert Maxwell
View THE Robert Maxwell's Twitter Profile Send a message via ICQ to THE Robert Maxwell Send a message via AIM to THE Robert Maxwell Send a message via Windows Live Messenger to THE Robert Maxwell Send a message via Yahoo to THE Robert Maxwell
Re: Facebook's sharer on php?

No, it doesn't matter where in the array you add it. Very odd.

Could you possibly take a screenshot of the error you're getting and post it here, or PM it to me? I will see what else I can dig up. You should also go through your PHP-Nuke configuration and see if you are restricting HTML tags anywhere, because that's the source of your problem. You need to allow the "script" tag.
__________________
Publishing all the news that's not fit to print, FROM BEYOND THE GRAVE!!!!
I has a blag.
THE Robert Maxwell is offline   Reply With Quote
Old May 4 2010, 08:37 AM   #13
subatoi
Lieutenant
 
Re: Facebook's sharer on php?

Robert Maxwell wrote: View Post
You should also go through your PHP-Nuke configuration and see if you are restricting HTML tags anywhere, because that's the source of your problem. You need to allow the "script" tag.
If I only knew where to start...
Maybe I'll try one of the other "config.php" files.


A screenshot:
http://forums.ort.org.il/files/213/2567819/7932889.JPG
subatoi is offline   Reply With Quote
Old May 4 2010, 12:37 PM   #14
THE Robert Maxwell
Reports of my death...
 
THE Robert Maxwell's Avatar
 
Location: Robert Maxwell
View THE Robert Maxwell's Twitter Profile Send a message via ICQ to THE Robert Maxwell Send a message via AIM to THE Robert Maxwell Send a message via Windows Live Messenger to THE Robert Maxwell Send a message via Yahoo to THE Robert Maxwell
Re: Facebook's sharer on php?

Something else to make sure of: check the AllowableHTML array in your config.php, and make sure it has this:

Code:
"a"=>2,
The "2" is important, because that's what lets you have attributes on the link tag.

Also, in mainfile.php, look for this block of code:

Code:
foreach ($_GET as $secvalue) { 
    if ((eregi("<[^>]*script*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*object*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*style*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*form*\"?[^>]*>", $secvalue)) || 
        (eregi("\([^>]*\"?[^)]*\)", $secvalue)) || 
        (eregi("\"", $secvalue))) { 
   die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>Go Back</b></a> ]"); 
    } 
} 

foreach ($_POST as $secvalue) { 
    if ((eregi("<[^>]script*\"?[^>]*>", $secvalue)) ||  (eregi("<[^>]style*\"?[^>]*>", $secvalue))) { 
        die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>Go Back</b></a> ]"); 
    } 
}
Replace it with this:

Code:
foreach ($_GET as $secvalue) { 
    if ((eregi("<[^>]*object*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*iframe*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*applet*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*meta*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*style*\"?[^>]*>", $secvalue)) || 
        (eregi("<[^>]*form*\"?[^>]*>", $secvalue)) || 
        (eregi("\([^>]*\"?[^)]*\)", $secvalue)) || 
        (eregi("\"", $secvalue))) { 
   die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>Go Back</b></a> ]"); 
    } 
} 

foreach ($_POST as $secvalue) { 
    if ((eregi("<[^>]script*\"?[^>]*>", $secvalue)) ||  (eregi("<[^>]style*\"?[^>]*>", $secvalue))) { 
        die ("<center><img src=images/logo.gif><br><br><b>The html tags you attempted to use are not allowed</b><br><br>[ <a href=\"javascript:history.go(-1)\"><b>Go Back</b></a> ]"); 
    } 
}
(I just removed the security check for "script" tags.)
__________________
Publishing all the news that's not fit to print, FROM BEYOND THE GRAVE!!!!
I has a blag.
THE Robert Maxwell is offline   Reply With Quote
Old May 7 2010, 12:59 AM   #15
subatoi
Lieutenant
 
Re: Facebook's sharer on php?

Checked the two things. Nope.

Is there a point checking another config.php? There are some that are not on the main directory.
subatoi is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
FireFox 2+ or Internet Explorer 7+ highly recommended.