Customizing SMF > Tips and Tricks

[TIP/TRICK] Get Facebook and others to load a shared url.

<< < (4/5) > >>

petb:
There where much more Users with this Problem,..
http://www.simplemachines.org/community/index.php?topic=474432.msg3316966#msg3316966
http://www.simplemachines.org/community/index.php?topic=471506.msg3295593#msg3295593

My Question was:
Why did smf changed this ?
Because older Versions havent any Problem with the %3B and %3D in the Query String.

nend:

--- Quote from: spcx on April 25, 2012, 02:52:59 PM ---Hey nend, used your trick to solve my linking prob on FB. But a quick question, how can I make my link on FB:

becomes

--- Code: ---http://triggerinc.net/index.php?action=classifieds&sa=view&id=32
--- End code ---

instead of ;

Reason why is that you can try both & and ; on the same URL, but it brings different results on FB. If I use & it displays the link with the pic and body copy of the link which is what I want!

Is there a way to work around this?

--- End quote ---

Maybe with quite a bit of work, what you have is a disagreement here. SMF prefers ; in urls and Facebook hates them and prefers & to separate the arguments. So if you want SMF to support & instead of ; you might want to search the entire code base or edit the output buffer. If your going to miss with the buffer though you might as well just install one of these SEO url mods like PrettyURLs or SimpleSEF.


--- Quote from: petb on May 19, 2012, 10:32:41 AM ---There where much more Users with this Problem,..
http://www.simplemachines.org/community/index.php?topic=474432.msg3316966#msg3316966
http://www.simplemachines.org/community/index.php?topic=471506.msg3295593#msg3295593

My Question was:
Why did smf changed this ?
Because older Versions havent any Problem with the %3B and %3D in the Query String.

--- End quote ---

I think the changes in SMF was due to a anticipated HTML standard that still isn't accepted, I however doubt it will ever be accepted. This standard will say you have to use ; instead of &.

demlak:

--- Quote from: nend on November 28, 2011, 07:43:29 PM ---
--- Code: ---if(strstr($_SERVER["REQUEST_URI"], '%3D')) {
$fix_uri = explode('?' , $_SERVER["REQUEST_URI"]);
$_SERVER["REQUEST_URI"] = $fix_uri[0].'?'; //Might as well rebuild the URI, who knows something might need it.
$fix_uri = str_replace(';', '%3B', $fix_uri[1]);
$fix_uri = explode('%3B', $fix_uri, substr_count($fix_uri, '%3B')+1);
foreach($fix_uri as $value) {
if(strstr($value, '=')) {
$key = explode('=', $value);
$_REQUEST[$key[0]] = $_GET[$key[0]] = $_POST[$key[0]] = $key[1];
$_SERVER["REQUEST_URI"].= $key[0].'='.$key[1].';';
} else if(strstr($value, '%3D')) {
$key = explode('%3D', $value);
$_REQUEST[$key[0]] = $_GET[$key[0]] = $_POST[$key[0]] = $key[1];
$_SERVER["REQUEST_URI"].= $key[0].'='.$key[1].';';
} else {
$_REQUEST[$value] = $_GET[$value] = $_POST[$value] = true;
               $_SERVER["REQUEST_URI"].= $value.';';
}
}
}
--- End code ---

--- End quote ---
i would like to make a mod of this code..
(just change the %3D in first line to %3B)

since im not using FB and also my board is not working for non-logged-in users..  this FB thing is not relevant for us.. but it is relevant for activation links on webmailers like gmx, gmail, web.de, and so on.. webmailers got many problems on those links in activation mails.. but some interpret "=" correct.. but it seems no webmailer interprets the semicolon correct.

if it´s ok for you.. i will submit this as a mod to SMF... since i don´t want to steal code.. i need your permission =) and you will be named in there...

nend:
No problem, don't have any problems with sharing.  ;D

rodelio.lagahit:
and this mod killed my forum :(
any idea how to remove this for my site to be accessible again?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version