Merge pull request #61 from Quix0r/cleanups/use-app-class
Cleanups of "use" and "new" statements
|5 months ago|
|assets||1 year ago|
|bin||5 months ago|
|images||11 months ago|
|include||5 months ago|
|js||2 years ago|
|library||2 years ago|
|mod||1 year ago|
|src||5 months ago|
|tests||4 years ago|
|util||1 year ago|
|view||11 months ago|
|.gitignore||1 year ago|
|.htaccess-dist||1 year ago|
|Makefile||4 years ago|
|README.md||1 year ago|
|Vagrantfile||1 year ago|
|boot.php||1 year ago|
|composer.json||7 months ago|
|composer.lock||7 months ago|
|dfrndir.sql||1 year ago|
|example.php||4 years ago|
|htconfig.php||2 years ago|
|index.php||5 months ago|
|maintenance.html||1 year ago|
.htconfig.php and enter the database credentials.
Create a database with a username and a password.
dfrndir.sql to it.
mysql -u YOURDBUSER -p YOURDBNAME < dfrnlr.sql
Make sure you have composer installed globally, or rewrite the command to use a
Example cronjob using
*/30 * * * * www-data cd /var/www/friendica-directory; php include/cron_maintain.php */5 * * * * www-data cd /var/www/friendica-directory; php include/cron_sync.php
The new syncing features include: pushing and pulling.
Submissions you receive can be submitted to other directories using a push target.
You do this by creating an entry in the sync-targets table with the push bit set to
Also, you must enable pushing in your
The next time
include/cron_sync.php is run from your cronjob, the queued items will be submitted to your push targets.
For pulling to work, the target server must enable pulling.
This makes the
/sync/pull/since/[when] methods work on that server.
Next you can add an entry in the sync-targets table with the pull bit set to
Also, you must enable pulling in your
The next time
include/cron_sync.php is run from your cronjob, the pulling sources will be checked.
New items will be queued in your pull queue.
The queue will be gradually cleared based on your
You can check the backlog of this queue at the
Note: If you set the bit for pulling or pushing in the MySQL console, it won’t be visible in a
MySQL will however inform you about changed rows after
The /submit endpoint takes a
This parameter is an encoded URL, the original ASCII is treated as binary and base16 encoded.
This URL should be a profile location, such as
This URL will be checked in the database for existing accounts.
This check includes a normalization, http vs https is ignored as well as www. prefixes.
If noscrape is supported by the site, this will be used instead of a scrape request.
In this case
If noscrape fails or is not supported, the url provided (as is) will be scraped for meta information.
<meta name="dfrn-global-visibility" content="true" />
<meta name="friendica.community" content="true" />or
<meta name="friendika.community" content="true" />
<meta name="keywords" content="these,are,your,public,tags" />
<link rel="dfrn-*" href="https://fc.oscp.info/*" />any dfrn-* prefixed link and it’s href attribute.
dfrn-global-visibility value is set to false. Any existing records will be deleted.
And the process exits here.
A submission is IGNORED when at least the following data could not be scraped.
keythe public key from the hCard.
dfrn-requestrequired for the DFRN protocol.
dfrn-confirmrequired for the DFRN protocol.
dfrn-notifyrequired for the DFRN protocol.
dfrn-pollrequired for the DFRN protocol.
If the profile existed in the database and the profile is not explicitly set to
public using the
dfrn-global-visibility meta tag. It will be deleted.
If the profile existed in the database and the profile lacks either an
attribute, it will be deleted.
The profile is now inserted/updated based on the found information. Notable database fields are:
homepagethe originally (decoded)
nurlthe normalized URL created to remove http vs https and www vs non-www urls.
createdthe creation date and time in UTC (now if the entry did not exist yet).
updatedthe current date and time in UTC.
If an insert has occurred, the URL will now be used to check for duplicates. The highest insert ID will be kept, anything else deleted.
If provided, your public tags are now split by (space character) and stored in the tags table. This uses your normalized URL as unique key for your profile.
photo provided will be downloaded and resized to 80x80, regardless of source size.
Should there somehow have been an error at this point such as that there is no profile ID known.
Everything will get deleted based on the original
The Directory uses MySQL fulltext capabilities to index profiles and offer a search feature.
However, the default minimum word size MySQL will index is 4, which ignores words like
To index words smaller than 4 characters, you will have to edit your my.cnf/my.ini file to include this:
[mysqld] ft_min_word_len = 3
Then restart your MySQL server.
If you already had data in your profile table, you will need to rebuild the index by executing the following query:
REPAIR TABLE `profile` QUICK;