Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.

Meta (Facebook sharing) for albums #179

Open
roblandry opened this issue Jan 31, 2019 · 0 comments
Open

Meta (Facebook sharing) for albums #179

roblandry opened this issue Jan 31, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@roblandry
Copy link

roblandry commented Jan 31, 2019

As discussed on Gitter I would like to incorporate the meta data for albums, specifically i would like the info to show up for facebook shares, but when fb works, they all should.

As i understand, the meta for photos work, due to a view.php. However, albums use pure js.

I have made a workaround in getGraphHeader.php that works great, but getting the album to display via query string, is going to require some js tweaks.

function getGraphHeader($theID,$getType) {

	// allow album data
	if ($getType == 'album'){
		$query  = Database::prepare(Database::get(), "SELECT id FROM ? WHERE album = '?' LIMIT 1", array(LYCHEE_TABLE_PHOTOS, $theID));
		$result = Database::execute(Database::get(), $query, __METHOD__, __LINE__);
		if ($result===false) return false;
		$row = $result->fetch_object();
		$photoID = $row->id;
	} else {
		$photoID = $theID;
	}

	$photo = new Photo($photoID);
        // continue code

Additionally, using a query string and js clutters the address bar when navigating.

@ildyria ildyria added the enhancement New feature or request label Jan 31, 2019
@ildyria ildyria changed the title Meta for albums Meta (Facebook sharing) for albums Feb 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants