add link to fedi posts
This commit is contained in:
parent
b384627451
commit
121fd184b5
2 changed files with 4 additions and 2 deletions
|
@ -20,11 +20,12 @@ $contentR = $arr["responsetext"];
|
|||
|
||||
if ($arr["iscwed"] == "t") {
|
||||
$contentCW = $arr["cw"];
|
||||
$url = "{$pageProto}://" . $_SERVER["HTTP_HOST"] . str_replace("/admin/fedi.php", "/fetch.php?id={$id}", $_SERVER["REQUEST_URI"]);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS,
|
||||
http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated); cw: {$contentCW}")));
|
||||
http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}\n\nlink: {$url}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated); cw: {$contentCW}")));
|
||||
} else {
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS,
|
||||
http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated)")));
|
||||
http_build_query(array('status' => "question: {$contentO}\n\nresponse: {$contentR}\n\nlink: {$url}", 'visibility' => "{$fediVisibility}", 'spoiler_text' => "anonymous question response (automated)")));
|
||||
}
|
||||
|
||||
curl_exec($ch);
|
||||
|
|
|
@ -10,6 +10,7 @@ $adminPassword = "setAPasswordHere!123";
|
|||
$pageTitle = "the cool qna";
|
||||
|
||||
$pageDomainEnabled = True;
|
||||
$pageProto = "https";
|
||||
$pageDomain = "example.com";
|
||||
$pageDomainOther = $pageDomain; // you can comment out and change this to a subdomain you want to "go back to". eg your site is me.example.org but you want it to say example.org
|
||||
//$pageDomainOther = "me.example.com";
|
||||
|
|
Loading…
Reference in a new issue