Link Directory (LD) [Deleted]

Table "phc_linkdirectory" field "site_logo" is a timesstamp
Images are saved on "data\linkdirectory"
Scheme:
LD_ID divided 1000 (Round fractions down) = Foldername
Image has the the LD_ID.jpg

I've had a go at this, and think I'm likely not far off. But not getting the image files created though. Hoping that some smarter brains can contribute and get working?
I'm no programmer (just a casual hack), so excuse inept and/or poor usage!!

Enter your DB credentials at the top, and execute this php from within the data/linkdirectory/ path.

PHP:
<?php

$hostname = 'localhost';
$user = '<yours>';             // Your XF database username
$pass = '<yours>';               // Your XF database password
$database = '<yours>';         // Your XF database name

$db_connection = new PDO( "mysql:host=" . $hostname . ";dbname=" . $database, $user, $pass );
$query = "SELECT ld_id, url FROM phc_linkdirectory";
$results = $db_connection->query($query);

foreach ( $results as $row ) {
        $ogurl = null;
        if (!empty($row['url'])) {
                $doc = new DomDocument();
                libxml_use_internal_errors(true);
                $doc->loadHTML(file_get_contents($row['url']));
                $xpath = new DOMXPath($doc);
                $metas = $xpath->query("//*/meta[starts-with(@property, \'og:\')]");
                foreach ($metas as $meta) {
                        if ($meta->getAttribute('property') == 'og:image') {
                                $ogurl = $meta->getAttribute('content');
                        }
                }
                if (!empty($ogurl)) {
                        $path = floor($row['ld_id'] / 1000);
                        $destfile = $row['ld_id'] . ".jpg";
                        $ch = curl_init($ogurl);
                        $fp = fopen($path . $destfile, 'wb');
                        curl_setopt($ch, CURLOPT_FILE, $fp);
                        curl_setopt($ch, CURLOPT_HEADER, 0);
                        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
                        $ogresult = curl_exec($ch);
                        curl_close($ch);
                        fclose($fp);
                        echo $ogurl . " | " . $path . " | " . $destfile . "\n";
                }
        }
}

$db_connection = null;
?>
 
Suggestion #2

Adding some sort of link exchange feature, same as tradeexpert.net

and keep track of "clicks in"

At the moment you have sort by clicks

It could keep track of "clicks in" & "clicks out"

View attachment 124034


View attachment 124035


Link exchange is good because it brings more traffic to members site, and when he add link back, it also brings back traffic to your site
View attachment 124037

TrafficExpert is like 1000000 light years more advanced in every aspect and is a complete script, whereas this is a simple link submission addon that's headed in the right direction. If you want a traffic trade script, then buy TradeExpert and append the trade tracking URL to your links that were submitted. While it would be cool to have this addon work like trade expert, it's not possible for a $30 addon to be anywhere near as feature packed as a full script, and it would be terrible for your server as it fills with thousands of pointless sql entries.

TradeExpert doesn't use any database, which is why it's super fast on sites with 1,000,000 visitors per day, and it has a zillion traffic management features that are well beyond the scope and knowledge of this addon.

I also don't think enough people would want it, nor would it keep the price at $30.

This addon is good, just needs a few touchups and style options.
 
I think in the latest version the picture upload has been added as a new permission. Here has the logic to be changed too (same as with the moderator link confirmation in the past).

The button function must be reversed and it has to be named "Can bypass picture upload".

image.webp

EDIT: OMG, I had no idea that the screenshot will be 3x the size due to retina display.
 
Last edited:
This addon would be even more useful, when it could be used to attract more users for paid premium-memberships:
  1. Links can only be added by premium-users
  2. Links can be only be edited by the author with premium-status
  3. Links become deactivated and disappear from the LD when premium-status of the author is expired (with notice to the author)
  4. Links become re-activated when the author renews his premium-membership.
It´s so obvious that this addon is like made for this, that I´m wondering why this isn´t implemented right from the start. Anyone else interested in this functionality?
With this feature I wouldn´t think twice to buy LD - I´ld just say "Shut up and take my money!".
 
One feature that would be cool, to go along with @Sperber 's suggestions, is this.

1. All "approved links that make it to your "main links page" or "homepage" are viewable by all members.

2. All rejected links are deleted as normal, and "archived" links are approved, but only seen by premium members.

We predict to have a LOT of link submissions for this (once we promote it), but only the best ones will be seen. The OK links we would like to archive as a "bonus" to paying members. Kinda like - you've seen the best on the front page, now check out all the submissions!

Fark does this really well with their "total fark" service which is paid.
 
On the subject of screenshots!
where these should be displayed in the LD? or what should LD do with it? ;)

Maybe show the screenshot on hover over the Link Name / Link Icon. Also it would be interesting to have BBCode support to place the LD Links in the threads (and benefit from the OG and description data)
 
Maybe show the screenshot on hover over the Link Name / Link Icon. Also it would be interesting to have BBCode support to place the LD Links in the threads (and benefit from the OG and description data)
(y)

With screenshot I actually meant the OG, I don't need both.
I just want it to look nice and have an image with every link. The screenshot might be useful when it can't fetch the OG
 
Two issues found;
  1. Link entries having a URL that does not commence with http return a 404 error. Eg. A directory entry with URL of www.cnn.com gives "http://yoursite.com/www.cnn.com"
  2. Editing existing link entries produces a new thread as though the link entry is new.
Both can I neither confirm nor reproduce
https://xenmade.com/linkdirectory/ - testet


Have a few more details for the upcoming release! ;)

Screen_19122015163303.webp
Thread with screenshot (on / off function)

Screen_19122015163423.webp
Screenshot with preview - mouseover on title

Screen_19122015163500.webp
By clicking on "screenshot"

I have fixed some bugs and made improvements ;)
Release within 1-2 days
 
I really like the "show screenshot on hover" concept.

You could also have it "show thumbnail over hover" which is nice too, because then the thumbnail is more relevant and attractive. Years ago I had this feature on a website and people enjoyed it. They would mouse over things just to see what thumbnail popped up! It also helped me get a LOT more links on a page and they got ranked better for SEO since it was mostly internal links.

Too many websites have too many ads, or the screenshots will look rather poor in comparison to a more vivid and relevant thumbnail or logo that's uploaded. Especially those WordPress sites with the popup ads that ask you to like them on Facebook. Wouldn't want that appearing in a screenshot.
 
Both can I neither confirm nor reproduce
Here. I editing an existing thread, and I get 2 entries in the moderation queue - one for a thread creation saying I added a new entry ...

Screen Shot 2015-12-20 at 09.59.23.webp

And my permissions - editing a existing entry shouldn't require moderation ...

Screen Shot 2015-12-20 at 10.01.55.webp
 
This add-on is starting to look like a good reviews add-on, better than bob showcase and resource manager

please keep adding many many features!!

on my wish list!!

.
.
 
Both can I neither confirm nor reproduce
https://xenmade.com/linkdirectory/ - testet


Have a few more details for the upcoming release! ;)

View attachment 124333
Thread with screenshot (on / off function)

View attachment 124334
Screenshot with preview - mouseover on title

View attachment 124335
By clicking on "screenshot"

I have fixed some bugs and made improvements ;)
Release within 1-2 days

- will this automatically create a screenshot at the thread, when a Link is submitted ?
- what will the the size (in pixel) of the screenshot within the thread ?
- could the screenshot also be shown as the "Link-image", so that no image needs to be uploaded manually ?
- could you implement exactly the same "Review / Star-Rating"-system as we already have at the XF-Resource-Manager ?



Mockup for Grid-Layout:
(image-size: 236px by 236px)


grid_view_layout_ld.webp


:)
 
Last edited:
- will this automatically create a screenshot at the thread, when a Link is submitted ?
the screenshot will be linked

-- what will the the size (in pixel) of the screenshot within the thread ?
Full Size 1280 / 800 (resized by XenForo)

-- could the screenshot also be shown as the "Link-image", so that no image needs to be uploaded manually ?
No this is not possible! because it takes an indefinite period until the screenshot available!

-- could you implement exactly the same "Review / Star-Rating"-system as we already have at the XF-Resource-Manager ?
Nice Idea

Mockup for Grid-Layout:
(image-size: 236px by 236px)
:)
WOW looks great!
 
Top Bottom