pastvu icon indicating copy to clipboard operation
pastvu copied to clipboard

Backlinks tracking / Отслеживание обратных ссылок

Open paul-k-pastvu opened this issue 5 years ago • 6 comments

EN: We need internal tracking of backlinks - so that on each photo it would be indicated where else it was mentioned. Like in Github, for example.

RU: Нужен внутренний трекинг обратных ссылок (backlinks) — чтобы на каждой фотографии было бы указаны где еще она упоминалась. Как в Гитхабе, к примеру.

paul-k-pastvu avatar Mar 08 '20 23:03 paul-k-pastvu

Stale issue message

github-actions[bot] avatar Nov 13 '20 01:11 github-actions[bot]

This would be better to do together with https://github.com/PastVu/pastvu/issues/239#issuecomment-1218488456 . When link to another photo is added the the comment (news or photo), event for each destination photo mentioned in the comment is triggered. This event can be used:

  • For notifying interested parties e.g. photo author and any subscribers, see #239
  • For storing relation between photo and comment IDs (through some event listener and processing function).

The data from relation map can be used to output information on the photo page (mockups will be required at the later stages of implementation).

Suggested logic:

  • when comment is created:
    • check if comment contains links to photos, trigger event for each link.
  • when comment is edited:
    • check if comment contains links to photos, check existing relations that belong to the same comment -> for missing relations trigger event for each new link, for existing relations do nothing, delete relations that no longer in the list of comment links.
  • when comment is deleted:
    • check if comment contains links to photos, delete existing relations that belong to the same comment.
  • when destination photo (the one mentioned in comment) is deactivated/reactivated:
    • toggle destActive flag at relation record, this can be used to render photo link in comment formatted in some way (strikethrough for instance) when photo is not available (this is optional feature)

kabalin avatar Oct 05 '22 12:10 kabalin

(news or photo),

... or user profile

paul-k-pastvu avatar Oct 05 '22 15:10 paul-k-pastvu

when comment is deleted:

  • check if comment contains links to photos, delete existing relations that belong to the same comment.

Our comments is not deleted really, but marked as "deleted". This is important.

Therefore, relations for deleted comments also should not be deleted, but marked as "deprecated/inactive". If comment was restored, these relations also may be activated.

paul-k-pastvu avatar Oct 05 '22 15:10 paul-k-pastvu

This logic also should be applicable not for comments only, but also for image descriptions.

paul-k-pastvu avatar Oct 05 '22 15:10 paul-k-pastvu

OK, so the relation record (and event) in this case will also contain entity type (comment, user or photo). Similar logic will apply on them too (e.g. when photo is deactivated, active flag in relevant relations records will be updated).

kabalin avatar Oct 06 '22 07:10 kabalin