OK, so I'm trying to do this properly. Editing the URL so that it
displays '
quake.sergius.earlham.edu/markp/wp-admin' does force the
procedure to complete properly. But I'd like to edit the code so that
the URL works in a Multisite configuration. However, I was not sure
whether to use $_SERVER['REQUEST_URI'] or $_SERVER['SCRIPT_NAME'] to
extract the username and so I added the lines to install.php that are
commented out with # below:
function get_gdata_token() {
$site = $_SERVER['SERVER_NAME'];
$port = ($_SERVER['SERVER_PORT'] != 80) ? ':' .
$_SERVER['SERVER_PORT'] : '';
$self = $_SERVER['PHP_SELF'];
# $request-uri = $_SERVER['REQUEST_URI'];
# $script-name = $_SERVER['SCRIPT_NAME'];
$loc = urlencode("http://" . $site . $port . $self . "?
page=pwaplusphp&loc=return");
$next = "
https://www.google.com/accounts/AuthSubRequest?
scope=http%3A%2F%
2Fpicasaweb.google.com%2Fdata
%2F&session=1&secure=0&next=$loc";
echo "<h2>Install Step 1: Token Generation</h2>";
echo "<p>Generating this Google \"GData\" token is a one-time
step that allows PWA+PHP to access to your private (unlisted) Picasa
albums. Click the link below to continue if you wish to set up
PicasaWeb tokens for site: <strong>$site</strong></p>";
# echo "<p>REQUEST_URI string : '$request-uri'</p>";
# echo "<p>SCRIPT_NAME string : '$script-name'</p>";
echo "<p>If this is correct, <a href='$next'>";
echo "Login to your Google Account</a></p>";
echo "</body>\n</html>";
}
Unfortunately this caused nothing to be displayed and such is my
ignorance of php I could not figure out what was going wrong.
I think I'm on the right track but I'm flummoxed as how to proceed
from here. Currently the plugin cannot generally be used in a multi-
site configuration without a fix for this.
Cheers
Mark
On Jun 3, 8:51 am,
carlo.savore...@gmail.com wrote:
> Hi, I try to use PWA+PHP in a multi site wordpress installation and it does
> not work.
>
> I discover the problem is in the link created to generate to google token.
>
> In the Settings section -> PWA+PHP -> token generation
> If I am in a specific site inside my wordpress installation the link used to
> connect to google is something similar to
>
>
https://www.google.com/accounts/AuthSubRequest?scope=http%3A%2F%2Fpic...
> *
www.MYSITE.it*%2F*wp-admin*
> %2Foptions-general.php%3Fpage%3Dpwaplusphp%26loc%3Dreturn
>
> This link generates the token but the return page is the main site of the
> wordpress installation and not in the specific site admin panel
>
> To work in a multisite installation it should be:
https://www.google.com/accounts/AuthSubRequest?scope=http%3A%2F%2Fpic...
> *
www.MYSITE.it*%2F*SUBSITE*
> %2Fwp-admin%2Foptions-general.php%3Fpage%3Dpwaplusphp%26loc%3Dreturn