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

Meta (Facebook sharing) for albums #179

@roblandry

Description

@roblandry

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions